diff --git a/src/asahi/lib/agx_meta.c b/src/asahi/lib/agx_meta.c index 6b2434db451..3f4121369b7 100644 --- a/src/asahi/lib/agx_meta.c +++ b/src/asahi/lib/agx_meta.c @@ -40,15 +40,13 @@ build_background_op(nir_builder *b, enum agx_meta_op op, unsigned rt, unsigned nr, bool msaa) { if (op == AGX_META_OP_LOAD) { - nir_ssa_def *fragcoord = nir_load_frag_coord(b); - nir_ssa_def *coord = nir_trim_vector(b, fragcoord, 2); - nir_tex_instr *tex = nir_tex_instr_create(b->shader, msaa ? 2 : 1); /* 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; - tex->op = nir_texop_tex; - tex->src[0] = nir_tex_src_for_ssa(nir_tex_src_coord, coord); + tex->op = nir_texop_txf; + tex->src[0] = nir_tex_src_for_ssa(nir_tex_src_coord, + nir_u2u32(b, nir_load_pixel_coord(b))); if (msaa) { tex->src[1] =