v3d: Update the TEXTURE_SHADER_STATE when there’s a new buf for a tex
authorNeil Roberts <nroberts@igalia.com>
Tue, 29 Sep 2020 15:24:51 +0000 (17:24 +0200)
committerNeil Roberts <nroberts@igalia.com>
Sun, 4 Oct 2020 13:29:54 +0000 (15:29 +0200)
commit9a899e579a6c7845cd94961b22e3a2c475f50a62
treedf4a03d0072ebecd512447d14e115fd288ce1807
parente2f037e96cb40be4412544551d10376ddc211bf3
v3d: Update the TEXTURE_SHADER_STATE when there’s a new buf for a tex

When a texture is mapped with the DISCARD_WHOLE_RESOURCE flag set,
v3d_map_usage_prep will try to allocate a new buffer for the resource.
Previously, if the resource was used in a bound texture then nothing
would cause it to update the sampler view with the offset for the new
buffer. This commit just adds that in by looking at all sampler views
and calling v3d_create_texture_shader_state_bo for each one that
references this resource.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6914>
src/gallium/drivers/v3d/v3d_resource.c