Support GL_OES_texture_border_clamp
Added support for GL_TEXTURE_BORDER_COLOR and GL_CLAMP_TO_BORDER in
OpenGL/OpenGLES, Direct3D9 and Direct3D11 backends.
For integer textures in OpenGLES3 contexts these additional entry points
are available now:
void glTexParameterIivOES(enum target, enum pname, const int *params);
void glTexParameterIuivOES(enum target, enum pname, const uint *params);
void glGetTexParameterIivOES(enum target, enum pname, int *params);
void glGetTexParameterIuivOES(enum target, enum pname, uint *params);
void glSamplerParameterIivOES(uint sampler, enum pname, const int *params);
void glSamplerParameterIuivOES(uint sampler, enum pname, const uint *params);
void glGetSamplerParameterIivOES(uint sampler, enum pname, int *params);
void glGetSamplerParameterIuivOES(uint sampler, enum pname, uint *params);
BUG=angleproject:2890
TEST=angle_end2end_tests.TextureBorderClamp*
Change-Id: Iee3eeb399d8d7851b3b30694ad8f21a2111f5828
Reviewed-on: https://chromium-review.googlesource.com/c/1257824
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index cd2a286..d5719fc 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -4023,9 +4023,35 @@
return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
}
+bool ValidateGetSamplerParameterIivOES(Context *context,
+ GLuint sampler,
+ GLenum pname,
+ const GLint *params)
+{
+ if (context->getClientMajorVersion() < 3)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidOperation(), ES3Required);
+ return false;
+ }
+ return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
+}
+
+bool ValidateGetSamplerParameterIuivOES(Context *context,
+ GLuint sampler,
+ GLenum pname,
+ const GLuint *params)
+{
+ if (context->getClientMajorVersion() < 3)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidOperation(), ES3Required);
+ return false;
+ }
+ return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
+}
+
bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param)
{
- return ValidateSamplerParameterBase(context, sampler, pname, -1, ¶m);
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, false, ¶m);
}
bool ValidateSamplerParameterfv(Context *context,
@@ -4033,17 +4059,43 @@
GLenum pname,
const GLfloat *params)
{
- return ValidateSamplerParameterBase(context, sampler, pname, -1, params);
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
}
bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param)
{
- return ValidateSamplerParameterBase(context, sampler, pname, -1, ¶m);
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, false, ¶m);
}
bool ValidateSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, const GLint *params)
{
- return ValidateSamplerParameterBase(context, sampler, pname, -1, params);
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
+}
+
+bool ValidateSamplerParameterIivOES(Context *context,
+ GLuint sampler,
+ GLenum pname,
+ const GLint *params)
+{
+ if (context->getClientMajorVersion() < 3)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidOperation(), ES3Required);
+ return false;
+ }
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
+}
+
+bool ValidateSamplerParameterIuivOES(Context *context,
+ GLuint sampler,
+ GLenum pname,
+ const GLuint *params)
+{
+ if (context->getClientMajorVersion() < 3)
+ {
+ ANGLE_VALIDATION_ERR(context, InvalidOperation(), ES3Required);
+ return false;
+ }
+ return ValidateSamplerParameterBase(context, sampler, pname, -1, true, params);
}
bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params)