[Mesa-dev] [PATCH 01/11] mesa: fix glGet for EXT_gpu_shader4

Marek Olšák maraeo at gmail.com
Wed Aug 8 05:41:58 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

---
 src/mapi/glapi/gen/EXT_gpu_shader4.xml | 4 ----
 src/mesa/main/get.c                    | 3 ++-
 src/mesa/main/get_hash_params.py       | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
index b4120b9c192..55437c0de2c 100644
--- a/src/mapi/glapi/gen/EXT_gpu_shader4.xml
+++ b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
@@ -25,24 +25,20 @@
     <enum name="INT_SAMPLER_BUFFER_EXT"                 value="0x8DD0"/>
     <enum name="UNSIGNED_INT_SAMPLER_1D_EXT"            value="0x8DD1"/>
     <enum name="UNSIGNED_INT_SAMPLER_2D_EXT"            value="0x8DD2"/>
     <enum name="UNSIGNED_INT_SAMPLER_3D_EXT"            value="0x8DD3"/>
     <enum name="UNSIGNED_INT_SAMPLER_CUBE_EXT"          value="0x8DD4"/>
     <enum name="UNSIGNED_INT_SAMPLER_2D_RECT_EXT"       value="0x8DD5"/>
     <enum name="UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT"      value="0x8DD6"/>
     <enum name="UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT"      value="0x8DD7"/>
     <enum name="UNSIGNED_INT_SAMPLER_BUFFER_EXT"        value="0x8DD8"/>
 
-    <!-- There is no MIN_PROGRAM_TEXEL_OFFSET_EXT in glext.h.  There is
-         MIN_PROGRAM_TEXEL_OFFSET_NV and MIN_PROGRAM_TEXEL_OFFSET (OpenGL
-         3.0).  Same goes for MAX_PROGRAM_TEXEL_OFFSET_EXT.
-    -->
     <enum name="MIN_PROGRAM_TEXEL_OFFSET"               value="0x8904">
         <size name="Get" mode="get"/>
     </enum>
     <enum name="MAX_PROGRAM_TEXEL_OFFSET"               value="0x8905">
         <size name="Get" mode="get"/>
     </enum>
 
 
     <function name="VertexAttribI1iEXT" exec="dynamic">
         <param name="index" type="GLuint"/>
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f870b217db5..f31d7f838b0 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -308,23 +308,24 @@ static const int extra_flush_current[] = {
    EXTRA_FLUSH_CURRENT,
    EXTRA_END
 };
 
 static const int extra_EXT_texture_integer_and_new_buffers[] = {
    EXT(EXT_texture_integer),
    EXTRA_NEW_BUFFERS,
    EXTRA_END
 };
 
-static const int extra_GLSL_130_es3[] = {
+static const int extra_GLSL_130_es3_gpushader4[] = {
    EXTRA_GLSL_130,
    EXTRA_API_ES3,
+   EXT(EXT_gpu_shader4),
    EXTRA_END
 };
 
 static const int extra_texture_buffer_object[] = {
    EXT(ARB_texture_buffer_object),
    EXTRA_END
 };
 
 static const int extra_ARB_transform_feedback2_api_es3[] = {
    EXT(ARB_transform_feedback2),
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 5c672a33123..f11e6778214 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -429,22 +429,22 @@ descriptor=[
 
 # GL_ARB_vertex_shader
   [ "MAX_VERTEX_UNIFORM_COMPONENTS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents), extra_ARB_vertex_shader" ],
   [ "MAX_VARYING_FLOATS_ARB", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_vertex_shader" ],
 
 # GL_EXT_framebuffer_blit
 # NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT
   [ "READ_FRAMEBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
 
 # GL_EXT_gpu_shader4 / GLSL 1.30
-  [ "MIN_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MinProgramTexelOffset), extra_GLSL_130_es3" ],
-  [ "MAX_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MaxProgramTexelOffset), extra_GLSL_130_es3" ],
+  [ "MIN_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MinProgramTexelOffset), extra_GLSL_130_es3_gpushader4" ],
+  [ "MAX_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MaxProgramTexelOffset), extra_GLSL_130_es3_gpushader4" ],
 
 # GL_EXT_pixel_buffer_object
   [ "PIXEL_PACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object" ],
   [ "PIXEL_UNPACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object" ],
 
   # GL_EXT_texture_array
   [ "TEXTURE_BINDING_2D_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_ARRAY_INDEX, extra_EXT_texture_array_es3" ],
   [ "MAX_ARRAY_TEXTURE_LAYERS_EXT", "CONTEXT_INT(Const.MaxArrayTextureLayers), extra_EXT_texture_array_es3" ],
 
 # GL_EXT_transform_feedback
-- 
2.17.1



More information about the mesa-dev mailing list