pan/bi: Export bifrost_nir_lower_load_output

If new load_output are created after preprocessing NIR (namely, from blend
lowering in panvk), this lowering needs to be called to lower load_output to the
vendor intrinsic with conversion descriptor.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906>
This commit is contained in:
Alyssa Rosenzweig
2023-02-19 22:47:24 -05:00
committed by Marge Bot
parent f888994679
commit 24693d8a7c
2 changed files with 12 additions and 2 deletions
+11 -2
View File
@@ -4674,6 +4674,16 @@ bi_lower_load_output(nir_builder *b, nir_instr *instr, UNUSED void *data)
return true;
}
bool
bifrost_nir_lower_load_output(nir_shader *nir)
{
assert(nir->info.stage == MESA_SHADER_FRAGMENT);
return nir_shader_instructions_pass(
nir, bi_lower_load_output,
nir_metadata_block_index | nir_metadata_dominance, NULL);
}
void
bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id)
{
@@ -4730,8 +4740,7 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id)
NIR_PASS_V(nir, nir_shader_instructions_pass, bi_lower_sample_mask_writes,
nir_metadata_block_index | nir_metadata_dominance, NULL);
NIR_PASS_V(nir, nir_shader_instructions_pass, bi_lower_load_output,
nir_metadata_block_index | nir_metadata_dominance, NULL);
NIR_PASS_V(nir, bifrost_nir_lower_load_output);
} else if (nir->info.stage == MESA_SHADER_VERTEX) {
if (gpu_id >= 0x9000) {
NIR_PASS_V(nir, nir_lower_mediump_io, nir_var_shader_out,
+1
View File
@@ -28,3 +28,4 @@
bool bifrost_nir_lower_algebraic_late(nir_shader *shader);
bool bifrost_nir_lower_xfb(nir_shader *shader);
bool bifrost_nir_opt_boolean_bitwise(nir_shader *shader);
bool bifrost_nir_lower_load_output(nir_shader *nir);