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

Panic: gsamplerCubeArrayShadow isn't supported #2438

Closed
bemyak opened this issue Aug 16, 2023 · 3 comments
Closed

Panic: gsamplerCubeArrayShadow isn't supported #2438

bemyak opened this issue Aug 16, 2023 · 3 comments

Comments

@bemyak
Copy link

bemyak commented Aug 16, 2023

Hi!

I was trying to run the array_texture shader example from bevy, and it crashes:

INFO bevy_winit::system: Creating new window "App" (0v0)
INFO bevy_render::renderer: AdapterInfo { name: "Mesa Intel(R) UHD Graphics (TGL GT1)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
WARN bevy_pbr::ssao: ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.4.10-zen2-1-zen", cpu: "11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz", core_count: "8", memory: "31.1 GiB" }
ERROR wgpu_hal::gles::egl: GLES: [API/Error] ID 1 : GL_INVALID_ENUM in glTexStorage2DMultisample(target=GL_TEXTURE_2D)    
ERROR wgpu_hal::gles::egl: GLES: [API/Error] ID 1 : GL_INVALID_ENUM in glTexStorage2DMultisample(target=GL_TEXTURE_2D)    
ERROR wgpu::backend::direct: Shader translation error for stage ShaderStages(FRAGMENT): gsamplerCubeArrayShadow isn't supported in textureGrad, textureLod or texture with bias    
ERROR wgpu::backend::direct: Please report it to https://github.com/gfx-rs/naga    
ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default    
thread 'Compute Task Pool (0)' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `opaque_mesh_pipeline`
    Internal error in ShaderStages(FRAGMENT) shader: gsamplerCubeArrayShadow isn't supported in textureGrad, textureLod or texture with bias

I'm running this on Wayland. I have two GPUs, but I modified the example initialization code to explicitly use the integrated one since NVidia doesn't support Vulkan on Wayland yet:

DefaultPlugins
    .set(RenderPlugin {
        wgpu_settings: WgpuSettings {
            power_preference: PowerPreference::LowPower,
            ..default()
        },
    }),

The full log with backtrace: log.txt

Any ideas how to fix this? Is my system configuration incorrect?

@fornwall
Copy link
Contributor

Seems like a duplicate of gfx-rs/wgpu#4455.

@teoxoy
Copy link
Member

teoxoy commented Aug 17, 2023

Thanks for the report, this does look like a dupe of gfx-rs/wgpu#4455 which unfortunately doesn't have a solution right now.

@teoxoy teoxoy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@bemyak
Copy link
Author

bemyak commented Aug 17, 2023

The solution was to force Bevy to use the Vulkan backend by setting WGPU_BACKEND="Vulkan" environment variable. However, after doing so, Bevy (or WGPU? or Vulkan driver?) started to ignore the power_preference: PowerPreference::LowPower setting and ran on the NVidia's GPU.

This was fixed by setting the VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json environment variable. Now it successfully runs on Wayland with the Vulkan backend on the Intel GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants