Mesa (master): radeonsi: fix dvec[34] attributes sourced from current attribute state

Nicolai Hähnle nh at kemper.freedesktop.org
Fri Mar 24 16:36:09 UTC 2017


Module: Mesa
Branch: master
Commit: eebd0cd56041f380aa0dc3ba88131ddf7cc54e2c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eebd0cd56041f380aa0dc3ba88131ddf7cc54e2c

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Mar 23 17:54:43 2017 +0100

radeonsi: fix dvec[34] attributes sourced from current attribute state

The state tracker no longer uploads those attributes for us,
so we must conservatively upload the size of the largest
attribute, which is a dvec4.

Fixes a regression of GL45-CTS.gpu_shader_fp64.varyings and
GL45-CTS.vertex_attrib_64bit.limits_test.

Fixes: 9b91e0b54cc2 ("radeonsi: allow unaligned vertex buffer offsets and strides on CIK-VI")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_state.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 6948a74fbd..0ee4af3915 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3532,12 +3532,13 @@ static void si_set_vertex_buffers(struct pipe_context *ctx,
 				/* Zero-stride attribs only. */
 				assert(src->stride == 0);
 
-				/* Assume the attrib has 4 dwords like the vbo
-				 * module. This is also a good upper bound.
+				/* Assume that the user_buffer comes from
+				 * gl_current_attrib, which implies it has
+				 * 4 * 8 bytes (for dvec4 attributes).
 				 *
 				 * Use const_uploader to upload into VRAM directly.
 				 */
-				u_upload_data(sctx->b.b.const_uploader, 0, 16, 16,
+				u_upload_data(sctx->b.b.const_uploader, 0, 32, 32,
 					      src->user_buffer,
 					      &dsti->buffer_offset,
 					      &dsti->buffer);




More information about the mesa-commit mailing list