Fix gen8 rendercopy instruction lengths
Kayden noticed a few of those were wrong. It's clearly time to fix them!
Signature · 1 line
Damien
PATCH 1/4 rendercopy/bdw: Fix the STATE_SIP instruction length
Signed-off-by Damien Lespiau <[email protected]>
--- lib/rendercopy_gen8.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
lib/rendercopy_gen8.c +4 -3
@@ -470,8 +470,9 @@ gen6_create_scissor_rect(struct intel_batchbuffer *batch) }static void -gen6_emit_sip (struct intel_batchbuffer *batch) { -OUT_BATCH (GEN6_STATE_SIP |0 ); +gen8_emit_sip (struct intel_batchbuffer *batch) { +OUT_BATCH (GEN6_STATE_SIP | (3 -2 )); +OUT_BATCH (0 );OUT_BATCH (0 ); }
@@ -887,7 +888,7 @@ void gen8_render_copyfunc(struct intel_batchbuffer *batch,* order */ OUT_BATCH (GEN6_PIPELINE_SELECT |PIPELINE_SELECT_3D ); -gen6_emit_sip (batch); +gen8_emit_sip (batch);gen7_emit_push_constants (batch);
Signature · 1 line
1.8.3.1
PATCH 2/4 rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length
In reply to Damien LespiauSigned-off-by Damien Lespiau <[email protected]>
--- lib/rendercopy_gen8.c | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-)
lib/rendercopy_gen8.c +31 -17
@@ -556,9 +556,7 @@ gen8_emit_cc(struct intel_batchbuffer *batch) {static void gen8_emit_multisample (struct intel_batchbuffer *batch) { -OUT_BATCH (GEN8_3DSTATE_MULTISAMPLE |2 ); -OUT_BATCH (0 ); -OUT_BATCH (0 ); +OUT_BATCH (GEN8_3DSTATE_MULTISAMPLE );OUT_BATCH (0 );OUT_BATCH (GEN6_3DSTATE_SAMPLE_MASK );
@@ -566,14 +564,18 @@ gen8_emit_multisample(struct intel_batchbuffer *batch) { }static void -gen7_emit_vs (struct intel_batchbuffer *batch) { +gen8_emit_vs (struct intel_batchbuffer *batch) {OUT_BATCH (GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS );OUT_BATCH (0 );OUT_BATCH (GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS );OUT_BATCH (0 ); -OUT_BATCH (GEN6_3DSTATE_CONSTANT_VS | (7 -2 )); +OUT_BATCH (GEN6_3DSTATE_CONSTANT_VS | (11 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );
@@ -590,8 +592,12 @@ gen7_emit_vs(struct intel_batchbuffer *batch) { }static void -gen7_emit_hs (struct intel_batchbuffer *batch) { -OUT_BATCH (GEN7_3DSTATE_CONSTANT_HS | (7 -2 )); +gen8_emit_hs (struct intel_batchbuffer *batch) { +OUT_BATCH (GEN7_3DSTATE_CONSTANT_HS | (11 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );
@@ -615,8 +621,12 @@ gen7_emit_hs(struct intel_batchbuffer *batch) { }static void -gen7_emit_gs (struct intel_batchbuffer *batch) { -OUT_BATCH (GEN7_3DSTATE_CONSTANT_GS | (7 -2 )); +gen8_emit_gs (struct intel_batchbuffer *batch) { +OUT_BATCH (GEN7_3DSTATE_CONSTANT_GS | (11 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );
@@ -640,8 +650,12 @@ gen7_emit_gs(struct intel_batchbuffer *batch) { }static void -gen7_emit_ds (struct intel_batchbuffer *batch) { -OUT_BATCH (GEN7_3DSTATE_CONSTANT_DS | (7 -2 )); +gen8_emit_ds (struct intel_batchbuffer *batch) { +OUT_BATCH (GEN7_3DSTATE_CONSTANT_DS | (11 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );
@@ -664,15 +678,15 @@ gen7_emit_ds(struct intel_batchbuffer *batch) { }static void -gen7_emit_null_state (struct intel_batchbuffer *batch) { -gen7_emit_hs (batch); +gen8_emit_null_state (struct intel_batchbuffer *batch) { +gen8_emit_hs (batch);OUT_BATCH (GEN7_3DSTATE_TE | (4 -2 ));OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 ); -gen7_emit_gs (batch); -gen7_emit_ds (batch); -gen7_emit_vs (batch); +gen8_emit_gs (batch); +gen8_emit_ds (batch); +gen8_emit_vs (batch); } static void
@@ -905,7 +919,7 @@ void gen8_render_copyfunc(struct intel_batchbuffer *batch,gen8_emit_multisample (batch); -gen7_emit_null_state (batch); +gen8_emit_null_state (batch);OUT_BATCH (GEN7_3DSTATE_STREAMOUT |1 );OUT_BATCH (0 );
Signature · 1 line
1.8.3.1
PATCH 3/4 rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction length
In reply to Damien LespiauSigned-off-by Damien Lespiau <[email protected]>
--- lib/rendercopy_gen8.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/rendercopy_gen8.c +3 -1
@@ -783,7 +783,9 @@ gen8_emit_depth(struct intel_batchbuffer *batch) {OUT_BATCH (0 );OUT_BATCH (0 ); -OUT_BATCH (GEN7_3DSTATE_HIER_DEPTH_BUFFER | (3 -2 )); +OUT_BATCH (GEN7_3DSTATE_HIER_DEPTH_BUFFER | (5 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 );
Signature · 1 line
1.8.3.1
PATCH 4/4 rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction length
In reply to Damien LespiauSigned-off-by Damien Lespiau <[email protected]>
--- lib/rendercopy_gen8.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/rendercopy_gen8.c +3 -1
@@ -789,7 +789,9 @@ gen8_emit_depth(struct intel_batchbuffer *batch) {OUT_BATCH (0 );OUT_BATCH (0 ); -OUT_BATCH (GEN7_3DSTATE_STENCIL_BUFFER | (3 -2 )); +OUT_BATCH (GEN7_3DSTATE_STENCIL_BUFFER | (5 -2 )); +OUT_BATCH (0 ); +OUT_BATCH (0 );OUT_BATCH (0 );OUT_BATCH (0 ); }
Signature · 1 line
1.8.3.1
Quoted 1 line · Damien Lespiau
Kayden noticed a few of those were wrong. It's clearly time to fix them!
No screams, pushed.