GL_HALF_FLOAT vs GL_HALF_FLOAT_OES
GL_HALF_FLOAT and GL_HALF_FLOAT_OES
do not have the same value, so to
be able to support GL_HALF_FLOAT
(in OpenGL ES 3.0) the same way we
used to support GL_HALF_FLOAT_OES
(in OpenGL ES 2.0), a few spots in
the code need to handle both cases.
Change-Id: I1fa60c51c65d693f5cc45124cd71411320f24014
Reviewed-on: https://swiftshader-review.googlesource.com/3192
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/common/Image.cpp b/src/OpenGL/common/Image.cpp
index 9dd58d5..a0e93ce 100644
--- a/src/OpenGL/common/Image.cpp
+++ b/src/OpenGL/common/Image.cpp
@@ -378,6 +378,7 @@
default: UNREACHABLE();
}
break;
+ case GL_HALF_FLOAT:
case GL_HALF_FLOAT_OES:
switch(format)
{
@@ -503,7 +504,7 @@
{
return sw::FORMAT_A32B32G32R32F;
}
- else if(type == GL_HALF_FLOAT_OES)
+ else if(type == GL_HALF_FLOAT || type == GL_HALF_FLOAT_OES)
{
return sw::FORMAT_A16B16G16R16F;
}
@@ -650,6 +651,7 @@
default: UNREACHABLE();
}
break;
+ case GL_HALF_FLOAT:
case GL_HALF_FLOAT_OES:
switch(format)
{