Disable RAY_QUERY and RAY_TRACING_ACCELERATION_STRUCTURE by default (#12862)

# Objective

See https://github.com/gfx-rs/wgpu/issues/5488 for context and
rationale.

## Solution

- Disables `wgpu::Features::RAY_QUERY` and
`wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE` by default. They
must be explicitly opted into now.

---

## Changelog

- Disables `wgpu::Features::RAY_QUERY` and
`wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE` by default. They
must be explicitly opted into now.

## Migration Guide

- If you need `wgpu::Features::RAY_QUERY` or
`wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE`, enable them
explicitly using `WgpuSettings::features`
This commit is contained in:
Carter Anderson 2024-04-04 12:20:19 -07:00 committed by GitHub
parent 4da4493449
commit b27896f875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,6 +209,15 @@ pub async fn initialize_renderer(
// integrated GPUs. // integrated GPUs.
features -= wgpu::Features::MAPPABLE_PRIMARY_BUFFERS; features -= wgpu::Features::MAPPABLE_PRIMARY_BUFFERS;
} }
// RAY_QUERY and RAY_TRACING_ACCELERATION STRUCTURE will sometimes cause DeviceLost failures on platforms
// that report them as supported:
// <https://github.com/gfx-rs/wgpu/issues/5488>
// WGPU also currently doesn't actually support these features yet, so we should disable
// them until they are safe to enable.
features -= wgpu::Features::RAY_QUERY;
features -= wgpu::Features::RAY_TRACING_ACCELERATION_STRUCTURE;
limits = adapter.limits(); limits = adapter.limits();
} }