summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-06-03 16:52:59 -0700
committerKenneth Graunke <[email protected]>2019-06-03 22:51:18 -0700
commit34d3103dee972839f1a1cae696881d0ecff0aa25 (patch)
treed0bbba8f5f90cbc8cdf298634816566719848cba /src/gallium
parentfea36a8f43ea010ce0581a63b4b5fa1213a35982 (diff)
iris: Fix SO stride units for DrawTransformFeedback
Mesa measures in DWords. The hardware also claims to measure in DWords. Except the SO_WRITE_OFFSET field is actually bits 31:2, with 1:0 MBZ. Which means that it really measures in bytes. So, convert to bytes. Without this, our offset / stride denominator was 1/4th the size it should be, leading to 4x the vertex count that we should have had. Fixes GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_two_buffers
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_context.h2
-rw-r--r--src/gallium/drivers/iris/iris_program.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h
index 4e544f830fd..e319ecb6df1 100644
--- a/src/gallium/drivers/iris/iris_context.h
+++ b/src/gallium/drivers/iris/iris_context.h
@@ -396,7 +396,7 @@ struct iris_stream_output_target {
/** Storage holding the offset where we're writing in the buffer */
struct iris_state_ref offset;
- /** Stride (dwords-per-vertex) during this transform feedback operation */
+ /** Stride (bytes-per-vertex) during this transform feedback operation */
uint16_t stride;
/** Has 3DSTATE_SO_BUFFER actually been emitted, zeroing the offsets? */
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 3f8896ffd7d..d2a17b17ae7 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -1666,7 +1666,7 @@ iris_update_compiled_shaders(struct iris_context *ice)
struct iris_stream_output_target *so =
(void *) ice->state.so_target[i];
if (so)
- so->stride = ish->stream_output.stride[i];
+ so->stride = ish->stream_output.stride[i] * sizeof(uint32_t);
}
}