diff options
author | Mathias Fröhlich <[email protected]> | 2014-09-21 18:09:22 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2014-10-24 19:21:21 +0200 |
commit | 34a3c97fe6d273d68d2ee80386791832824f3211 (patch) | |
tree | e81d1cc8c1f5107e223ff2ea350c3889e8ef52eb /src/mesa/main/dlist.c | |
parent | 6340e609a354770e04192b9b44e91fb06aab0159 (diff) |
mesa: Implement ARB_clip_control.
Implement the mesa parts of ARB_clip_control.
So far no driver enables this.
v3:
Restrict getting clip control state to the availability
of ARB_clip_control.
Move to transformation state.
Handle clip control state with the GL_TRANSFORM_BIT.
Move _FrontBit update into state.c.
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Mathias Froehlich <[email protected]>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 5c7160d0540..4b7b0604bb2 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -398,6 +398,9 @@ typedef enum OPCODE_PROGRAM_UNIFORM_MATRIX34F, OPCODE_PROGRAM_UNIFORM_MATRIX43F, + /* GL_ARB_clip_control */ + OPCODE_CLIP_CONTROL, + /* GL_ARB_color_buffer_float */ OPCODE_CLAMP_COLOR, @@ -7208,6 +7211,22 @@ save_ProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, } static void GLAPIENTRY +save_ClipControl(GLenum origin, GLenum depth) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLIP_CONTROL, 2); + if (n) { + n[1].e = origin; + n[2].e = depth; + } + if (ctx->ExecuteFlag) { + CALL_ClipControl(ctx->Exec, (origin, depth)); + } +} + +static void GLAPIENTRY save_ClampColorARB(GLenum target, GLenum clamp) { GET_CURRENT_CONTEXT(ctx); @@ -8617,6 +8636,10 @@ execute_list(struct gl_context *ctx, GLuint list) get_pointer(&n[5]))); break; + case OPCODE_CLIP_CONTROL: + CALL_ClipControl(ctx->Exec, (n[1].e, n[2].e)); + break; + case OPCODE_CLAMP_COLOR: CALL_ClampColor(ctx->Exec, (n[1].e, n[2].e)); break; @@ -9551,6 +9574,9 @@ _mesa_initialize_save_table(const struct gl_context *ctx) SET_TexParameterIiv(table, save_TexParameterIiv); SET_TexParameterIuiv(table, save_TexParameterIuiv); + /* GL_ARB_clip_control */ + SET_ClipControl(table, save_ClipControl); + /* GL_ARB_color_buffer_float */ SET_ClampColor(table, save_ClampColorARB); |