Mesa (master): mesa: Add getters for ARB_copy_buffer's attachment points.

Eric Anholt anholt at kemper.freedesktop.org
Thu Dec 2 10:29:27 PST 2010


Module: Mesa
Branch: master
Commit: 43491adc44c82646652e8322acbd7f8684aae889
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=43491adc44c82646652e8322acbd7f8684aae889

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Dec  2 09:24:19 2010 -0800

mesa: Add getters for ARB_copy_buffer's attachment points.

Fixes more complaints by oglconform.

---

 src/mesa/main/get.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 11ba58a..916b87d 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -314,6 +314,7 @@ EXTRA_EXT2(ARB_vertex_program, NV_vertex_program);
 EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
 EXTRA_EXT(ARB_vertex_buffer_object);
 EXTRA_EXT(ARB_geometry_shader4);
+EXTRA_EXT(ARB_copy_buffer);
 
 static const int
 extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
@@ -469,6 +470,10 @@ static const struct value_desc values[] = {
    { GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0,
      extra_ARB_vertex_buffer_object },
 
+   /* GL_ARB_copy_buffer */
+   { GL_COPY_READ_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer },
+   { GL_COPY_WRITE_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer },
+
    /* GL_OES_read_format */
    { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, LOC_CUSTOM, TYPE_INT, 0,
      extra_new_buffers_OES_read_format },
@@ -1569,6 +1574,14 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
       v->value_int = ctx->Array.ElementArrayBufferObj->Name;
       break;
 
+   /* ARB_copy_buffer */
+   case GL_COPY_READ_BUFFER:
+      v->value_int = ctx->CopyReadBuffer->Name;
+      break;
+   case GL_COPY_WRITE_BUFFER:
+      v->value_int = ctx->CopyWriteBuffer->Name;
+      break;
+
    case GL_FRAGMENT_PROGRAM_BINDING_NV:
       v->value_int = 
 	 ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;



More information about the mesa-commit mailing list