diff options
author | marha <marha@users.sourceforge.net> | 2011-04-12 13:48:18 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-12 13:48:18 +0000 |
commit | e2c8d047679db3bbb166d709b86e18180be6d713 (patch) | |
tree | d7468ac76dc71bb8d38c816be6db988bcbcbb863 /mesalib/src/mesa/main/dlist.c | |
parent | 57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05 (diff) | |
parent | 7730393619080086530e24d3b594351b4114f608 (diff) | |
download | vcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.tar.gz vcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.tar.bz2 vcxsrv-e2c8d047679db3bbb166d709b86e18180be6d713.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/dlist.c')
-rw-r--r-- | mesalib/src/mesa/main/dlist.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index e0f9706bb..081de99aa 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -49,6 +49,7 @@ #include "eval.h"
#include "framebuffer.h"
#include "glapi/glapi.h"
+#include "glapidispatch.h"
#include "hash.h"
#include "image.h"
#include "light.h"
@@ -437,6 +438,9 @@ typedef enum /* GL_NV_texture_barrier */
OPCODE_TEXTURE_BARRIER_NV,
+ /* GL_ARB_sampler_object */
+ OPCODE_BIND_SAMPLER,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -7066,6 +7070,24 @@ save_TextureBarrierNV(void) }
+/* GL_ARB_sampler_objects */
+static void
+save_BindSampler(GLuint unit, GLuint sampler)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2);
+ if (n) {
+ n[1].ui = unit;
+ n[2].ui = sampler;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BindSampler(ctx->Exec, (unit, sampler));
+ }
+}
+
+
/**
* Save an error-generating command into display list.
*
@@ -8249,6 +8271,10 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_TextureBarrierNV(ctx->Exec, ());
break;
+ case OPCODE_BIND_SAMPLER:
+ CALL_BindSampler(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
@@ -9930,6 +9956,9 @@ _mesa_create_save_table(void) /* GL_NV_texture_barrier */
SET_TextureBarrierNV(table, save_TextureBarrierNV);
+ /* GL_ARB_sampler_objects */
+ SET_BindSampler(table, save_BindSampler);
+
/* GL_ARB_draw_buffer_blend */
SET_BlendFunciARB(table, save_BlendFunci);
SET_BlendFuncSeparateiARB(table, save_BlendFuncSeparatei);
|