From: Alyssa Rosenzweig Date: Mon, 6 Feb 2023 15:49:32 +0000 (-0500) Subject: nir: Add Mali load_output taking converison X-Git-Tag: upstream/23.3.3~11159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47ed0b41be03a1a98eeeb8422fc0d8b5f0efcb60;p=platform%2Fupstream%2Fmesa.git nir: Add Mali load_output taking converison Mali's LD_TILE instruction (mapping to NIR's load_output) requires a "conversion descriptor" specifying how to convert from the register foramt to the tilebuffer format. To implement framebuffer fetch on OpenGL without shader variants, we generate these descriptors in the driver and pass them in a uniform. However, to comply with the Ekstrand Rule, we can't have magically materialized system values -- they should come only from the NIR where the driver can lower as it pleases (e.g. PanVK can lower to a constant because it knows the framebuffer format at pipeline create time). Add intrinsics to model this. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 93c5edf..74b301b 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -1298,6 +1298,14 @@ load("raw_output_pan", [1], [IO_SEMANTICS], [CAN_ELIMINATE, CAN_REORDER]) # src[] = { sampler_index } load("sampler_lod_parameters_pan", [1], flags=[CAN_ELIMINATE, CAN_REORDER]) +# Like load_output but using a specified render target conversion descriptor +load("converted_output_pan", [1], indices=[DEST_TYPE, IO_SEMANTICS], flags=[CAN_ELIMINATE]) + +# Load the render target conversion descriptor for a given render target given +# in the BASE index. Converts to a type with size given by the source type. +# Valid in fragment and blend stages. +system_value("rt_conversion_pan", 1, indices=[BASE, SRC_TYPE], bit_sizes=[32]) + # Loads the sample position array on Bifrost, in a packed Arm-specific format system_value("sample_positions_pan", 1, bit_sizes=[64])