diff options
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 0112d9d..f66082e 100644 --- a/src/mesa/main/dlist.c +++ b/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" @@ -388,6 +389,9 @@ typedef enum OPCODE_UNIFORM_3UIV, OPCODE_UNIFORM_4UIV, + /* GL_ARB_color_buffer_float */ + OPCODE_CLAMP_COLOR, + /* GL_EXT_framebuffer_blit */ OPCODE_BLIT_FRAMEBUFFER, @@ -434,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, @@ -6887,6 +6894,22 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, } static void GLAPIENTRY +save_ClampColorARB(GLenum target, GLenum clamp) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLAMP_COLOR, 2); + if (n) { + n[1].e = target; + n[2].e = clamp; + } + if (ctx->ExecuteFlag) { + CALL_ClampColorARB(ctx->Exec, (target, clamp)); + } +} + +static void GLAPIENTRY save_UseShaderProgramEXT(GLenum type, GLuint program) { GET_CURRENT_CONTEXT(ctx); @@ -7036,7 +7059,7 @@ save_VertexAttribDivisor(GLuint index, GLuint divisor) /* GL_NV_texture_barrier */ static void -save_TextureBarrierNV() +save_TextureBarrierNV(void) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); @@ -7047,6 +7070,24 @@ save_TextureBarrierNV() } +/* 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. * @@ -8071,6 +8112,10 @@ execute_list(struct gl_context *ctx, GLuint list) (n[1].i, n[2].i, n[3].b, n[4].data)); break; + case OPCODE_CLAMP_COLOR: + CALL_ClampColorARB(ctx->Exec, (n[1].e, n[2].e)); + break; + case OPCODE_TEX_BUMP_PARAMETER_ATI: { GLfloat values[4]; @@ -8226,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; @@ -9868,6 +9917,10 @@ _mesa_create_save_table(void) SET_UseShaderProgramEXT(table, save_UseShaderProgramEXT); SET_ActiveProgramEXT(table, save_ActiveProgramEXT); + /* GL_ARB_color_buffer_float */ + SET_ClampColorARB(table, save_ClampColorARB); + SET_ClampColor(table, save_ClampColorARB); + /* GL 3.0 */ #if 0 SET_ClearBufferiv(table, save_ClearBufferiv); @@ -9903,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); |