Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNG Image is not displayed in example "tour" #1898

Closed
2 tasks done
krei-del opened this issue Jun 5, 2023 · 4 comments
Closed
2 tasks done

PNG Image is not displayed in example "tour" #1898

krei-del opened this issue Jun 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@krei-del
Copy link

krei-del commented Jun 5, 2023

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

@krei-del krei-del added the bug Something isn't working label Jun 5, 2023
@DoomDuck
Copy link
Contributor

DoomDuck commented Jun 6, 2023

This might be linked to #1103.
Are you using the wgpu backend or the opengl one ?
Or even the recent #1774

@krei-del
Copy link
Author

krei-del commented Jun 6, 2023

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 ...

@krei-del
Copy link
Author

krei-del commented Jun 6, 2023

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.

@krei-del krei-del closed this as completed Jun 6, 2023
@nicksenger
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants