Enable use_tint_generator by default, disable shader_float16
Float16 is not standardized in WGSL or implemented in Tint, so remove support of the extension for now. Bug: dawn:571, dawn:426 Change-Id: Ia26f0ddb07cabf6057c0d7db9ade547494d2cc6e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56441 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
48de25e52a
commit
31930e7287
|
@ -1336,6 +1336,7 @@ namespace dawn_native {
|
|||
void DeviceBase::SetDefaultToggles() {
|
||||
SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
|
||||
SetToggle(Toggle::DisallowUnsafeAPIs, true);
|
||||
SetToggle(Toggle::UseTintGenerator, true);
|
||||
}
|
||||
|
||||
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {
|
||||
|
|
|
@ -108,9 +108,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
mSupportedExtensions.EnableExtension(Extension::TextureCompressionBC);
|
||||
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
|
||||
mSupportedExtensions.EnableExtension(Extension::TimestampQuery);
|
||||
if (mDeviceInfo.supportsShaderFloat16 && GetBackend()->GetFunctions()->IsDXCAvailable()) {
|
||||
mSupportedExtensions.EnableExtension(Extension::ShaderFloat16);
|
||||
}
|
||||
mSupportedExtensions.EnableExtension(Extension::MultiPlanarFormats);
|
||||
}
|
||||
|
||||
|
|
|
@ -546,7 +546,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
SetToggle(Toggle::UseD3D12RenderPass, GetDeviceInfo().supportsRenderPass);
|
||||
SetToggle(Toggle::UseD3D12ResidencyManagement, true);
|
||||
SetToggle(Toggle::UseDXC, false);
|
||||
SetToggle(Toggle::UseTintGenerator, false);
|
||||
|
||||
#if defined(_DEBUG)
|
||||
// Enable better shader debugging with the graphics debugging tools.
|
||||
|
|
|
@ -234,8 +234,6 @@ namespace dawn_native { namespace metal {
|
|||
if (@available(macOS 10.11, iOS 11.0, *)) {
|
||||
mSupportedExtensions.EnableExtension(Extension::DepthClamping);
|
||||
}
|
||||
|
||||
mSupportedExtensions.EnableExtension(Extension::ShaderFloat16);
|
||||
}
|
||||
|
||||
NSPRef<id<MTLDevice>> mDevice;
|
||||
|
|
|
@ -243,14 +243,6 @@ namespace dawn_native { namespace vulkan {
|
|||
mSupportedExtensions.EnableExtension(Extension::TextureCompressionBC);
|
||||
}
|
||||
|
||||
if (mDeviceInfo.HasExt(DeviceExt::ShaderFloat16Int8) &&
|
||||
mDeviceInfo.shaderFloat16Int8Features.shaderFloat16 == VK_TRUE &&
|
||||
mDeviceInfo.HasExt(DeviceExt::_16BitStorage) &&
|
||||
mDeviceInfo._16BitStorageFeatures.storageBuffer16BitAccess == VK_TRUE &&
|
||||
mDeviceInfo._16BitStorageFeatures.uniformAndStorageBuffer16BitAccess == VK_TRUE) {
|
||||
mSupportedExtensions.EnableExtension(Extension::ShaderFloat16);
|
||||
}
|
||||
|
||||
if (mDeviceInfo.features.pipelineStatisticsQuery == VK_TRUE) {
|
||||
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
|
||||
}
|
||||
|
|
|
@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
|
||||
if (properties.backendType == wgpu::BackendType::D3D12 &&
|
||||
properties.adapterType == wgpu::AdapterType::CPU) {
|
||||
// Force usage of Tint to provide coverage of that code path until it becomes
|
||||
// the default.
|
||||
dawn_native::DeviceDescriptor desc;
|
||||
desc.forceEnabledToggles.push_back("use_tint_generator");
|
||||
|
||||
device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
|
||||
device = wgpu::Device::Acquire(adapter.CreateDevice());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
adapter.GetProperties(&properties);
|
||||
|
||||
if (properties.backendType == wgpu::BackendType::Null) {
|
||||
// Force usage of Tint to provide coverage of that code path until it becomes
|
||||
// the default.
|
||||
dawn_native::DeviceDescriptor desc;
|
||||
desc.forceEnabledToggles.push_back("use_tint_generator");
|
||||
|
||||
nullDevice = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
|
||||
nullDevice = wgpu::Device::Acquire(adapter.CreateDevice());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
|
||||
if (properties.backendType == wgpu::BackendType::Vulkan &&
|
||||
properties.adapterType == wgpu::AdapterType::CPU) {
|
||||
// Force usage of Tint to provide coverage of that code path until it becomes
|
||||
// the default.
|
||||
dawn_native::DeviceDescriptor desc;
|
||||
desc.forceEnabledToggles.push_back("use_tint_generator");
|
||||
|
||||
device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
|
||||
device = wgpu::Device::Acquire(adapter.CreateDevice());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,10 +61,6 @@ namespace {
|
|||
void SetUp() override {
|
||||
DawnTestWithParams<DepthStencilLoadOpTestParams>::SetUp();
|
||||
|
||||
// TODO(crbug.com/tint/827): HLSL writer produces invalid code.
|
||||
DAWN_SUPPRESS_TEST_IF(IsD3D12() && HasToggleEnabled("use_tint_generator") &&
|
||||
GetParam().mCheck == Check::SampleDepth);
|
||||
|
||||
// Readback of Depth/Stencil textures not fully supported on GL right now.
|
||||
// Also depends on glTextureView which is not supported on ES.
|
||||
DAWN_SUPPRESS_TEST_IF(IsOpenGL() || IsOpenGLES());
|
||||
|
|
|
@ -128,12 +128,6 @@ namespace {
|
|||
DAWN_TEST_UNSUPPORTED_IF(GetParam().mFormat == wgpu::TextureFormat::BC1RGBAUnorm &&
|
||||
(IsOpenGL() || IsOpenGLES()));
|
||||
|
||||
// TODO(crbug.com/tint/827): HLSL writer produces invalid code.
|
||||
DAWN_SUPPRESS_TEST_IF(HasToggleEnabled("use_tint_generator") &&
|
||||
GetParam().mFormat == wgpu::TextureFormat::Depth24PlusStencil8 &&
|
||||
GetParam().mAspect == wgpu::TextureAspect::DepthOnly &&
|
||||
IsD3D12());
|
||||
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.dimension = GetParam().mDimension;
|
||||
descriptor.size.width = kSize;
|
||||
|
|
Loading…
Reference in New Issue