From: Lionel Landwerlin Date: Fri, 21 Aug 2020 20:13:06 +0000 (+0300) Subject: anv: fix transform feedback surface size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd10cb8cfccb8882e33a1ade047fc467b9716f54;p=mesa.git anv: fix transform feedback surface size Non multiple 4 sizes are causing issue in particular < 4. Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3450 Fixes: 36ee2fd61c8f ("anv: Implement the basic form of VK_EXT_transform_feedback") Reviewed-by: Tapani Pälli Part-of: --- diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 4522f5d2aef..09b91415784 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -3412,7 +3412,7 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) sob.SurfaceBaseAddress = anv_address_add(xfb->buffer->address, xfb->offset); /* Size is in DWords - 1 */ - sob.SurfaceSize = xfb->size / 4 - 1; + sob.SurfaceSize = DIV_ROUND_UP(xfb->size, 4) - 1; } } }