Add texture rectangle extension.
This is needed to support binding IOSurfaces to textures on OSX. This
commit adds support in the API and tests, but didn't need to implement
compiler changes as it already supported ARB_texture_rectangle.
Implementation of CHROMIUM_opy_texture for rectangle texture and the
spec are left for follow-up commits.
Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867
Reviewed-on: https://chromium-review.googlesource.com/559106
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/common/utilities.cpp b/src/common/utilities.cpp
index 156bbfb..427e55e 100644
--- a/src/common/utilities.cpp
+++ b/src/common/utilities.cpp
@@ -124,6 +124,7 @@
return GL_FLOAT;
case GL_INT:
case GL_SAMPLER_2D:
+ case GL_SAMPLER_2D_RECT_ANGLE:
case GL_SAMPLER_3D:
case GL_SAMPLER_CUBE:
case GL_SAMPLER_2D_ARRAY:
@@ -251,7 +252,7 @@
case GL_SAMPLER_CUBE:
case GL_SAMPLER_2D_ARRAY:
case GL_SAMPLER_EXTERNAL_OES:
- case GL_SAMPLER_2D_RECT_ARB:
+ case GL_SAMPLER_2D_RECT_ANGLE:
case GL_SAMPLER_2D_MULTISAMPLE:
case GL_INT_SAMPLER_2D:
case GL_INT_SAMPLER_3D:
@@ -321,7 +322,7 @@
case GL_INT_SAMPLER_2D_ARRAY:
case GL_INT_SAMPLER_2D_MULTISAMPLE:
case GL_SAMPLER_EXTERNAL_OES:
- case GL_SAMPLER_2D_RECT_ARB:
+ case GL_SAMPLER_2D_RECT_ANGLE:
case GL_UNSIGNED_INT_SAMPLER_2D:
case GL_UNSIGNED_INT_SAMPLER_3D:
case GL_UNSIGNED_INT_SAMPLER_CUBE:
@@ -385,6 +386,7 @@
case GL_SAMPLER_2D_ARRAY:
case GL_SAMPLER_EXTERNAL_OES:
case GL_SAMPLER_2D_MULTISAMPLE:
+ case GL_SAMPLER_2D_RECT_ANGLE:
case GL_INT_SAMPLER_2D:
case GL_INT_SAMPLER_3D:
case GL_INT_SAMPLER_CUBE:
@@ -471,6 +473,9 @@
case GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE:
return GL_TEXTURE_2D_MULTISAMPLE;
+ case GL_SAMPLER_2D_RECT_ANGLE:
+ return GL_TEXTURE_RECTANGLE_ANGLE;
+
default:
UNREACHABLE();
return 0;
@@ -694,7 +699,7 @@
case GL_SAMPLER_2D:
case GL_SAMPLER_CUBE:
case GL_SAMPLER_EXTERNAL_OES:
- case GL_SAMPLER_2D_RECT_ARB:
+ case GL_SAMPLER_2D_RECT_ANGLE:
case GL_SAMPLER_2D_ARRAY:
case GL_SAMPLER_2D_MULTISAMPLE:
case GL_SAMPLER_3D: