Add default Undefined sampler compare function

Bug: dawn:367
Change-Id: I27ee54b0117c90dd554690e4fabc939d679c4005
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18422
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2020-04-17 19:32:07 +00:00
committed by Commit Bot service account
parent f93791ab62
commit d6a5431304
8 changed files with 54 additions and 36 deletions

View File

@@ -110,7 +110,7 @@ namespace dawn_native { namespace opengl {
gl.SamplerParameterf(sampler, GL_TEXTURE_MIN_LOD, descriptor->lodMinClamp);
gl.SamplerParameterf(sampler, GL_TEXTURE_MAX_LOD, descriptor->lodMaxClamp);
if (ToOpenGLCompareFunction(descriptor->compare) != GL_NEVER) {
if (descriptor->compare != wgpu::CompareFunction::Undefined) {
gl.SamplerParameteri(sampler, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
gl.SamplerParameteri(sampler, GL_TEXTURE_COMPARE_FUNC,
ToOpenGLCompareFunction(descriptor->compare));