v3dv: fix width for buffer view texture state

This is in units of texels, not bytes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7651>
This commit is contained in:
Iago Toral Quiroga 2020-11-13 09:17:53 +01:00
parent d25d097d3d
commit 6304c08818

View file

@ -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;