Reland "Add ComparisonSampler binding type and validation tests"

This is a reland of 6d9e4f8076
Now that the Chromium-side API change has landed, this CL can land.

Original change's description:
> Add ComparisonSampler binding type and validation tests
>
> Bug: dawn:367
> Change-Id: Iba1d3d03f6247a356b6f3fabfe7a7ba3c0753171
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18423
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:367
TBR=cwallez@chromium.org,kainino@chromium.org
Change-Id: I325d096e7ce092d17833429c3f54ef7c71189739
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20045
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2020-04-20 23:43:20 +00:00
committed by Commit Bot service account
parent 7e8385c183
commit 7817a9aafe
26 changed files with 199 additions and 30 deletions

View File

@@ -280,7 +280,8 @@ namespace dawn_native { namespace opengl {
break;
}
case wgpu::BindingType::Sampler: {
case wgpu::BindingType::Sampler:
case wgpu::BindingType::ComparisonSampler: {
Sampler* sampler = ToBackend(group->GetBindingAsSampler(bindingIndex));
GLuint samplerIndex = indices[bindingIndex];

View File

@@ -136,6 +136,7 @@ namespace dawn_native { namespace opengl {
}
case wgpu::BindingType::Sampler:
case wgpu::BindingType::ComparisonSampler:
case wgpu::BindingType::SampledTexture:
// These binding types are handled in the separate sampler and texture
// emulation

View File

@@ -38,6 +38,7 @@ namespace dawn_native { namespace opengl {
uboIndex++;
break;
case wgpu::BindingType::Sampler:
case wgpu::BindingType::ComparisonSampler:
mIndexInfo[group][bindingIndex] = samplerIndex;
samplerIndex++;
break;