v3dv: fix texture_size()

The uniform data for the texture size as produced by the compiler
contains the texture index directly and is not packed with
v3d_unit_data_create, so using v3d_unit_data_get_unit is not
correct.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10951>
This commit is contained in:
Iago Toral Quiroga 2021-05-24 11:20:50 +02:00 committed by Marge Bot
parent 32abeac8a8
commit 8e3179545e
1 changed files with 2 additions and 1 deletions

View File

@ -352,7 +352,8 @@ get_texture_size(struct v3dv_cmd_buffer *cmd_buffer,
enum quniform_contents contents,
uint32_t data)
{
uint32_t texture_idx = v3d_unit_data_get_unit(data);
uint32_t texture_idx = data;
struct v3dv_descriptor_state *descriptor_state =
v3dv_cmd_buffer_get_descriptor_state(cmd_buffer, pipeline);