asahi: Add missing LOD source for agx_meta's txfs
These would be inserted by nir_lower_tex anyway, but we shouldn't be relying on that behaviour for the meta shaders when we can just create the correct thing from the start. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847>
This commit is contained in:
committed by
Marge Bot
parent
176484d7f0
commit
6e1bdc1291
@@ -41,7 +41,7 @@ build_background_op(nir_builder *b, enum agx_meta_op op, unsigned rt,
|
||||
unsigned nr, bool msaa)
|
||||
{
|
||||
if (op == AGX_META_OP_LOAD) {
|
||||
nir_tex_instr *tex = nir_tex_instr_create(b->shader, msaa ? 2 : 1);
|
||||
nir_tex_instr *tex = nir_tex_instr_create(b->shader, 2);
|
||||
/* The type doesn't matter as long as it matches the store */
|
||||
tex->dest_type = nir_type_uint32;
|
||||
tex->sampler_dim = msaa ? GLSL_SAMPLER_DIM_MS : GLSL_SAMPLER_DIM_2D;
|
||||
@@ -53,6 +53,8 @@ build_background_op(nir_builder *b, enum agx_meta_op op, unsigned rt,
|
||||
tex->src[1] =
|
||||
nir_tex_src_for_ssa(nir_tex_src_ms_index, nir_load_sample_id(b));
|
||||
b->shader->info.fs.uses_sample_shading = true;
|
||||
} else {
|
||||
tex->src[1] = nir_tex_src_for_ssa(nir_tex_src_lod, nir_imm_int(b, 0));
|
||||
}
|
||||
|
||||
tex->coord_components = 2;
|
||||
|
||||
Reference in New Issue
Block a user