mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-10-30 05:51:42 +00:00
Rename ALLOW_NONCOMPLIANT_ADAPTER
to ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER
(#4760)
* rename `ALLOW_NONCOMPLIANT_ADAPTER` to `ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER` * clarify comment
This commit is contained in:
parent
ca4e1313f7
commit
f4c6faf773
@ -40,7 +40,7 @@ Bottom level categories:
|
||||
|
||||
## Unreleased
|
||||
|
||||
### `WGPU_ALLOW_NONCOMPLIANT_ADAPTER` environment variable
|
||||
### `WGPU_ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER` environment variable
|
||||
|
||||
This adds a way to allow a Vulkan driver which is non-compliant per VK_KHR_driver_properties to be enumerated. This is intended for testing new Vulkan drivers which are not Vulkan compliant yet.
|
||||
|
||||
|
@ -143,7 +143,7 @@ All testing and example infrastructure shares the same set of environment variab
|
||||
- `WGPU_POWER_PREF` with the power preference to choose when a specific adapter name isn't specified (`high`, `low` or `none`)
|
||||
- `WGPU_DX12_COMPILER` with the DX12 shader compiler you wish to use (`dxc` or `fxc`, note that `dxc` requires `dxil.dll` and `dxcompiler.dll` to be in the working directory otherwise it will fall back to `fxc`)
|
||||
- `WGPU_GLES_MINOR_VERSION` with the minor OpenGL ES 3 version number to request (`0`, `1`, `2` or `automatic`).
|
||||
- `WGPU_ALLOW_NONCOMPLIANT_ADAPTER` with a boolean whether non-compliant drivers are enumerated (`0` for false, `1` for true).
|
||||
- `WGPU_ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER` with a boolean whether non-compliant drivers are enumerated (`0` for false, `1` for true).
|
||||
|
||||
When running the CTS, use the variables `DENO_WEBGPU_ADAPTER_NAME`, `DENO_WEBGPU_BACKEND`, `DENO_WEBGPU_POWER_PREFERENCE`.
|
||||
|
||||
|
@ -998,7 +998,7 @@ impl super::Instance {
|
||||
} else if self
|
||||
.shared
|
||||
.flags
|
||||
.contains(wgt::InstanceFlags::ALLOW_NONCOMPLIANT_ADAPTER)
|
||||
.contains(wgt::InstanceFlags::ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER)
|
||||
{
|
||||
log::warn!("Adapter is not Vulkan compliant: {}", info.name);
|
||||
} else {
|
||||
|
@ -858,11 +858,16 @@ bitflags::bitflags! {
|
||||
const VALIDATION = 1 << 1;
|
||||
/// Don't pass labels to wgpu-hal.
|
||||
const DISCARD_HAL_LABELS = 1 << 2;
|
||||
/// Whether non-compliant adapters should be enumerated.
|
||||
/// Whether wgpu should expose adapters that run on top of non-compliant adapters.
|
||||
///
|
||||
/// Turning this on might mean that some of the functionality provided by the wgpu
|
||||
/// adapter/device is not working or is broken. It could be that all the functionality
|
||||
/// wgpu currently exposes works but we can't tell for sure since we have no additional
|
||||
/// transparency into what is working and what is not on the underlying adapter.
|
||||
///
|
||||
/// This mainly applies to a Vulkan driver's compliance version. If the major compliance version
|
||||
/// is `0`, then the driver is ignored. This flag allows that driver to be enabled for testing.
|
||||
const ALLOW_NONCOMPLIANT_ADAPTER = 1 << 3;
|
||||
const ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER = 1 << 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -915,8 +920,8 @@ impl InstanceFlags {
|
||||
if let Some(bit) = env("WGPU_DEBUG") {
|
||||
self.set(Self::DEBUG, bit);
|
||||
}
|
||||
if let Some(bit) = env("WGPU_ALLOW_NONCOMPLIANT_ADAPTER") {
|
||||
self.set(Self::ALLOW_NONCOMPLIANT_ADAPTER, bit);
|
||||
if let Some(bit) = env("WGPU_ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER") {
|
||||
self.set(Self::ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER, bit);
|
||||
}
|
||||
|
||||
self
|
||||
|
Loading…
Reference in New Issue
Block a user