mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
pan/compiler: Collect nopersp varyings in lower_noperspective_fs
Now that lower_noperspective_fs and varying collection are closer together we can merge nopersp collection in lower_noperspective_fs without fear of desyncrhonization, making everything also a bit cleaner. Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40924>
This commit is contained in:
parent
dfdb9f1d41
commit
d2f7b8db9d
3 changed files with 8 additions and 7 deletions
|
|
@ -885,7 +885,8 @@ bifrost_postprocess_nir(nir_shader *nir,
|
|||
NIR_PASS(_, nir, nir_lower_is_helper_invocation);
|
||||
NIR_PASS(_, nir, pan_nir_lower_helper_invocation);
|
||||
NIR_PASS(_, nir, pan_nir_lower_sample_pos);
|
||||
NIR_PASS(_, nir, pan_nir_lower_noperspective_fs);
|
||||
NIR_PASS(_, nir, pan_nir_lower_noperspective_fs,
|
||||
&info->varyings.noperspective);
|
||||
NIR_PASS(_, nir, nir_lower_frag_coord_to_pixel_coord);
|
||||
NIR_PASS(_, nir, pan_nir_lower_var_special_pan);
|
||||
|
||||
|
|
@ -902,10 +903,6 @@ bifrost_postprocess_nir(nir_shader *nir,
|
|||
inputs->trust_varying_flat_highp_types,
|
||||
false /* lower mediump */);
|
||||
|
||||
/* TODO: This can go in lower_noperspective_fs */
|
||||
info->varyings.noperspective =
|
||||
pan_nir_collect_noperspective_varyings_fs(nir);
|
||||
|
||||
if (!inputs->is_blend)
|
||||
NIR_PASS(_, nir, pan_nir_lower_fs_inputs, inputs->gpu_id,
|
||||
inputs->varying_layout, info);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ bool pan_nir_lower_image_ms(nir_shader *shader);
|
|||
|
||||
bool pan_nir_lower_var_special_pan(nir_shader *shader);
|
||||
bool pan_nir_lower_noperspective_vs(nir_shader *shader);
|
||||
bool pan_nir_lower_noperspective_fs(nir_shader *shader);
|
||||
bool pan_nir_lower_noperspective_fs(nir_shader *shader,
|
||||
uint32_t *noperspective_varyings);
|
||||
|
||||
bool pan_nir_lower_vs_outputs(nir_shader *shader, uint64_t gpu_id,
|
||||
const struct pan_varying_layout *varying_layout,
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ pan_nir_lower_noperspective_vs(nir_shader *shader)
|
|||
}
|
||||
|
||||
bool
|
||||
pan_nir_lower_noperspective_fs(nir_shader *shader)
|
||||
pan_nir_lower_noperspective_fs(nir_shader *shader,
|
||||
uint32_t *noperspective_varyings)
|
||||
{
|
||||
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
|
||||
|
||||
|
|
@ -226,5 +227,7 @@ pan_nir_lower_noperspective_fs(nir_shader *shader)
|
|||
nir_shader_intrinsics_pass(shader, lower_noperspective_fs,
|
||||
nir_metadata_control_flow, NULL);
|
||||
|
||||
*noperspective_varyings =
|
||||
pan_nir_collect_noperspective_varyings_fs(shader);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue