Commit 85c4f9e0 by Alexis Hetu Committed by Alexis Hétu

Added floating point formats to glCopyTexImage2D

Added floating point formats to validateColorBufferFormat, which is used by glCopyTexImage2D, since it was a missing part of the previously added floating point extensions. From the extension spec: https://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_half_float.txt "9. Should CopyTex[Sub]Image be supported for floating-point formats? [...] Yes." Change-Id: Ie14d8afd352b004e8a2400cfef16facdeab94e33 Reviewed-on: https://swiftshader-review.googlesource.com/5110Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent f4fbcb8d
......@@ -73,7 +73,9 @@ static bool validateColorBufferFormat(GLenum textureFormat, GLenum colorbufferFo
colorbufferFormat != GL_RGBA &&
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_RGBA16F_EXT &&
colorbufferFormat != GL_RGBA32F_EXT)
{
return error(GL_INVALID_OPERATION, false);
}
......@@ -86,7 +88,11 @@ static bool validateColorBufferFormat(GLenum textureFormat, GLenum colorbufferFo
colorbufferFormat != GL_RGBA &&
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_RGB16F_EXT &&
colorbufferFormat != GL_RGB32F_EXT &&
colorbufferFormat != GL_RGBA16F_EXT &&
colorbufferFormat != GL_RGBA32F_EXT)
{
return error(GL_INVALID_OPERATION, false);
}
......@@ -96,7 +102,9 @@ static bool validateColorBufferFormat(GLenum textureFormat, GLenum colorbufferFo
if(colorbufferFormat != GL_RGBA &&
colorbufferFormat != GL_RGBA4 &&
colorbufferFormat != GL_RGB5_A1 &&
colorbufferFormat != GL_RGBA8_OES)
colorbufferFormat != GL_RGBA8_OES &&
colorbufferFormat != GL_RGBA16F_EXT &&
colorbufferFormat != GL_RGBA32F_EXT)
{
return error(GL_INVALID_OPERATION, false);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment