diff --git a/src/dawn/native/d3d12/CommandBufferD3D12.cpp b/src/dawn/native/d3d12/CommandBufferD3D12.cpp index 0c88d0b239..83efc938a5 100644 --- a/src/dawn/native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn/native/d3d12/CommandBufferD3D12.cpp @@ -390,6 +390,12 @@ namespace dawn::native::d3d12 { ASSERT(descriptorHeaps[0] != nullptr); ASSERT(descriptorHeaps[1] != nullptr); commandList->SetDescriptorHeaps(descriptorHeaps.size(), descriptorHeaps.data()); + + // Descriptor table state is undefined at the beginning of a command list and after + // descriptor heaps are changed on a command list. Invalidate the root sampler tables to + // reset the root descriptor table for samplers, otherwise the shader cannot access the + // descriptor heaps. + mBoundRootSamplerTables = {}; } private: diff --git a/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp index 82fa79d3c8..5223b6648b 100644 --- a/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp +++ b/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp @@ -740,9 +740,6 @@ TEST_P(D3D12DescriptorHeapTests, EncodeManyUBOAndSamplers) { DAWN_TEST_UNSUPPORTED_IF(!mD3DDevice->IsToggleEnabled( dawn::native::Toggle::UseD3D12SmallShaderVisibleHeapForTesting)); - // TODO(crbug.com/dawn/1255): Fails on Win11 with D3D12 debug layer and full validation - DAWN_SUPPRESS_TEST_IF(IsD3D12() && IsBackendValidationEnabled()); - // Create a solid filled texture. wgpu::TextureDescriptor descriptor; descriptor.dimension = wgpu::TextureDimension::e2D;