aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/get.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-06 21:03:59 +0000
committermarha <marha@users.sourceforge.net>2011-04-06 21:03:59 +0000
commite2b908c356746281aba48128da7dc15a28f5a773 (patch)
tree5f0a12dfa33c059d8fe09d9a5a792792f44189a6 /mesalib/src/mesa/main/get.c
parent1fc1b7f67928082b9e922463be25c232d9bcba6a (diff)
parent704e01fc69ebf6302aa1876906805147248abdaa (diff)
downloadvcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.tar.gz
vcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.tar.bz2
vcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/get.c')
-rw-r--r--mesalib/src/mesa/main/get.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 65a826b9e..eec22fc3f 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -323,6 +323,7 @@ EXTRA_EXT(ARB_vertex_buffer_object);
EXTRA_EXT(ARB_geometry_shader4);
EXTRA_EXT(ARB_copy_buffer);
EXTRA_EXT(EXT_framebuffer_sRGB);
+EXTRA_EXT(ARB_texture_buffer_object);
static const int
extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
@@ -1236,6 +1237,18 @@ static const struct value_desc values[] = {
CONTEXT_INT(Const.MaxProgramTexelOffset),
extra_EXT_gpu_shader4 },
+ /* GL_ARB_texture_buffer_object */
+ { GL_MAX_TEXTURE_BUFFER_SIZE_ARB, CONTEXT_INT(Const.MaxTextureBufferSize),
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BINDING_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_BUFFER_INDEX, extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_FORMAT_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+
/* GL 3.0 */
{ GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 },
{ GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 },
@@ -1673,6 +1686,29 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
case GL_MAX_FRAGMENT_UNIFORM_VECTORS:
v->value_int = ctx->Const.FragmentProgram.MaxUniformComponents / 4;
break;
+
+ /* GL_ARB_texture_buffer_object */
+ case GL_TEXTURE_BUFFER_ARB:
+ v->value_int = ctx->Texture.BufferObject->Name;
+ break;
+ case GL_TEXTURE_BINDING_BUFFER_ARB:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int =
+ ctx->Texture.Unit[unit].CurrentTex[TEXTURE_BUFFER_INDEX]->Name;
+ break;
+ case GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB:
+ {
+ struct gl_buffer_object *buf =
+ ctx->Texture.Unit[ctx->Texture.CurrentUnit]
+ .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObject;
+ v->value_int = buf ? buf->Name : 0;
+ }
+ break;
+ case GL_TEXTURE_BUFFER_FORMAT_ARB:
+ v->value_int = ctx->Texture.Unit[ctx->Texture.CurrentUnit]
+ .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObjectFormat;
+ break;
+
}
}