mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nir: Augment raw_output_pan with IO_SEMANTICS+BASE
This is a form of lowered I/O, it needs I/O semantics so we can know the location to store to instead of passing via a sideband. Over in !20906, we will use the BASE to lower blend shader with multisampling in NIR instead of passing the number of samples and framebuffer format along a sideband to the Midgard compiler. That's not needed for this series (this patch was cherry-picked to avoid regressions in the lower_blend changes) but it's good to model the full form of the I/O lowered intrinsic here. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Italo Nicola <italonicola@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20836>
This commit is contained in:
parent
862b5b7d01
commit
1b6607fa13
2 changed files with 8 additions and 2 deletions
|
|
@ -1278,9 +1278,13 @@ intrinsic("shared_atomic_comp_swap_dxil", src_comp=[1, 1, 1], dest_comp=1)
|
|||
# One notable divergence is sRGB, which is asymmetric: raw_input_pan requires
|
||||
# an sRGB->linear conversion, but linear values should be written to
|
||||
# raw_output_pan and the hardware handles linear->sRGB.
|
||||
#
|
||||
# store_raw_output_pan is used only for blend shaders, and writes out only a
|
||||
# single 128-bit chunk. To support multisampling, the BASE index specifies the
|
||||
# bas sample index written out.
|
||||
|
||||
# src[] = { value }
|
||||
store("raw_output_pan", [], [])
|
||||
store("raw_output_pan", [], [IO_SEMANTICS, BASE])
|
||||
store("combined_output_pan", [1, 1, 1, 4], [IO_SEMANTICS, COMPONENT, SRC_TYPE, DEST_TYPE])
|
||||
load("raw_output_pan", [1], [IO_SEMANTICS], [CAN_ELIMINATE, CAN_REORDER])
|
||||
|
||||
|
|
|
|||
|
|
@ -518,8 +518,10 @@ pan_lower_fb_store(nir_shader *shader, nir_builder *b,
|
|||
unpacked = pan_pack_reorder(b, desc, unpacked);
|
||||
|
||||
nir_ssa_def *packed = pan_pack(b, desc, unpacked);
|
||||
nir_variable *var = nir_intrinsic_get_var(intr, 0);
|
||||
|
||||
nir_store_raw_output_pan(b, packed);
|
||||
nir_store_raw_output_pan(b, packed,
|
||||
.io_semantics.location = var->data.location);
|
||||
}
|
||||
|
||||
static nir_ssa_def *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue