diff options
author | Paul Berry <[email protected]> | 2013-03-22 12:49:11 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-08-23 11:02:54 -0700 |
commit | 158dcdc0e2ec99ee527a633bef7b236a73688231 (patch) | |
tree | ac26176c46e844a2b40864a9213c6876f445f27a /src/mesa/drivers/dri | |
parent | 7f57101ad53112b16e4a400f312f68a85dfbd108 (diff) |
i965/gs: Add brw->geometry_program.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 3f6cc6e6b65..db20eeab578 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -131,6 +131,7 @@ struct brw_wm_prog_data; enum brw_state_id { BRW_STATE_URB_FENCE, BRW_STATE_FRAGMENT_PROGRAM, + BRW_STATE_GEOMETRY_PROGRAM, BRW_STATE_VERTEX_PROGRAM, BRW_STATE_CURBE_OFFSETS, BRW_STATE_REDUCED_PRIMITIVE, @@ -160,6 +161,7 @@ enum brw_state_id { #define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE) #define BRW_NEW_FRAGMENT_PROGRAM (1 << BRW_STATE_FRAGMENT_PROGRAM) +#define BRW_NEW_GEOMETRY_PROGRAM (1 << BRW_STATE_GEOMETRY_PROGRAM) #define BRW_NEW_VERTEX_PROGRAM (1 << BRW_STATE_VERTEX_PROGRAM) #define BRW_NEW_CURBE_OFFSETS (1 << BRW_STATE_CURBE_OFFSETS) #define BRW_NEW_REDUCED_PRIMITIVE (1 << BRW_STATE_REDUCED_PRIMITIVE) @@ -996,6 +998,7 @@ struct brw_context /* Active vertex program: */ const struct gl_vertex_program *vertex_program; + const struct gl_geometry_program *geometry_program; const struct gl_fragment_program *fragment_program; /* hw-dependent 3DSTATE_VF_STATISTICS opcode */ diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 4c11276efc4..64e0bcf8e8f 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -469,6 +469,11 @@ void brw_upload_state(struct brw_context *brw) brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM; } + if (brw->geometry_program != ctx->GeometryProgram._Current) { + brw->geometry_program = ctx->GeometryProgram._Current; + brw->state.dirty.brw |= BRW_NEW_GEOMETRY_PROGRAM; + } + if (brw->vertex_program != ctx->VertexProgram._Current) { brw->vertex_program = ctx->VertexProgram._Current; brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM; |