From 3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57 Mon Sep 17 00:00:00 2001 From: Anuj Phogat Date: Thu, 5 Nov 2020 10:33:44 -0800 Subject: intel: Pointer to SCISSOR_RECT array should be 64B aligned v2: Apply the workaround to all gen hardawre Ref: GEN:BUG:1409725701 Signed-off-by: Anuj Phogat Reviewed-by: Ivan Briano Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/gen7_cmd_buffer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/intel') diff --git a/src/intel/vulkan/gen7_cmd_buffer.c b/src/intel/vulkan/gen7_cmd_buffer.c index efc9cc8ca06..531344a3ea9 100644 --- a/src/intel/vulkan/gen7_cmd_buffer.c +++ b/src/intel/vulkan/gen7_cmd_buffer.c @@ -51,8 +51,16 @@ gen7_cmd_buffer_emit_scissor(struct anv_cmd_buffer *cmd_buffer) struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; uint32_t count = cmd_buffer->state.gfx.dynamic.scissor.count; const VkRect2D *scissors = cmd_buffer->state.gfx.dynamic.scissor.scissors; + + /* GEN:BUG:1409725701: + * "The viewport-specific state used by the SF unit (SCISSOR_RECT) is + * stored as an array of up to 16 elements. The location of first + * element of the array, as specified by Pointer to SCISSOR_RECT, should + * be aligned to a 64-byte boundary. + */ + uint32_t alignment = 64; struct anv_state scissor_state = - anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, count * 8, 32); + anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, count * 8, alignment); for (uint32_t i = 0; i < count; i++) { const VkRect2D *s = &scissors[i]; -- cgit v1.2.3