[BUG] texture::image::load_from_image creates invalid TextureBuilder
- Dominant language
- Rust
- Stars
- 812
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
## Description
`texture::image::load_from_image` returns a `TextureBuilder` which according to the vulkan validation has unsupported parameters for some source images.
## Reproduction Steps
1. Clone https://github.com/valkum/learn-rendy/tree/image_load_bug
2. Run instanced_cube example with vulkan
3. Change Filename in https://github.com/valkum/learn-rendy/blob/image_load_bug/examples/instanced_cube.rs#L278-L287
## What You Expected to Happen
See textured cubes for alle 3 textures in resources.
## What Actually Happened
Both not_working pngs are black in rendy.
## Screenshots and Logs
using not_working.png:
```
ERROR 2019-03-20T20:47:02Z: gfx_backend_vulkan: [Validation] [ VUID_Undefined ] Object: VK_NULL_HANDLE (Type = 0) | vkCreateIm
age(): Format VK_FORMAT_R8G8B8_SRGB is not supported for this combination of parameters.
ERROR 2019-03-20T20:47:02Z: gfx_backend_vulkan: [Validation] [ VUID-VkImageViewCreateInfo-None-02273 ] Object: 0x1d (Type = 10
) | vkCreateImageView(): pCreateInfo->format VK_FORMAT_R8G8B8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL has no supported format
features on this physical device. The Vulkan spec states: The format features of the resultant image view must contain at least
one bit. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-None-02273)
```

## Your Environment
Windows 10 64bit
AMD R9 390 Driver 19.2.3
## Additional Context
For reproduction purpose I added amethyst-like image loading code to an updated version of learn-rendy.
The working original learn-rendy code uses `image::load_from_memory` and `to_rgba` but is not optimal for all texture assets.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.