glsl: ir_texture support sprase texture

Sparse ir_texture will set is_sparse and use struct type to
hold both residency code and sampled texel.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14362>
This commit is contained in:
Qiang Yu
2021-12-28 22:14:11 +08:00
parent 67b4c88512
commit dd84769c55
6 changed files with 60 additions and 22 deletions

View File

@@ -210,7 +210,7 @@ ir_dereference_record::clone(void *mem_ctx, struct hash_table *ht) const
ir_texture *
ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
{
ir_texture *new_tex = new(mem_ctx) ir_texture(this->op);
ir_texture *new_tex = new(mem_ctx) ir_texture(this->op, this->is_sparse);
new_tex->type = this->type;
new_tex->sampler = this->sampler->clone(mem_ctx, ht);