asahi: Don't use 16-bit inputs to 32-bit st_tile

The hardware doesn't extend in this case, we need to extend for it. This
fixes 32-bit render target formats with lower_mediump_io.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21082>
This commit is contained in:
Alyssa Rosenzweig
2023-02-03 16:38:01 -05:00
committed by Marge Bot
parent 6b0322d441
commit 13b25a6114
+10
View File
@@ -50,6 +50,16 @@ tib_impl(nir_builder *b, nir_instr *instr, void *data)
/* Trim to format as required by hardware */
value = nir_trim_vector(b, intr->src[0].ssa, comps);
/* The hardware cannot extend for a 32-bit format. Extend ourselves. */
if (format == PIPE_FORMAT_R32_UINT && value->bit_size == 16) {
if (util_format_is_pure_sint(logical_format))
value = nir_i2i32(b, value);
else if (util_format_is_pure_uint(logical_format))
value = nir_u2u32(b, value);
else
value = nir_f2f32(b, value);
}
nir_store_local_pixel_agx(
b, value, nir_imm_intN_t(b, ALL_SAMPLES, 16),
.base = tib->offset_B[rt],