diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2020-11-05 10:33:44 -0800 |
---|---|---|
committer | Anuj Phogat <anuj.phogat@gmail.com> | 2020-11-09 21:29:04 +0000 |
commit | 3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57 (patch) | |
tree | 7803258ac5ef1bfbe891f7ae345305f1396fc519 /src/intel | |
parent | a1a365e8188bd72be27404dd669cad90468bc09f (diff) |
intel: Pointer to SCISSOR_RECT array should be 64B aligned20.3-branchpoint
v2: Apply the workaround to all gen hardawre
Ref: GEN:BUG:1409725701
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7463>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/gen7_cmd_buffer.c | 10 |
1 files changed, 9 insertions, 1 deletions
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]; |