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

Viewer should warn & not start when Rgba32Float is not renderable #8466

Closed
DobromirM opened this issue Dec 15, 2024 · 3 comments · Fixed by #8476
Closed

Viewer should warn & not start when Rgba32Float is not renderable #8466

DobromirM opened this issue Dec 15, 2024 · 3 comments · Fixed by #8476
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself

Comments

@DobromirM
Copy link

Describe the bug
Hovering over a 3D view causes it to freeze until the cursor is removed from it, returning the following error:

Demo:
https://github.com/user-attachments/assets/e05afc1c-1024-4cac-adc7-44b5e6df8bba

Backtrace

[2024-12-15T16:26:42Z ERROR wgpu_core::device::global] Device::create_texture error: Texture usages TextureUsages(RENDER_ATTACHMENT) are not allowed on a texture of type Rgba32Float due to downlevel restrictions
[2024-12-15T16:26:42Z ERROR wgpu_core::device::global] Texture::create_view(Id(28,3)) error: Texture with 'DepthCopyWorkaround::readable_texture' label is invalid
[2024-12-15T16:26:42Z ERROR wgpu_core::device::global] Device::create_render_pipeline error: Color state [0] is invalid
[2024-12-15T16:26:42Z WARN  re_renderer::error_handling::wgpu_core_error] unknown error cause cause=InvalidFormatUsages(TextureUsages(RENDER_ATTACHMENT), Rgba32Float, true)
[2024-12-15T16:26:42Z ERROR re_renderer::error_handling::error_tracker] Wgpu validation error 426: Validation Error
    
    Caused by:
      In Device::create_texture, label = 'DepthCopyWorkaround::readable_texture'
        Texture usages TextureUsages(RENDER_ATTACHMENT) are not allowed on a texture of type Rgba32Float due to downlevel restrictions

Desktop:

 OS: Arch Linux 
 Kernel: x86_64 Linux 6.12.3-arch1-1
 DE: KDE
 WM: KWin
 Icon Theme: breeze
 CPU: 12th Gen Intel Core i7-12700H @ 20x 4.6GHz [50.0°C]
 GPU: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)

Rerun version

rerun-cli 0.20.3 (default map_view native_viewer web_viewer) [rustc 1.83.0 (90b35a623 2024-11-26), LLVM 19.1.1] x86_64-unknown-linux-gnu
Video features: av1 default ffmpeg serde
@DobromirM DobromirM added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Dec 15, 2024
@DobromirM
Copy link
Author

Building from source and reading through the logs shows that wgpu is setting the adapter backend to Gl.

[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_surface
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_xlib_surface
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_xcb_surface
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_wayland_surface
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_swapchain_colorspace
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_get_physical_device_properties2
[2024-12-15T16:26:39Z WARN  wgpu_hal::vulkan::instance] InstanceFlags::VALIDATION requested, but unable to find layer: VK_LAYER_KHRONOS_validation
[2024-12-15T16:26:39Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
        vkCreateInstance: Found no drivers!
[2024-12-15T16:26:39Z ERROR wgpu_hal::vulkan::instance]         objects: (type: INSTANCE, hndl: 0x56ed7ba3cc60, name: ?)
[2024-12-15T16:26:39Z WARN  wgpu_hal::gles::egl] Re-initializing Gles context due to Wayland window
[2024-12-15T16:26:39Z WARN  wgpu_hal::gles::adapter] Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
[2024-12-15T16:26:39Z WARN  wgpu_hal::gles::adapter] Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
[2024-12-15T16:26:39Z DEBUG egui_wgpu] Picked the only available wgpu adapter: backend: Gl, device_type: IntegratedGpu, name: "Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)", driver_info: "4.6 (Core Profile) Mesa 24.3.1-arch1.3", vendor: 0x8086
[2024-12-15T16:26:39Z DEBUG re_renderer::context] wgpu adapter backend: Gl, device_type: IntegratedGpu, name: "Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)", driver_info: "4.6 (Core Profile) Mesa 24.3.1-arch1.3"

I found that disabling the DepthReadbackWorkaround in picking_layer.rs, by setting it to None, fixes the issue for that particular case.

@DobromirM
Copy link
Author

DobromirM commented Dec 15, 2024

Alternatively, after updating both vulkan-intel and vulkan-icd-loader on my system, wgpu sets the backend to Vulkan and the problem is not encountered.

@Wumpf
Copy link
Member

Wumpf commented Dec 16, 2024

after updating both vulkan-intel and vulkan-icd-loader on my system, wgpu sets the backend to Vulkan and the problem is not encountered

The error we're getting is literally means that the driver/gpu was not capable enough to do a very basic rendering operation which we need to do for picking detection. Very happy to hear that updating the drivers resolved this and it picks now Vulkan - OpenGL is really just a fallback for us that we'd like to phase out eventually.

I figure we should not start the application to begin with - keeping the issue open and changing the title accordingly. I don't think there's more we can do here.

@Wumpf Wumpf changed the title 3D view freezing on hover Viewer should warn & not start when Rgba32Float is not renderable Dec 16, 2024
@Wumpf Wumpf added 🔺 re_renderer affects re_renderer itself and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Dec 16, 2024
@Wumpf Wumpf closed this as completed in 4f9ba38 Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself
Projects
None yet
2 participants