nir: Extend store_combined_output_pan

Extend store_combined_output_pan to take a dual source blend input in
addition to colour, depth, and stencil inputs. Use the last source for
this, and represent the type with the DEST_TYPE index. This is a hack
but there is no SRC2_TYPE and NIR doesn't seem to mind as long as we
know what we mean. This allows the backend to emit a combined "blend
render target #0" instruction taking two sources.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
This commit is contained in:
Alyssa Rosenzweig 2021-10-29 08:48:46 -04:00 committed by Marge Bot
parent e42133aa2f
commit 24ea7cbb06
2 changed files with 2 additions and 1 deletions

View file

@ -1149,7 +1149,7 @@ intrinsic("shared_atomic_comp_swap_dxil", src_comp=[1, 1, 1], dest_comp=1)
# src[] = { value }
store("raw_output_pan", [], [])
store("combined_output_pan", [1, 1, 1], [COMPONENT, SRC_TYPE])
store("combined_output_pan", [1, 1, 1, 4], [COMPONENT, SRC_TYPE, DEST_TYPE])
load("raw_output_pan", [1], [BASE], [CAN_ELIMINATE, CAN_REORDER])
# Loads the sampler paramaters <min_lod, max_lod, lod_bias>

View file

@ -66,6 +66,7 @@ pan_nir_emit_combined_store(nir_builder *b,
rt0_store ? rt0_store->src[1].ssa : zero,
stores[0] ? stores[0]->src[0].ssa : zero,
stores[1] ? stores[1]->src[0].ssa : zero,
zero4,
};
for (int i = 0; i < ARRAY_SIZE(src); ++i)