mesa: add texture gather changes
authorMaxence Le Dore <maxence.ledore@gmail.com>
Sun, 23 Dec 2012 23:57:02 +0000 (00:57 +0100)
committerChris Forbes <chrisf@ijw.co.nz>
Wed, 2 Oct 2013 18:55:51 +0000 (07:55 +1300)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mapi/glapi/gen/ARB_texture_gather.xml [new file with mode: 0644]
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/context.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/tests/enum_strings.cpp

diff --git a/src/mapi/glapi/gen/ARB_texture_gather.xml b/src/mapi/glapi/gen/ARB_texture_gather.xml
new file mode 100644 (file)
index 0000000..01c7b88
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_texture_gather" number="72">
+
+ <enum name="MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB" value="0x8E5E"/>
+ <enum name="MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB" value="0x8E5F"/>
+ <enum name="MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB" value="0x8F9F"/>
+
+</category>
+
+</OpenGLAPI>
index f6511e9878ebe4e08da130a77bb778a3f392ee8b..3ffa81787562416ff56f0f184363ca7497e91d46 100644 (file)
 
 <!-- 70. GL_ARB_sample_shading -->
 <xi:include href="ARB_texture_cube_map_array.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<!-- 72. GL_ARB_texture_gather -->
+<xi:include href="ARB_texture_gather.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 <!-- 73. GL_ARB_texture_query_lod -->
 
 <!-- ARB extension number 74 is a WGL extension. -->
index 310518c92f4b57a3d450fac6d53cb53bcdf311df..0d1f71c7142450318da3d6ce7c8a090927efbf85 100644 (file)
@@ -652,6 +652,10 @@ _mesa_init_constants(struct gl_context *ctx)
    ctx->Const.MinProgramTexelOffset = -8;
    ctx->Const.MaxProgramTexelOffset = 7;
 
+   /* GL_ARB_texture_gather */
+   ctx->Const.MinProgramTextureGatherOffset = -8;
+   ctx->Const.MaxProgramTextureGatherOffset = 7;
+
    /* GL_ARB_robustness */
    ctx->Const.ResetStrategy = GL_NO_RESET_NOTIFICATION_ARB;
 
index 51a8051e2e914b7075411175f88f429551f4349c..c0f17c5fd0385045f9086430efb6beaaed5be18f 100644 (file)
@@ -142,6 +142,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_texture_env_crossbar",                o(ARB_texture_env_crossbar),                GLL,            2001 },
    { "GL_ARB_texture_env_dot3",                    o(ARB_texture_env_dot3),                    GLL,            2001 },
    { "GL_ARB_texture_float",                       o(ARB_texture_float),                       GL,             2004 },
+   { "GL_ARB_texture_gather",                      o(ARB_texture_gather),                      GL,             2009 },
    { "GL_ARB_texture_mirrored_repeat",             o(dummy_true),                              GLL,            2001 },
    { "GL_ARB_texture_multisample",                 o(ARB_texture_multisample),                 GL,             2009 },
    { "GL_ARB_texture_non_power_of_two",            o(ARB_texture_non_power_of_two),            GL,             2003 },
index 7af5f5591a4b2c058e0edd16f0df0a0dbef2beaf..89b3bf09ddb3168a6acdff9a1c4e57f0d4dacbc4 100644 (file)
@@ -366,6 +366,7 @@ EXTRA_EXT(ARB_map_buffer_alignment);
 EXTRA_EXT(ARB_texture_cube_map_array);
 EXTRA_EXT(ARB_texture_buffer_range);
 EXTRA_EXT(ARB_texture_multisample);
+EXTRA_EXT(ARB_texture_gather);
 
 static const int
 extra_ARB_color_buffer_float_or_glcore[] = {
index 8147dd0b8573d44db98aea0fa04a182e120fb382..29cad26ff28eddb474987622aaf08d9fdc20d952 100644 (file)
@@ -716,6 +716,12 @@ descriptor=[
 
 # GL_ARB_texture_cube_map_array
   [ "TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB", "LOC_CUSTOM, TYPE_INT, TEXTURE_CUBE_ARRAY_INDEX, extra_ARB_texture_cube_map_array" ],
+
+# GL_ARB_texture_gather
+  [ "MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB", "CONTEXT_INT(Const.MinProgramTextureGatherOffset), extra_ARB_texture_gather"],
+  [ "MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB", "CONTEXT_INT(Const.MaxProgramTextureGatherOffset), extra_ARB_texture_gather"],
+  [ "MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxProgramTextureGatherComponents), extra_ARB_texture_gather"],
+
 ]},
 
 # Enums restricted to OpenGL Core profile
index d82672dc99ac3067381df1af4643b3bb9818b396..3d414d5e76e7880d27e2ade6714923360efb1f52 100644 (file)
@@ -3081,6 +3081,11 @@ struct gl_constants
    /** GL_EXT_gpu_shader4 */
    GLint MinProgramTexelOffset, MaxProgramTexelOffset;
 
+   /** GL_ARB_texture_gather */
+   GLuint MinProgramTextureGatherOffset;
+   GLuint MaxProgramTextureGatherOffset;
+   GLuint MaxProgramTextureGatherComponents;
+
    /* GL_ARB_robustness */
    GLenum ResetStrategy;
 
@@ -3210,6 +3215,7 @@ struct gl_extensions
    GLboolean ARB_texture_env_crossbar;
    GLboolean ARB_texture_env_dot3;
    GLboolean ARB_texture_float;
+   GLboolean ARB_texture_gather;
    GLboolean ARB_texture_multisample;
    GLboolean ARB_texture_non_power_of_two;
    GLboolean ARB_texture_query_lod;
index c8df8195644ed635e4a0b6e92830d91c17f7d44e..6994f79fee511b29da652a912b49c50101b3a171 100644 (file)
@@ -1770,6 +1770,8 @@ const struct enum_info everything[] = {
    { 0x8E51, "GL_SAMPLE_MASK" },
    { 0x8E52, "GL_SAMPLE_MASK_VALUE" },
    { 0x8E59, "GL_MAX_SAMPLE_MASK_WORDS" },
+   { 0x8E5E, "GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET" },
+   { 0x8E5F, "GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET" },
    { 0x8F36, "GL_COPY_READ_BUFFER" },
    { 0x8F37, "GL_COPY_WRITE_BUFFER" },
    { 0x8F90, "GL_RED_SNORM" },
@@ -1787,6 +1789,7 @@ const struct enum_info everything[] = {
    { 0x8F9C, "GL_SIGNED_NORMALIZED" },
    { 0x8F9D, "GL_PRIMITIVE_RESTART" },
    { 0x8F9E, "GL_PRIMITIVE_RESTART_INDEX" },
+   { 0x8F9F, "GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS" },
    { 0x906F, "GL_RGB10_A2UI" },
    { 0x9100, "GL_TEXTURE_2D_MULTISAMPLE" },
    { 0x9101, "GL_PROXY_TEXTURE_2D_MULTISAMPLE" },