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:
Austin Eng 2021-07-08 18:42:37 +00:00 committed by Dawn LUCI CQ
parent 48de25e52a
commit 31930e7287
10 changed files with 4 additions and 42 deletions

View File

@ -1336,6 +1336,7 @@ namespace dawn_native {
void DeviceBase::SetDefaultToggles() { void DeviceBase::SetDefaultToggles() {
SetToggle(Toggle::LazyClearResourceOnFirstUse, true); SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
SetToggle(Toggle::DisallowUnsafeAPIs, true); SetToggle(Toggle::DisallowUnsafeAPIs, true);
SetToggle(Toggle::UseTintGenerator, true);
} }
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) { void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {

View File

@ -108,9 +108,6 @@ namespace dawn_native { namespace d3d12 {
mSupportedExtensions.EnableExtension(Extension::TextureCompressionBC); mSupportedExtensions.EnableExtension(Extension::TextureCompressionBC);
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery); mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
mSupportedExtensions.EnableExtension(Extension::TimestampQuery); mSupportedExtensions.EnableExtension(Extension::TimestampQuery);
if (mDeviceInfo.supportsShaderFloat16 && GetBackend()->GetFunctions()->IsDXCAvailable()) {
mSupportedExtensions.EnableExtension(Extension::ShaderFloat16);
}
mSupportedExtensions.EnableExtension(Extension::MultiPlanarFormats); mSupportedExtensions.EnableExtension(Extension::MultiPlanarFormats);
} }

View File

@ -546,7 +546,6 @@ namespace dawn_native { namespace d3d12 {
SetToggle(Toggle::UseD3D12RenderPass, GetDeviceInfo().supportsRenderPass); SetToggle(Toggle::UseD3D12RenderPass, GetDeviceInfo().supportsRenderPass);
SetToggle(Toggle::UseD3D12ResidencyManagement, true); SetToggle(Toggle::UseD3D12ResidencyManagement, true);
SetToggle(Toggle::UseDXC, false); SetToggle(Toggle::UseDXC, false);
SetToggle(Toggle::UseTintGenerator, false);
#if defined(_DEBUG) #if defined(_DEBUG)
// Enable better shader debugging with the graphics debugging tools. // Enable better shader debugging with the graphics debugging tools.

View File

@ -234,8 +234,6 @@ namespace dawn_native { namespace metal {
if (@available(macOS 10.11, iOS 11.0, *)) { if (@available(macOS 10.11, iOS 11.0, *)) {
mSupportedExtensions.EnableExtension(Extension::DepthClamping); mSupportedExtensions.EnableExtension(Extension::DepthClamping);
} }
mSupportedExtensions.EnableExtension(Extension::ShaderFloat16);
} }
NSPRef<id<MTLDevice>> mDevice; NSPRef<id<MTLDevice>> mDevice;

View File

@ -243,14 +243,6 @@ namespace dawn_native { namespace vulkan {
mSupportedExtensions.EnableExtension(Extension::TextureCompressionBC); 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) { if (mDeviceInfo.features.pipelineStatisticsQuery == VK_TRUE) {
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery); mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
} }

View File

@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (properties.backendType == wgpu::BackendType::D3D12 && if (properties.backendType == wgpu::BackendType::D3D12 &&
properties.adapterType == wgpu::AdapterType::CPU) { properties.adapterType == wgpu::AdapterType::CPU) {
// Force usage of Tint to provide coverage of that code path until it becomes device = wgpu::Device::Acquire(adapter.CreateDevice());
// the default.
dawn_native::DeviceDescriptor desc;
desc.forceEnabledToggles.push_back("use_tint_generator");
device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
break; break;
} }
} }

View File

@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
adapter.GetProperties(&properties); adapter.GetProperties(&properties);
if (properties.backendType == wgpu::BackendType::Null) { if (properties.backendType == wgpu::BackendType::Null) {
// Force usage of Tint to provide coverage of that code path until it becomes nullDevice = wgpu::Device::Acquire(adapter.CreateDevice());
// the default.
dawn_native::DeviceDescriptor desc;
desc.forceEnabledToggles.push_back("use_tint_generator");
nullDevice = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
break; break;
} }
} }

View File

@ -34,12 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (properties.backendType == wgpu::BackendType::Vulkan && if (properties.backendType == wgpu::BackendType::Vulkan &&
properties.adapterType == wgpu::AdapterType::CPU) { properties.adapterType == wgpu::AdapterType::CPU) {
// Force usage of Tint to provide coverage of that code path until it becomes device = wgpu::Device::Acquire(adapter.CreateDevice());
// the default.
dawn_native::DeviceDescriptor desc;
desc.forceEnabledToggles.push_back("use_tint_generator");
device = wgpu::Device::Acquire(adapter.CreateDevice(&desc));
break; break;
} }
} }

View File

@ -61,10 +61,6 @@ namespace {
void SetUp() override { void SetUp() override {
DawnTestWithParams<DepthStencilLoadOpTestParams>::SetUp(); 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. // Readback of Depth/Stencil textures not fully supported on GL right now.
// Also depends on glTextureView which is not supported on ES. // Also depends on glTextureView which is not supported on ES.
DAWN_SUPPRESS_TEST_IF(IsOpenGL() || IsOpenGLES()); DAWN_SUPPRESS_TEST_IF(IsOpenGL() || IsOpenGLES());

View File

@ -128,12 +128,6 @@ namespace {
DAWN_TEST_UNSUPPORTED_IF(GetParam().mFormat == wgpu::TextureFormat::BC1RGBAUnorm && DAWN_TEST_UNSUPPORTED_IF(GetParam().mFormat == wgpu::TextureFormat::BC1RGBAUnorm &&
(IsOpenGL() || IsOpenGLES())); (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; wgpu::TextureDescriptor descriptor;
descriptor.dimension = GetParam().mDimension; descriptor.dimension = GetParam().mDimension;
descriptor.size.width = kSize; descriptor.size.width = kSize;