[Intel-gfx] [PATCH 2/4] rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length
Damien Lespiau
damien.lespiau at intel.com
Fri Nov 22 19:26:00 CET 2013
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
lib/rendercopy_gen8.c | 48 +++++++++++++++++++++++++++++++-----------------
1 file changed, 31 insertions(+), 17 deletions(-)
diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c
index 723f4ef..8bcf2bb 100644
--- a/lib/rendercopy_gen8.c
+++ b/lib/rendercopy_gen8.c
@@ -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);
--
1.8.3.1
More information about the Intel-gfx
mailing list