Validate 1D texture bindings cannot be multisampled
Bug: chromium:1104737 Change-Id: I61d631f7fce2c7d68823f265f06f75069af765a6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25101 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
c15c6eb9d8
commit
34f5133104
|
@ -179,6 +179,8 @@ namespace dawn_native {
|
|||
return DAWN_VALIDATION_ERROR("3D texture bindings may not be multisampled");
|
||||
|
||||
case wgpu::TextureViewDimension::e1D:
|
||||
return DAWN_VALIDATION_ERROR("1D texture bindings may not be multisampled");
|
||||
|
||||
case wgpu::TextureViewDimension::Undefined:
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
|
|
@ -872,6 +872,13 @@ TEST_F(BindGroupLayoutValidationTest, MultisampledTextures) {
|
|||
{0, wgpu::ShaderStage::Compute, wgpu::BindingType::SampledTexture, false, 0,
|
||||
true, wgpu::TextureViewDimension::e3D},
|
||||
}));
|
||||
|
||||
// Multisampled 1D texture is invalid.
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroupLayout(
|
||||
device, {
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::BindingType::SampledTexture, false, 0,
|
||||
true, wgpu::TextureViewDimension::e1D},
|
||||
}));
|
||||
}
|
||||
|
||||
// Test that it is an error to pass multisampled=true for non-texture bindings
|
||||
|
|
Loading…
Reference in New Issue