PNG Image is not displayed in example "tour"
krei-del opened this issue · 4 comments
Is there an existing issue for this?
- I have searched the existing issues.
Is this issue related to iced?
- My hardware is compatible and my graphics drivers are up-to-date.
What happened?
When I try to display PNG images with iced, they are not displayed. Instead a black rectangle is shown. This happens only on my linux machine (arch linux). In Ms Window it is shown correctly.
What is the expected behavior?
The PNG Image is shown correctly.
Version
master
Operative System
Linux
Do you have any log output?
No response
Yes it seems like the same issue.
I guess I use opengl backend. But, how can I know, when I'm not declare it explicitly?
Which one is used by default?
When I try to set the backend explicitly to vulkan I get Error: GraphicsCreationFailed(GraphicsAdapterNotFound), that make sense, as I do not have any vulkan driver installed.
In my case I have problems getting the driver for nvidia card installed correctly, so that might be the issue. (I think the driver were removed with some kernel update)
See more info here:
sudo lshw -numeric -C display
*-display
description: VGA compatible controller
product: Haswell-ULT Integrated Graphics Controller [8086:A16]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 0b
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:50 memory:b3000000-b33fffff memory:c0000000-cfffffff ioport:5000(size=64) memory:c0000-dffff
*-display UNCLAIMED
description: 3D controller
product: GM107M [GeForce GTX 850M] [10DE:1391]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a2
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:b2000000-b2ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:3000(size=128)
I will try to install the nvidia driver again and do another check ...
I could fix my nvidia driver issue (for arch users: removing nvidia or nvidia-lts package installing the nvidia-dkms package):
See excerpt:
*-display
description: 3D controller
product: GM107M [GeForce GTX 850M] [10DE:1391]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a2
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:53 memory:b2000000-b2ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:3000(size=128)
Now the PNG image is loaded correctly when I start with
WGPU_BACKEND=vulkan cargo run --release --package tour
So I will close this issue, still referring to #1103 as the main issue.
I noticed the same but for images in web builds. By changing this line https://github.com/iced-rs/iced/blob/master/wgpu/src/image/atlas.rs#L58 to Layer::Full the problem seems to be resolved, but I don't know why, or what other consequences there could be as a result of making this change.