From fd10cb8cfccb8882e33a1ade047fc467b9716f54 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 21 Aug 2020 23:13:06 +0300 Subject: [PATCH] anv: fix transform feedback surface size MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/intel/vulkan/genX_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } } -- 2.30.2