From 158dcdc0e2ec99ee527a633bef7b236a73688231 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 22 Mar 2013 12:49:11 -0700 Subject: [PATCH] i965/gs: Add brw->geometry_program. Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_context.h | 3 +++ src/mesa/drivers/dri/i965/brw_state_upload.c | 5 +++++ 2 files changed, 8 insertions(+) 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; -- 2.30.2