Skip to contentSkip to conversation

rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.

PATCH In review Kenneth Graunke 3 participants 5 messages Dec 10, 2013 – Dec 11, 2013 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.

We don't want depth/stencil fast clears or HiZ resolves; we want normal drawing. Without this, the pixel pipeline doesn't work.

Cc Ben Widawsky <[email protected]>
Cc Damien Lespiau <[email protected]>
---
 lib/gen8_render.h     |  2 ++
 lib/rendercopy_gen8.c | 10 ++++++++++
 2 files changed, 12 insertions(+)
lib/gen8_render.h +2 -0
index 7b89876..ca53d64 100644
@@ -22,6 +22,8 @@
 # define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_8			(3 << 1)
 # define GEN9_3DSTATE_MULTISAMPLE_NUMSAMPLES_16			(4 << 1)
 
+#define GEN8_3DSTATE_WM_HZ_OP			GEN6_3D(3, 0, 0x52)
+
 #define GEN8_3DSTATE_VF_INSTANCING		GEN6_3D(3, 0, 0x49)
 #define GEN7_3DSTATE_GS				GEN6_3D(3, 0, 0x11)
 #define GEN7_3DSTATE_CONSTANT_GS		GEN6_3D(3, 0, 0x16)
lib/rendercopy_gen8.c +10 -0
index 1a137dd..38dc0e7 100644
@@ -679,7 +679,17 @@ gen8_emit_ds(struct intel_batchbuffer *batch) {
 }
 
 static void
+gen8_emit_wm_hz_op(struct intel_batchbuffer *batch) {
+	OUT_BATCH(GEN8_3DSTATE_WM_HZ_OP | (5-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+}
+
+static void
 gen8_emit_null_state(struct intel_batchbuffer *batch) {
+	gen8_emit_wm_hz_op(batch);
 	gen8_emit_hs(batch);
 	OUT_BATCH(GEN7_3DSTATE_TE | (4-2));
 	OUT_BATCH(0);
Signature · 1 line
1.8.4.2
#1 lore raw

PATCH 2/2 rendercopy/bdw: Fix length of a bunch of zeroed out packets.

A bunch of packets were too short.

Cc Ben Widawsky <[email protected]>
Cc Damien Lespiau <[email protected]>
---
 lib/rendercopy_gen8.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

The test is still broken for me, but I figure these patches are necessary (if not sufficient)

lib/rendercopy_gen8.c +20 -6
index 38dc0e7..45a134c 100644
@@ -584,7 +584,10 @@ gen8_emit_vs(struct intel_batchbuffer *batch) {
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN6_3DSTATE_VS | (6-2));
+	OUT_BATCH(GEN6_3DSTATE_VS | (9-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -606,7 +609,9 @@ gen8_emit_hs(struct intel_batchbuffer *batch) {
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_HS | (7-2));
+	OUT_BATCH(GEN7_3DSTATE_HS | (9-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -635,7 +640,10 @@ gen8_emit_gs(struct intel_batchbuffer *batch) {
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_GS | (7-2));
+	OUT_BATCH(GEN7_3DSTATE_GS | (10-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -664,7 +672,10 @@ gen8_emit_ds(struct intel_batchbuffer *batch) {
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_DS | (6-2));
+	OUT_BATCH(GEN7_3DSTATE_DS | (9-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -786,7 +797,8 @@ gen8_emit_ps(struct intel_batchbuffer *batch, uint32_t kernel) {
 
 static void
 gen8_emit_depth(struct intel_batchbuffer *batch) {
-	OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER | (7-2));
+	OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER | (8-2));
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -937,7 +949,9 @@ void gen8_render_copyfunc(struct intel_batchbuffer *batch,
 
 	gen8_emit_null_state(batch);
 
-	OUT_BATCH(GEN7_3DSTATE_STREAMOUT | 1);
+	OUT_BATCH(GEN7_3DSTATE_STREAMOUT | (5-2));
+	OUT_BATCH(0);
+	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
Signature · 1 line
1.8.4.2
#2 lore raw
In reply to Kenneth Graunke
Quoted 6 lines · Kenneth Graunke

We don't want depth/stencil fast clears or HiZ resolves; we want normal drawing. Without this, the pixel pipeline doesn't work.

Cc Ben Widawsky <[email protected]>
Cc Damien Lespiau <[email protected]>

Both patches reviewed and pushed, thanks a lot for doing this. Does it mean rendercopy run for you now? (I don't have silicon to test myself).

I've also taught my command parser to warn harder about instruction lengths, it was missing the cases you fixed.

Signature · 1 line
Damien
#3 lore raw
Quoted 8 lines · Damien Lespiau
Quoted 6 lines · Kenneth Graunke

We don't want depth/stencil fast clears or HiZ resolves; we want normal drawing. Without this, the pixel pipeline doesn't work.

Cc Ben Widawsky <[email protected]>
Cc Damien Lespiau <[email protected]>
Quoted 5 lines

Both patches reviewed and pushed, thanks a lot for doing this. Does it mean rendercopy run for you now? (I don't have silicon to test myself).

I've also taught my command parser to warn harder about instruction lengths, it was missing the cases you fixed.

It still hangs for me. I also tried Haihao's patch, though I guess I didn't try both together...

--Ken

#4 lore raw
Quoted 9 lines · Kenneth Graunke
Quoted 8 lines · Damien Lespiau
Quoted 6 lines · Kenneth Graunke

We don't want depth/stencil fast clears or HiZ resolves; we want normal drawing. Without this, the pixel pipeline doesn't work.

Cc Ben Widawsky <[email protected]>
Cc Damien Lespiau <[email protected]>
Quoted 8 lines
Quoted 5 lines

Both patches reviewed and pushed, thanks a lot for doing this. Does it mean rendercopy run for you now? (I don't have silicon to test myself).

I've also taught my command parser to warn harder about instruction lengths, it was missing the cases you fixed.

It still hangs for me. I also tried Haihao's patch, though I guess I didn't try both together...

Now gem_render_copy works fine for me without my workaround.

Thanks
Haihao

Quoted 6 lines

--Ken
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx