Panic: gsamplerCubeArrayShadow isn't supported
bemyak opened this issue · comments
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?
Seems like a duplicate of gfx-rs/wgpu#4455.
Thanks for the report, this does look like a dupe of gfx-rs/wgpu#4455 which unfortunately doesn't have a solution right now.
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.