Remove sampler border color from Dawn to match WebGPU

Bug: chromium:877147
Change-Id: I9760b3c6cb67a3ffa08feeaff8e8b24b80ec4200
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6380
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2019-04-09 15:12:50 +00:00
committed by Commit Bot service account
parent 865cad89b9
commit 5f1d2e1c8d
12 changed files with 4 additions and 91 deletions

View File

@@ -65,17 +65,11 @@ namespace dawn_native { namespace opengl {
return GL_MIRRORED_REPEAT;
case dawn::AddressMode::ClampToEdge:
return GL_CLAMP_TO_EDGE;
case dawn::AddressMode::ClampToBorderColor:
return GL_CLAMP_TO_BORDER;
default:
UNREACHABLE();
}
}
static const float kTransparentBlack[4] = {0.0, 0.0, 0.0, 0.0};
static const float kOpaqueBlack[4] = {0.0, 0.0, 0.0, 1.0};
static const float kOpaqueWhite[4] = {1.0, 1.0, 1.0, 1.0};
} // namespace
Sampler::Sampler(Device* device, const SamplerDescriptor* descriptor)
@@ -96,20 +90,6 @@ namespace dawn_native { namespace opengl {
glSamplerParameteri(mHandle, GL_TEXTURE_COMPARE_FUNC,
ToOpenGLCompareFunction(descriptor->compareFunction));
}
switch (descriptor->borderColor) {
case dawn::BorderColor::TransparentBlack:
glSamplerParameterfv(mHandle, GL_TEXTURE_BORDER_COLOR, kTransparentBlack);
break;
case dawn::BorderColor::OpaqueBlack:
glSamplerParameterfv(mHandle, GL_TEXTURE_BORDER_COLOR, kOpaqueBlack);
break;
case dawn::BorderColor::OpaqueWhite:
glSamplerParameterfv(mHandle, GL_TEXTURE_BORDER_COLOR, kOpaqueWhite);
break;
default:
UNREACHABLE();
}
}
GLuint Sampler::GetHandle() const {