Module: Mesa Branch: master Commit: fd104096c61328933723ba807771f6862f1d42df URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd104096c61328933723ba807771f6862f1d42df
Author: Adam Jackson <[email protected]> Date: Wed Dec 18 10:40:38 2019 -0500 mesa: Implement GL_ANGLE_pack_reverse_row_order Identical to GL_MESA_pack_invert in effect, just need to check for a different enum value for GLES vs GL. The spec claims that "OpenGL 1.5 or OpenGL ES 1.0 are required", but ReadPixels isn't a thing for ES1 so we only enable it for ES2+. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3156> --- src/mapi/glapi/gen/es_EXT.xml | 5 +++++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/get_hash_params.py | 2 ++ src/mesa/main/glheader.h | 4 ++++ src/mesa/main/pixelstore.c | 5 +++++ 5 files changed, 17 insertions(+) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index dd987b8dc8f..4386375940f 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -819,6 +819,11 @@ <xi:include href="EXT_multisampled_render_to_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> +<!-- 110. GL_ANGLE_pack_reverse_row_order --> +<category name="GL_ANGLE_pack_reverse_row_order" number="110"> + <enum name="PACK_REVERSE_ROW_ORDER_ANGLE" value="0x93A4"/> +</category> + <!-- 111. GL_ANGLE_texture_compression_dxt --> <category name="GL_ANGLE_texture_compression_dxt" number="111"> <enum name="COMPRESSED_RGBA_S3TC_DXT3_ANGLE" value="0x83F2"/> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index f7238c100b7..14b0b8df677 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -27,6 +27,7 @@ EXT(AMD_vertex_shader_viewport_index , AMD_vertex_shader_viewport_index EXT(ANDROID_extension_pack_es31a , ANDROID_extension_pack_es31a , x , x , x , 31, 2014) +EXT(ANGLE_pack_reverse_row_order , dummy_true , x , x , x , ES2, 2011) EXT(ANGLE_texture_compression_dxt3 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2011) EXT(ANGLE_texture_compression_dxt5 , ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2011) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 657a22f147a..d9c0984f0ba 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -262,6 +262,8 @@ descriptor=[ # Enums in GLES2, GLES3 { "apis": ["GLES2", "GLES3"], "params": [ [ "GPU_DISJOINT_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_disjoint_timer_query" ], +# ANGLE_pack_reverse_row_order + [ "PACK_REVERSE_ROW_ORDER_ANGLE", "CONTEXT_BOOL(Pack.Invert), NO_EXTRA" ], ]}, { "apis": ["GL", "GL_CORE", "GLES2"], "params": [ diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 59ca1cbadfc..a7818d6a5b1 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -157,6 +157,10 @@ typedef int GLclampx; #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C #endif +#ifndef GL_ANGLE_pack_reverse_row_order +#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 +#endif + #ifdef __cplusplus } #endif diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c index d4ae7dd3c02..a439a98f12c 100644 --- a/src/mesa/main/pixelstore.c +++ b/src/mesa/main/pixelstore.c @@ -98,6 +98,11 @@ pixel_storei(GLenum pname, GLint param, bool no_error) goto invalid_enum_error; ctx->Pack.Invert = param; break; + case GL_PACK_REVERSE_ROW_ORDER_ANGLE: + if (!no_error && !_mesa_is_gles(ctx)) + goto invalid_enum_error; + ctx->Pack.Invert = param; + break; case GL_PACK_COMPRESSED_BLOCK_WIDTH: if (!no_error && !_mesa_is_desktop_gl(ctx)) goto invalid_enum_error; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
