nak: Plumb is_sparse through from NIR for texture ops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
This commit is contained in:
Faith Ekstrand 2024-02-19 11:31:38 -06:00 committed by Marge Bot
parent 75390a7aeb
commit 671c6334bf
2 changed files with 5 additions and 1 deletions

View file

@ -221,6 +221,7 @@ lower_tex(nir_builder *b, nir_tex_instr *tex, const struct nak_compiler *nak)
.lod_mode = lod_mode,
.offset_mode = offset_mode,
.has_z_cmpr = tex->is_shadow,
.is_sparse = tex->is_sparse,
};
STATIC_ASSERT(sizeof(flags) == sizeof(tex->backend_flags));
memcpy(&tex->backend_flags, &flags, sizeof(flags));
@ -257,6 +258,8 @@ lower_txq(nir_builder *b, nir_tex_instr *tex, const struct nak_compiler *nak)
{
b->cursor = nir_before_instr(&tex->instr);
assert(!tex->is_sparse);
nir_def *tex_h = NULL, *lod = NULL;
for (unsigned i = 0; i < tex->num_srcs; i++) {
switch (tex->src[i].src_type) {

View file

@ -145,7 +145,8 @@ struct nak_nir_tex_flags {
enum nak_nir_lod_mode lod_mode:3;
enum nak_nir_offset_mode offset_mode:2;
bool has_z_cmpr:1;
uint32_t pad:26;
bool is_sparse:1;
uint32_t pad:25;
};
bool nak_nir_lower_scan_reduce(nir_shader *shader);