We'll need to differentiate tex and txl.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6749>
static void
bi_print_texture(struct bi_texture *tex, FILE *fp)
{
- fprintf(fp, " - texture %u, sampler %u",
- tex->texture_index, tex->sampler_index);
+ fprintf(fp, " - texture %u, sampler %u%s",
+ tex->texture_index, tex->sampler_index,
+ tex->compute_lod ? ", compute lod" : "");
}
void
.texture = {
.texture_index = instr->texture_index,
.sampler_index = instr->sampler_index,
+ .compute_lod = instr->op == nir_texop_tex,
},
.dest = pan_dest_index(&instr->dest),
.dest_type = instr->dest_type,
/* Constant indices. Indirect would need to be in src[..] like normal,
* we can reserve some sentinels there for that for future. */
unsigned texture_index, sampler_index;
+
+ /* Should the LOD be computed based on neighboring pixels? Only valid
+ * in fragment shaders. */
+ bool compute_lod;
};
typedef struct {