diff options
author | Kenneth Graunke <[email protected]> | 2018-12-11 00:34:11 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-12-14 00:44:54 -0800 |
commit | 0b44644ca6886de4201e3edd911b7d418a9d7680 (patch) | |
tree | 56cab0cfb09f7f56411eda32ba3476b8aa76c378 /src/mesa/drivers | |
parent | a2ec78883f402ccfb60bce3c35ec819061e6338f (diff) |
genxml: Consistently use a numeric "MOCS" field
When we first started using genxml, we decided to represent MOCS as an
actual structure, and pack values. However, in many places, it was more
convenient to use a numeric value rather than treating it as a struct,
so we added secondary setters in a bunch of places as well.
We were not entirely consistent, either. Some places only had one.
Gen6 had both kinds of setters for STATE_BASE_ADDRESS, but newer gens
only had the struct-based setters. The names were sometimes "Constant
Buffer Object Control State" instead of "Memory", making it harder to
find. Many had prefixes like "Vertex Buffer MOCS"...in a vertex buffer
packet...which is a bit redundant.
On modern hardware, MOCS is simply an index into a table, but we were
still carrying around the structure with an "Index to MOCS Table" field,
in addition to the direct numeric setters. This is clunky - we really
just want a number on new hardware.
This patch eliminates the struct-based setters, and makes the numeric
setters be consistently called "MOCS". We leave the struct definition
around on Gen7-8 for reference purposes, but it is unused.
v2: Drop bonus "Depth Buffer MOCS" fields on Gen7.5 and Gen9
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index bad0aff9c67..8c38d5f4e82 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -394,15 +394,15 @@ genX(emit_vertex_buffer_state)(struct brw_context *brw, #endif #if GEN_GEN == 11 - .VertexBufferMOCS = ICL_MOCS_WB, + .MOCS = ICL_MOCS_WB, #elif GEN_GEN == 10 - .VertexBufferMOCS = CNL_MOCS_WB, + .MOCS = CNL_MOCS_WB, #elif GEN_GEN == 9 - .VertexBufferMOCS = SKL_MOCS_WB, + .MOCS = SKL_MOCS_WB, #elif GEN_GEN == 8 - .VertexBufferMOCS = BDW_MOCS_WB, + .MOCS = BDW_MOCS_WB, #elif GEN_GEN == 7 - .VertexBufferMOCS = GEN7_MOCS_L3, + .MOCS = GEN7_MOCS_L3, #endif }; @@ -996,7 +996,7 @@ genX(emit_index_buffer)(struct brw_context *brw) */ ib.BufferStartingAddress = ro_32_bo(brw->ib.bo, 0); #if GEN_GEN >= 8 - ib.IndexBufferMOCS = GEN_GEN >= 9 ? SKL_MOCS_WB : BDW_MOCS_WB; + ib.MOCS = GEN_GEN >= 9 ? SKL_MOCS_WB : BDW_MOCS_WB; ib.BufferSize = brw->ib.size; #else ib.BufferEndingAddress = ro_bo(brw->ib.bo, brw->ib.size - 1); @@ -3878,7 +3878,7 @@ genX(upload_3dstate_so_buffers)(struct brw_context *brw) sob.SOBufferEnable = true; sob.StreamOffsetWriteEnable = true; sob.StreamOutputBufferOffsetAddressEnable = true; - sob.SOBufferMOCS = mocs_wb; + sob.MOCS = mocs_wb; sob.SurfaceSize = MAX2(xfb_obj->Size[i] / 4, 1) - 1; sob.StreamOutputBufferOffsetAddress = |