mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 06:33:30 +00:00
Remove wgpu::BindingType::StorageTexture
It isn't in the upstream WebGPU spec and completely unimplemented in Dawn. Bug: dawn:527 Change-Id: I2023c7b1de2a9fa50d26ab1678b7ef7e32c64af6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28500 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
d6498a41ab
commit
c01b26490a
@ -118,8 +118,7 @@
|
|||||||
{"value": 4, "name": "comparison sampler"},
|
{"value": 4, "name": "comparison sampler"},
|
||||||
{"value": 5, "name": "sampled texture"},
|
{"value": 5, "name": "sampled texture"},
|
||||||
{"value": 6, "name": "readonly storage texture"},
|
{"value": 6, "name": "readonly storage texture"},
|
||||||
{"value": 7, "name": "writeonly storage texture"},
|
{"value": 7, "name": "writeonly storage texture"}
|
||||||
{"value": 8, "name": "storage texture"}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"blend descriptor": {
|
"blend descriptor": {
|
||||||
|
@ -223,9 +223,6 @@ namespace dawn_native {
|
|||||||
DAWN_TRY(ValidateTextureBinding(device, entry, wgpu::TextureUsage::Storage,
|
DAWN_TRY(ValidateTextureBinding(device, entry, wgpu::TextureUsage::Storage,
|
||||||
bindingInfo));
|
bindingInfo));
|
||||||
break;
|
break;
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,10 +47,6 @@ namespace dawn_native {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture: {
|
|
||||||
return DAWN_VALIDATION_ERROR("Read-write storage texture binding is not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
case wgpu::BindingType::UniformBuffer:
|
case wgpu::BindingType::UniformBuffer:
|
||||||
case wgpu::BindingType::ReadonlyStorageBuffer:
|
case wgpu::BindingType::ReadonlyStorageBuffer:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
@ -114,7 +110,6 @@ namespace dawn_native {
|
|||||||
case wgpu::BindingType::SampledTexture:
|
case wgpu::BindingType::SampledTexture:
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return {};
|
return {};
|
||||||
@ -158,7 +153,6 @@ namespace dawn_native {
|
|||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
return DAWN_VALIDATION_ERROR("Sampler bindings may not be multisampled");
|
return DAWN_VALIDATION_ERROR("Sampler bindings may not be multisampled");
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return {};
|
return {};
|
||||||
@ -248,8 +242,6 @@ namespace dawn_native {
|
|||||||
return DAWN_VALIDATION_ERROR("Storage textures cannot be dynamic");
|
return DAWN_VALIDATION_ERROR("Storage textures cannot be dynamic");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
return DAWN_VALIDATION_ERROR("storage textures aren't supported (yet)");
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
@ -293,7 +285,6 @@ namespace dawn_native {
|
|||||||
case wgpu::BindingType::SampledTexture:
|
case wgpu::BindingType::SampledTexture:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
return false;
|
return false;
|
||||||
|
@ -58,7 +58,6 @@ namespace dawn_native {
|
|||||||
perStageBindingCountMember = &PerStageBindingCounts::storageTextureCount;
|
perStageBindingCountMember = &PerStageBindingCounts::storageTextureCount;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
|
@ -42,10 +42,6 @@ namespace dawn_native {
|
|||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
return wgpu::ShaderStage::Fragment | wgpu::ShaderStage::Compute;
|
return wgpu::ShaderStage::Fragment | wgpu::ShaderStage::Compute;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
return wgpu::ShaderStage::None;
|
|
||||||
|
|
||||||
case wgpu::BindingType::UniformBuffer:
|
case wgpu::BindingType::UniformBuffer:
|
||||||
case wgpu::BindingType::ReadonlyStorageBuffer:
|
case wgpu::BindingType::ReadonlyStorageBuffer:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
|
@ -74,10 +74,6 @@ namespace dawn_native {
|
|||||||
usageTracker->TextureViewUsedAs(view, wgpu::TextureUsage::Storage);
|
usageTracker->TextureViewUsedAs(view, wgpu::TextureUsage::Storage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,6 @@ namespace dawn_native {
|
|||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return DAWN_VALIDATION_ERROR("Unsupported binding type");
|
return DAWN_VALIDATION_ERROR("Unsupported binding type");
|
||||||
@ -571,14 +570,15 @@ namespace dawn_native {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wgpu::BindingType::StorageTexture: {
|
case wgpu::BindingType::ReadonlyStorageTexture: {
|
||||||
spirv_cross::Bitset flags = compiler.get_decoration_bitset(resource.id);
|
spirv_cross::Bitset flags = compiler.get_decoration_bitset(resource.id);
|
||||||
if (flags.get(spv::DecorationNonReadable)) {
|
if (flags.get(spv::DecorationNonReadable)) {
|
||||||
info->type = wgpu::BindingType::WriteonlyStorageTexture;
|
info->type = wgpu::BindingType::WriteonlyStorageTexture;
|
||||||
} else if (flags.get(spv::DecorationNonWritable)) {
|
} else if (flags.get(spv::DecorationNonWritable)) {
|
||||||
info->type = wgpu::BindingType::ReadonlyStorageTexture;
|
info->type = wgpu::BindingType::ReadonlyStorageTexture;
|
||||||
} else {
|
} else {
|
||||||
info->type = wgpu::BindingType::StorageTexture;
|
return DAWN_VALIDATION_ERROR(
|
||||||
|
"Read-write storage textures are not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
spirv_cross::SPIRType::ImageType imageType =
|
spirv_cross::SPIRType::ImageType imageType =
|
||||||
@ -619,8 +619,9 @@ namespace dawn_native {
|
|||||||
DAWN_TRY(ExtractResourcesBinding(device, resources.storage_buffers, compiler,
|
DAWN_TRY(ExtractResourcesBinding(device, resources.storage_buffers, compiler,
|
||||||
wgpu::BindingType::StorageBuffer,
|
wgpu::BindingType::StorageBuffer,
|
||||||
&metadata->bindings));
|
&metadata->bindings));
|
||||||
|
// ReadonlyStorageTexture is used as a tag to do general storage texture handling.
|
||||||
DAWN_TRY(ExtractResourcesBinding(device, resources.storage_images, compiler,
|
DAWN_TRY(ExtractResourcesBinding(device, resources.storage_images, compiler,
|
||||||
wgpu::BindingType::StorageTexture,
|
wgpu::BindingType::ReadonlyStorageTexture,
|
||||||
&metadata->bindings));
|
&metadata->bindings));
|
||||||
|
|
||||||
// Extract the vertex attributes
|
// Extract the vertex attributes
|
||||||
|
@ -138,12 +138,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
viewAllocation.OffsetFrom(viewSizeIncrement, bindingOffsets[bindingIndex]));
|
viewAllocation.OffsetFrom(viewSizeIncrement, bindingOffsets[bindingIndex]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
|
|
||||||
// TODO(shaobo.yan@intel.com): Implement dynamic buffer offset.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,9 +37,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
return BindGroupLayout::DescriptorType::Sampler;
|
return BindGroupLayout::DescriptorType::Sampler;
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
return BindGroupLayout::DescriptorType::UAV;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
@ -120,7 +117,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
case wgpu::BindingType::SampledTexture:
|
case wgpu::BindingType::SampledTexture:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
@ -295,9 +295,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
// Don't require barriers.
|
// Don't require barriers.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
// Not implemented.
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
@ -391,7 +388,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
case wgpu::BindingType::SampledTexture:
|
case wgpu::BindingType::SampledTexture:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
@ -51,7 +51,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
case wgpu::BindingType::SampledTexture:
|
case wgpu::BindingType::SampledTexture:
|
||||||
case wgpu::BindingType::Sampler:
|
case wgpu::BindingType::Sampler:
|
||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
@ -477,10 +477,6 @@ namespace dawn_native { namespace metal {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +57,6 @@ namespace dawn_native { namespace metal {
|
|||||||
mIndexInfo[stage][group][bindingIndex] = textureIndex;
|
mIndexInfo[stage][group][bindingIndex] = textureIndex;
|
||||||
textureIndex++;
|
textureIndex++;
|
||||||
break;
|
break;
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ namespace dawn_native { namespace opengl {
|
|||||||
case wgpu::BindingType::ComparisonSampler:
|
case wgpu::BindingType::ComparisonSampler:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
|
@ -348,12 +348,6 @@ namespace dawn_native { namespace opengl {
|
|||||||
texture->GetGLFormat().internalFormat);
|
texture->GetGLFormat().internalFormat);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
|
|
||||||
// TODO(shaobo.yan@intel.com): Implement dynamic buffer offset.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,10 +157,6 @@ namespace dawn_native { namespace opengl {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,12 +60,6 @@ namespace dawn_native { namespace opengl {
|
|||||||
mIndexInfo[group][bindingIndex] = storageTextureIndex;
|
mIndexInfo[group][bindingIndex] = storageTextureIndex;
|
||||||
storageTextureIndex++;
|
storageTextureIndex++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
UNREACHABLE();
|
|
||||||
break;
|
|
||||||
|
|
||||||
// TODO(shaobo.yan@intel.com): Implement dynamic buffer offset
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||||
case wgpu::BindingType::WriteonlyStorageTexture:
|
case wgpu::BindingType::WriteonlyStorageTexture:
|
||||||
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
|
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
@ -208,9 +208,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
// Don't require barriers.
|
// Don't require barriers.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wgpu::BindingType::StorageTexture:
|
|
||||||
// Not implemented.
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
break;
|
break;
|
||||||
|
@ -234,57 +234,36 @@ TEST_F(StorageTextureValidationTests, ComputePipeline) {
|
|||||||
TEST_F(StorageTextureValidationTests, ReadWriteStorageTexture) {
|
TEST_F(StorageTextureValidationTests, ReadWriteStorageTexture) {
|
||||||
// Read-write storage textures cannot be declared in a vertex shader by default.
|
// Read-write storage textures cannot be declared in a vertex shader by default.
|
||||||
{
|
{
|
||||||
wgpu::ShaderModule vsModule =
|
ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(
|
||||||
utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(
|
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
||||||
void main() {
|
void main() {
|
||||||
vec4 pixel = imageLoad(image0, ivec2(gl_VertexIndex, 0));
|
vec4 pixel = imageLoad(image0, ivec2(gl_VertexIndex, 0));
|
||||||
imageStore(image0, ivec2(gl_VertexIndex, 0), pixel * 2);
|
imageStore(image0, ivec2(gl_VertexIndex, 0), pixel * 2);
|
||||||
})");
|
})"));
|
||||||
|
|
||||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
|
||||||
descriptor.layout = nullptr;
|
|
||||||
descriptor.vertexStage.module = vsModule;
|
|
||||||
descriptor.cFragmentStage.module = mDefaultFSModule;
|
|
||||||
ASSERT_DEVICE_ERROR(device.CreateRenderPipeline(&descriptor));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read-write storage textures cannot be declared in a fragment shader by default.
|
// Read-write storage textures cannot be declared in a fragment shader by default.
|
||||||
{
|
{
|
||||||
wgpu::ShaderModule fsModule =
|
ASSERT_DEVICE_ERROR(
|
||||||
utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"(
|
utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"(
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
||||||
void main() {
|
void main() {
|
||||||
vec4 pixel = imageLoad(image0, ivec2(gl_FragCoord.xy));
|
vec4 pixel = imageLoad(image0, ivec2(gl_FragCoord.xy));
|
||||||
imageStore(image0, ivec2(gl_FragCoord.xy), pixel * 2);
|
imageStore(image0, ivec2(gl_FragCoord.xy), pixel * 2);
|
||||||
})");
|
})"));
|
||||||
|
|
||||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
|
||||||
descriptor.layout = nullptr;
|
|
||||||
descriptor.vertexStage.module = mDefaultVSModule;
|
|
||||||
descriptor.cFragmentStage.module = fsModule;
|
|
||||||
ASSERT_DEVICE_ERROR(device.CreateRenderPipeline(&descriptor));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read-write storage textures cannot be declared in a compute shader by default.
|
// Read-write storage textures cannot be declared in a compute shader by default.
|
||||||
{
|
{
|
||||||
wgpu::ShaderModule csModule =
|
ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, R"(
|
||||||
utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, R"(
|
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
layout(set = 0, binding = 0, rgba8) uniform image2D image0;
|
||||||
void main() {
|
void main() {
|
||||||
vec4 pixel = imageLoad(image0, ivec2(gl_LocalInvocationID.xy));
|
vec4 pixel = imageLoad(image0, ivec2(gl_LocalInvocationID.xy));
|
||||||
imageStore(image0, ivec2(gl_LocalInvocationID.xy), pixel * 2);
|
imageStore(image0, ivec2(gl_LocalInvocationID.xy), pixel * 2);
|
||||||
})");
|
})"));
|
||||||
|
|
||||||
wgpu::ComputePipelineDescriptor descriptor;
|
|
||||||
descriptor.layout = nullptr;
|
|
||||||
descriptor.computeStage.module = csModule;
|
|
||||||
descriptor.computeStage.entryPoint = "main";
|
|
||||||
|
|
||||||
ASSERT_DEVICE_ERROR(device.CreateComputePipeline(&descriptor));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,16 +275,13 @@ TEST_F(StorageTextureValidationTests, BindGroupLayoutWithStorageTextureBindingTy
|
|||||||
wgpu::BindingType type;
|
wgpu::BindingType type;
|
||||||
bool valid;
|
bool valid;
|
||||||
};
|
};
|
||||||
constexpr std::array<TestSpec, 9> kTestSpecs = {
|
constexpr std::array<TestSpec, 6> kTestSpecs = {
|
||||||
{{wgpu::ShaderStage::Vertex, wgpu::BindingType::ReadonlyStorageTexture, true},
|
{{wgpu::ShaderStage::Vertex, wgpu::BindingType::ReadonlyStorageTexture, true},
|
||||||
{wgpu::ShaderStage::Vertex, wgpu::BindingType::WriteonlyStorageTexture, false},
|
{wgpu::ShaderStage::Vertex, wgpu::BindingType::WriteonlyStorageTexture, false},
|
||||||
{wgpu::ShaderStage::Vertex, wgpu::BindingType::StorageTexture, false},
|
|
||||||
{wgpu::ShaderStage::Fragment, wgpu::BindingType::ReadonlyStorageTexture, true},
|
{wgpu::ShaderStage::Fragment, wgpu::BindingType::ReadonlyStorageTexture, true},
|
||||||
{wgpu::ShaderStage::Fragment, wgpu::BindingType::WriteonlyStorageTexture, true},
|
{wgpu::ShaderStage::Fragment, wgpu::BindingType::WriteonlyStorageTexture, true},
|
||||||
{wgpu::ShaderStage::Fragment, wgpu::BindingType::StorageTexture, false},
|
|
||||||
{wgpu::ShaderStage::Compute, wgpu::BindingType::ReadonlyStorageTexture, true},
|
{wgpu::ShaderStage::Compute, wgpu::BindingType::ReadonlyStorageTexture, true},
|
||||||
{wgpu::ShaderStage::Compute, wgpu::BindingType::WriteonlyStorageTexture, true},
|
{wgpu::ShaderStage::Compute, wgpu::BindingType::WriteonlyStorageTexture, true}}};
|
||||||
{wgpu::ShaderStage::Compute, wgpu::BindingType::StorageTexture, false}}};
|
|
||||||
|
|
||||||
for (const auto& testSpec : kTestSpecs) {
|
for (const auto& testSpec : kTestSpecs) {
|
||||||
wgpu::BindGroupLayoutEntry entry = {0, testSpec.stage, testSpec.type};
|
wgpu::BindGroupLayoutEntry entry = {0, testSpec.stage, testSpec.type};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user