mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
zink: update null sampler/image descriptor surface with is_buffer during hashing
this is the only time it might need to be used, so it can be updated naturally here Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Acked-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11188>
This commit is contained in:
parent
b2f4b35d5d
commit
df5c97eea8
1 changed files with 4 additions and 2 deletions
|
|
@ -1280,6 +1280,7 @@ calc_descriptor_state_hash_sampler(struct zink_context *ctx, struct zink_shader
|
|||
for (unsigned k = 0; k < zs->bindings[ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW][i].size; k++) {
|
||||
struct zink_sampler_view *sampler_view = zink_sampler_view(ctx->sampler_views[shader][idx + k]);
|
||||
bool is_buffer = zink_shader_descriptor_is_buffer(zs, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, i);
|
||||
ctx->di.sampler_surfaces[shader][idx + k].is_buffer = is_buffer;
|
||||
uint32_t val = zink_get_sampler_view_hash(ctx, sampler_view, is_buffer);
|
||||
hash = XXH32(&val, sizeof(uint32_t), hash);
|
||||
if (is_buffer)
|
||||
|
|
@ -1297,8 +1298,9 @@ static uint32_t
|
|||
calc_descriptor_state_hash_image(struct zink_context *ctx, struct zink_shader *zs, enum pipe_shader_type shader, int i, int idx, uint32_t hash)
|
||||
{
|
||||
for (unsigned k = 0; k < zs->bindings[ZINK_DESCRIPTOR_TYPE_IMAGE][i].size; k++) {
|
||||
uint32_t val = zink_get_image_view_hash(ctx, &ctx->image_views[shader][idx + k],
|
||||
zink_shader_descriptor_is_buffer(zs, ZINK_DESCRIPTOR_TYPE_IMAGE, i));
|
||||
bool is_buffer = zink_shader_descriptor_is_buffer(zs, ZINK_DESCRIPTOR_TYPE_IMAGE, i);
|
||||
uint32_t val = zink_get_image_view_hash(ctx, &ctx->image_views[shader][idx + k], is_buffer);
|
||||
ctx->di.image_surfaces[shader][idx + k].is_buffer = is_buffer;
|
||||
hash = XXH32(&val, sizeof(uint32_t), hash);
|
||||
}
|
||||
return hash;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue