From 6304c08818e9e571f0e73cbc814deddd1d0c416a Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Fri, 13 Nov 2020 09:17:53 +0100 Subject: [PATCH] v3dv: fix width for buffer view texture state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is in units of texels, not bytes. Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/vulkan/v3dv_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/broadcom/vulkan/v3dv_image.c b/src/broadcom/vulkan/v3dv_image.c index cf365a146bb..39927a6dfab 100644 --- a/src/broadcom/vulkan/v3dv_image.c +++ b/src/broadcom/vulkan/v3dv_image.c @@ -717,7 +717,7 @@ pack_texture_shader_state_from_buffer_view(struct v3dv_device *device, * we are providing a 28 bit field for size, but split on the usual * 14bit height/width). */ - tex.image_width = buffer_view->size; + tex.image_width = buffer_view->num_elements; tex.image_height = tex.image_width >> 14; tex.image_width &= (1 << 14) - 1; tex.image_height &= (1 << 14) - 1;