mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 00:47:13 +00:00
Support multisampled depth texture bindings
Adds support for processing texture_depth_multisampled_2d bindings reflected from Tint, and also removes Dawn restrictions against multisampled depth. These restrictions were originally added in https://dawn-review.googlesource.com/c/dawn/+/30240 to validate against using a multisampled depth texture with a comparison sampler. This is now disallowed by the language with distinct binding types and builtins in WGSL. Previously with SPIR-V, we inferred Depth if the texture was used with a comparison sampler. Also check Vulkan limits for supported sample counts. Bug: dawn:1021, dawn:1030 Change-Id: I7233b16c14dc80d10a851cc4e786d5b05512b57a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/60020 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -1348,35 +1348,35 @@ TEST_F(BindGroupLayoutValidationTest, MultisampledTextureViewDimension) {
|
||||
}));
|
||||
}
|
||||
|
||||
// Test that multisampled textures cannot be DepthComparison
|
||||
TEST_F(BindGroupLayoutValidationTest, MultisampledTextureComponentType) {
|
||||
// Multisampled float component type works.
|
||||
// Test that multisampled texture bindings are valid
|
||||
TEST_F(BindGroupLayoutValidationTest, MultisampledTextureSampleType) {
|
||||
// Multisampled float sample type works.
|
||||
utils::MakeBindGroupLayout(device,
|
||||
{
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::TextureSampleType::Float,
|
||||
wgpu::TextureViewDimension::e2D, true},
|
||||
});
|
||||
|
||||
// Multisampled uint component type works.
|
||||
// Multisampled uint sample type works.
|
||||
utils::MakeBindGroupLayout(device,
|
||||
{
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::TextureSampleType::Uint,
|
||||
wgpu::TextureViewDimension::e2D, true},
|
||||
});
|
||||
|
||||
// Multisampled sint component type works.
|
||||
// Multisampled sint sample type works.
|
||||
utils::MakeBindGroupLayout(device,
|
||||
{
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::TextureSampleType::Sint,
|
||||
wgpu::TextureViewDimension::e2D, true},
|
||||
});
|
||||
|
||||
// Multisampled depth comparison component typeworks.
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroupLayout(
|
||||
device, {
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::TextureSampleType::Depth,
|
||||
wgpu::TextureViewDimension::e2D, true},
|
||||
}));
|
||||
// Multisampled depth sample type works.
|
||||
utils::MakeBindGroupLayout(device,
|
||||
{
|
||||
{0, wgpu::ShaderStage::Compute, wgpu::TextureSampleType::Depth,
|
||||
wgpu::TextureViewDimension::e2D, true},
|
||||
});
|
||||
}
|
||||
|
||||
constexpr uint64_t kBufferSize = 3 * kMinUniformBufferOffsetAlignment + 8;
|
||||
|
||||
Reference in New Issue
Block a user