diff options
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r-- | mesalib/src/mesa/main/context.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/extensions.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/main/get.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/main/get_hash_params.py | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mtypes.h | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 3 |
6 files changed, 23 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 310518c92..0d1f71c71 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -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; diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 51a8051e2..c0f17c5fd 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -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 }, diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 7af5f5591..89b3bf09d 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -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[] = { diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py index 8147dd0b8..e80a23c11 100644 --- a/mesalib/src/mesa/main/get_hash_params.py +++ b/mesalib/src/mesa/main/get_hash_params.py @@ -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", "CONTEXT_INT(Const.MinProgramTextureGatherOffset), extra_ARB_texture_gather"], + [ "MAX_PROGRAM_TEXTURE_GATHER_OFFSET", "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 diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index d82672dc9..514f81048 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -1963,6 +1963,8 @@ struct gl_program GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */ GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */ + GLboolean UsesGather; /**< Does this program use gather4 at all? */ + /** Named parameters, constants, etc. from program text */ struct gl_program_parameter_list *Parameters; @@ -3081,6 +3083,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 +3217,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; diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index b08107b1c..f180a7f64 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -2066,6 +2066,9 @@ ir_to_mesa_visitor::visit(ir_texture *ir) case ir_lod: assert(!"Unexpected ir_lod opcode"); break; + case ir_tg4: + assert(!"Unexpected ir_tg4 opcode"); + break; } const glsl_type *sampler_type = ir->sampler->type; |