summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-05-18 16:18:59 +0300
committerTopi Pohjolainen <[email protected]>2016-06-23 21:39:09 +0300
commit3487d2e7bfc3625eee8bf87cee28cf2950e314cc (patch)
tree3133a29ccca4d5dd3872c6ba719e6275bc2e640f /src
parent12783aac506e25e10f28c26429c9b500d908af41 (diff)
i965/blorp: Disable vertex element swizzling
Without vertex elements originating directly from vertex fetcher are not passed to wm-state correctly. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_blorp.c11
-rw-r--r--src/mesa/drivers/dri/i965/gen8_blorp.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index e1145862b64..3a8643f9972 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -448,8 +448,15 @@ gen7_blorp_emit_sf_config(struct brw_context *brw,
BEGIN_BATCH(14);
OUT_BATCH(_3DSTATE_SBE << 16 | (14 - 2));
- OUT_BATCH(GEN7_SBE_SWIZZLE_ENABLE |
- num_varyings << GEN7_SBE_NUM_OUTPUTS_SHIFT |
+
+ /* There is no need for swizzling (GEN7_SBE_SWIZZLE_ENABLE). All the
+ * vertex data coming from vertex fetcher is taken as unmodified
+ * (i.e., passed through). Vertex shader state is disabled and vertex
+ * fetcher builds complete vertex entries including VUE header.
+ * This is for unknown reason really needed to be disabled when more
+ * than one vec4 worth of vertex attributes are needed.
+ */
+ OUT_BATCH(num_varyings << GEN7_SBE_NUM_OUTPUTS_SHIFT |
1 << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
BRW_SF_URB_ENTRY_READ_OFFSET <<
GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT);
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.c b/src/mesa/drivers/dri/i965/gen8_blorp.c
index a7c6ff0011a..77ec11f2f4d 100644
--- a/src/mesa/drivers/dri/i965/gen8_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen8_blorp.c
@@ -301,8 +301,15 @@ gen8_blorp_emit_sbe_state(struct brw_context *brw,
const unsigned sbe_cmd_length = brw->gen == 8 ? 4 : 6;
BEGIN_BATCH(sbe_cmd_length);
OUT_BATCH(_3DSTATE_SBE << 16 | (sbe_cmd_length - 2));
- OUT_BATCH(GEN7_SBE_SWIZZLE_ENABLE |
- num_varyings << GEN7_SBE_NUM_OUTPUTS_SHIFT |
+
+ /* There is no need for swizzling (GEN7_SBE_SWIZZLE_ENABLE). All the
+ * vertex data coming from vertex fetcher is taken as unmodified
+ * (i.e., passed through). Vertex shader state is disabled and vertex
+ * fetcher builds complete vertex entries including VUE header.
+ * This is for unknown reason really needed to be disabled when more
+ * than one vec4 worth of vertex attributes are needed.
+ */
+ OUT_BATCH(num_varyings << GEN7_SBE_NUM_OUTPUTS_SHIFT |
1 << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
BRW_SF_URB_ENTRY_READ_OFFSET <<
GEN8_SBE_URB_ENTRY_READ_OFFSET_SHIFT |