Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle a missed GL_HALF_FLOAT vs GL_HALF_FLOAT_OES case. #2646

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions gapis/api/gles/api/image_format.api
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ sub GLenum GetSizedFormatFromTuple(GLenum unsizedFormat, GLenum type) {
case GL_RED_EXT: switch type {
case GL_UNSIGNED_BYTE: GL_R8
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_R16F
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_R16F
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_R32F
default: GL_NONE
Expand All @@ -428,7 +428,7 @@ sub GLenum GetSizedFormatFromTuple(GLenum unsizedFormat, GLenum type) {
case GL_RG_EXT: switch type {
case GL_UNSIGNED_BYTE: GL_RG8
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_RG16F
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_RG16F
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_RG32F
default: GL_NONE
Expand All @@ -439,7 +439,7 @@ sub GLenum GetSizedFormatFromTuple(GLenum unsizedFormat, GLenum type) {
@if(Extension.GL_EXT_texture_type_2_10_10_10_REV)
case GL_UNSIGNED_INT_2_10_10_10_REV: GL_RGB10
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_RGB16F
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_RGB16F
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_RGB32F
default: GL_NONE
Expand All @@ -451,7 +451,7 @@ sub GLenum GetSizedFormatFromTuple(GLenum unsizedFormat, GLenum type) {
@if(Extension.GL_EXT_texture_type_2_10_10_10_REV)
case GL_UNSIGNED_INT_2_10_10_10_REV: GL_RGB10_A2
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_RGBA16F
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_RGBA16F
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_RGBA32F
default: GL_NONE
Expand All @@ -470,23 +470,23 @@ sub GLenum GetSizedFormatFromTuple(GLenum unsizedFormat, GLenum type) {
case GL_LUMINANCE_ALPHA: switch type {
case GL_UNSIGNED_BYTE: GL_LUMINANCE8_ALPHA8_EXT
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_LUMINANCE_ALPHA16F_EXT
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_LUMINANCE_ALPHA16F_EXT
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_LUMINANCE_ALPHA32F_EXT
default: GL_NONE
}
case GL_LUMINANCE: switch type {
case GL_UNSIGNED_BYTE: GL_LUMINANCE8_EXT
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_LUMINANCE16F_EXT
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_LUMINANCE16F_EXT
@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_LUMINANCE32F_EXT
default: GL_NONE
}
case GL_ALPHA: switch type {
case GL_UNSIGNED_BYTE: GL_ALPHA8_EXT
@if(Extension.GL_OES_texture_half_float)
case GL_HALF_FLOAT_OES: GL_ALPHA16F_EXT
case GL_HALF_FLOAT, GL_HALF_FLOAT_OES: GL_ALPHA16F_EXT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't CheckTextureDataType (line 503) need update as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. that one already handles both constants. Make sure to read through the whole function to notice.

@if(Extension.GL_OES_texture_float)
case GL_FLOAT: GL_ALPHA32F_EXT
default: GL_NONE
Expand Down