diff options
author | Kenneth Graunke <[email protected]> | 2017-05-10 12:41:38 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-05-11 16:34:04 -0700 |
commit | 4933c3d16e8b652c388d04e498b4f9016507fbf3 (patch) | |
tree | 109aa3f722a881e62e7dd5c35328c6090acaf1e2 /src/mesa/drivers | |
parent | d65e19f5c64f788d1d2e8477dc16d05b9fa2dbce (diff) |
i965: Change GEN_GEN < 7 to GEN_GEN == 6 in 3DSTATE_VS code.
This whole code is surrounded in #if GEN_GEN >= 6, and this code only
applies on Sandybridge. So, use GEN_GEN == 6 to reduce the delta in
the next patch, when we add Gen4-5 support.
Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 6619d4d7ab1..fccc66864a7 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -1731,6 +1731,7 @@ genX(upload_vs_state)(struct brw_context *brw) assert(vue_prog_data->dispatch_mode == DISPATCH_MODE_SIMD8 || vue_prog_data->dispatch_mode == DISPATCH_MODE_4X2_DUAL_OBJECT); +#if GEN_GEN == 6 /* From the BSpec, 3D Pipeline > Geometry > Vertex Shader > State, * 3DSTATE_VS, Dword 5.0 "VS Function Enable": * @@ -1742,8 +1743,6 @@ genX(upload_vs_state)(struct brw_context *brw) * We've already done such a flush at the start of state upload, so we * don't need to do another one here. */ - -#if GEN_GEN < 7 brw_batch_emit(brw, GENX(3DSTATE_CONSTANT_VS), cvs) { if (stage_state->push_const_size != 0) { cvs.Buffer0Valid = true; @@ -1770,7 +1769,7 @@ genX(upload_vs_state)(struct brw_context *brw) #endif } -#if GEN_GEN < 7 +#if GEN_GEN == 6 /* Based on my reading of the simulator, the VS constants don't get * pulled into the VS FF unit until an appropriate pipeline flush * happens, and instead the 3DSTATE_CONSTANT_VS packet just adds @@ -1797,12 +1796,12 @@ genX(upload_vs_state)(struct brw_context *brw) static const struct brw_tracked_state genX(vs_state) = { .dirty = { - .mesa = (GEN_GEN < 7 ? (_NEW_PROGRAM_CONSTANTS | _NEW_TRANSFORM) : 0), + .mesa = (GEN_GEN == 6 ? (_NEW_PROGRAM_CONSTANTS | _NEW_TRANSFORM) : 0), .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_CONTEXT | BRW_NEW_VS_PROG_DATA | - (GEN_GEN < 7 ? BRW_NEW_VERTEX_PROGRAM : 0), + (GEN_GEN == 6 ? BRW_NEW_VERTEX_PROGRAM : 0), }, .emit = genX(upload_vs_state), }; |