summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-03-22 00:42:56 -0700
committerKenneth Graunke <[email protected]>2019-04-23 15:57:07 -0700
commit2208d5a68370e088aee8d25aff4b3f2e732b3a47 (patch)
treeddbe247ceca0701e8831ca2dbaed25ee4c1af6de /src/gallium/drivers/iris/iris_state.c
parent38db20245b3f1e12a0d2535020ba61b42491c8c7 (diff)
iris: Fix DrawTransformFeedback math when there's a buffer offset
We need to subtract the starting offset from the final offset before dividing by the stride. See src/intel/vulkan/genX_cmd_buffer.c:3142. Not known to fix anything.
Diffstat (limited to 'src/gallium/drivers/iris/iris_state.c')
-rw-r--r--src/gallium/drivers/iris/iris_state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 55ed7be647a..f4d7c698a6c 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -5203,6 +5203,8 @@ iris_upload_render_state(struct iris_context *ice,
lrm.MemoryAddress =
ro_bo(iris_resource_bo(so->offset.res), so->offset.offset);
}
+ if (so->base.buffer_offset)
+ iris_math_add32_gpr0(ice, batch, -so->base.buffer_offset);
iris_math_div32_gpr0(ice, batch, so->stride);
_iris_emit_lrr(batch, _3DPRIM_VERTEX_COUNT, CS_GPR(0));