From 3b82ceec677e875d2f2f9edbcfceafd4d9a85cb7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Oct 2010 21:17:42 -0600 Subject: mesa: state/queries for GL_MIN/MAX_PROGRAM_TEXEL_OFFSET_EXT --- src/mesa/main/context.c | 4 ++++ src/mesa/main/get.c | 13 +++++++++++++ src/mesa/main/mtypes.h | 3 +++ 3 files changed, 20 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 3ebe54926ff..eab35e7b8b6 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -620,6 +620,10 @@ _mesa_init_constants(struct gl_context *ctx) /* GL 3.2: hard-coded for now: */ ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; + + /** GL_EXT_gpu_shader4 */ + ctx->Const.MinProgramTexelOffset = -8; + ctx->Const.MaxProgramTexelOffset = 7; } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index da9df27bdb6..870c5d76f0a 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -266,6 +266,11 @@ static const int extra_EXT_texture_integer[] = { EXTRA_END }; +static const int extra_EXT_gpu_shader4[] = { + EXT(EXT_gpu_shader4), + EXTRA_END +}; + EXTRA_EXT(ARB_multitexture); EXTRA_EXT(ARB_texture_cube_map); @@ -1198,6 +1203,14 @@ static const struct value_desc values[] = { CONTEXT_INT(Const.GeometryProgram.MaxVertexVaryingComponents), extra_ARB_geometry_shader4 }, + /* GL_EXT_gpu_shader4 / GL 3.0 */ + { GL_MIN_PROGRAM_TEXEL_OFFSET, + CONTEXT_INT(Const.MinProgramTexelOffset), + extra_EXT_gpu_shader4 }, + { GL_MAX_PROGRAM_TEXEL_OFFSET, + CONTEXT_INT(Const.MaxProgramTexelOffset), + extra_EXT_gpu_shader4 }, + /* GL 3.0 */ { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 }, diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1d775cbad5d..f8060f32de8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2625,6 +2625,9 @@ struct gl_constants GLuint MaxTransformFeedbackSeparateAttribs; GLuint MaxTransformFeedbackSeparateComponents; GLuint MaxTransformFeedbackInterleavedComponents; + + /** GL_EXT_gpu_shader4 */ + GLint MinProgramTexelOffset, MaxProgramTexelOffset; }; -- cgit v1.2.3