diff options
author | Kenneth Graunke <[email protected]> | 2015-08-29 00:33:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-09-26 11:59:56 -0700 |
commit | df221f65e26199a74bc259d3f94e70637b843afa (patch) | |
tree | cb623ad296862ed7d556d6164e8a758a9f0a245b /src/mesa/drivers/dri/i965/brw_gs.c | |
parent | 6301af22bb80b2c177539074e3b2c68e65c15d41 (diff) |
i965: Simplify handling of VUE map changes.
The old code was disasterously complex - spread across multiple atoms
which may not even run, inspecting the dirty bits to try and decide
whether it was necessary to do checks...storing VS information in
brw_context...extra flagging...
This code tripped me and Carl up very badly when working on the
shader cache code. It's very fragile and hard to maintain.
Now that geometry shaders only depend on their inputs and don't have
to worry about the VS VUE map, we can dramatically simplify this:
just compute the VUE map coming out of the geometry shader stage
in brw_upload_programs. If it changes, flag it. Done.
v2: Also check vue_map.separable.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 77be9d9beda..1f219c0eac6 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -297,8 +297,7 @@ brw_gs_state_dirty(struct brw_context *brw) return brw_state_dirty(brw, _NEW_TEXTURE, BRW_NEW_GEOMETRY_PROGRAM | - BRW_NEW_TRANSFORM_FEEDBACK | - BRW_NEW_VUE_MAP_VS); + BRW_NEW_TRANSFORM_FEEDBACK); } static void @@ -336,11 +335,6 @@ brw_upload_gs_prog(struct brw_context *brw) if (gp == NULL) { /* No geometry shader. Vertex data just passes straight through. */ - if (brw->ctx.NewDriverState & BRW_NEW_VUE_MAP_VS) { - brw->vue_map_geom_out = brw->vue_map_vs; - brw->ctx.NewDriverState |= BRW_NEW_VUE_MAP_GEOM_OUT; - } - if (brw->gen == 6 && (brw->ctx.NewDriverState & BRW_NEW_TRANSFORM_FEEDBACK)) { gen6_brw_upload_ff_gs_prog(brw); @@ -367,14 +361,6 @@ brw_upload_gs_prog(struct brw_context *brw) (void)success; } brw->gs.base.prog_data = &brw->gs.prog_data->base.base; - - if (brw->gs.prog_data->base.vue_map.slots_valid != - brw->vue_map_geom_out.slots_valid || - brw->gs.prog_data->base.vue_map.separate != - brw->vue_map_geom_out.separate) { - brw->vue_map_geom_out = brw->gs.prog_data->base.vue_map; - brw->ctx.NewDriverState |= BRW_NEW_VUE_MAP_GEOM_OUT; - } } bool |