panfrost: move lower_image_ms to after lower_atomics
The nir_lower_image_atomics_to_global pass can create some image load/stores, so we need to do the multisample image load/store lowering after this. Also, the pass only actually works on bifrost and below, so skip it for valhall. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
This commit is contained in:
@@ -4982,9 +4982,6 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id)
|
||||
psiz->data.precision = GLSL_PRECISION_MEDIUM;
|
||||
}
|
||||
|
||||
/* lower MSAA load/stores to 3D load/stores */
|
||||
NIR_PASS_V(nir, pan_nir_lower_image_ms);
|
||||
|
||||
/* Get rid of any global vars before we lower to scratch. */
|
||||
NIR_PASS_V(nir, nir_lower_global_vars_to_local);
|
||||
|
||||
@@ -5068,6 +5065,10 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id)
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_image_atomics_to_global);
|
||||
|
||||
/* on bifrost, lower MSAA load/stores to 3D load/stores */
|
||||
if (pan_arch(gpu_id) < 9)
|
||||
NIR_PASS_V(nir, pan_nir_lower_image_ms);
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_alu_to_scalar, bi_scalarize_filter, NULL);
|
||||
NIR_PASS_V(nir, nir_lower_load_const_to_scalar);
|
||||
NIR_PASS_V(nir, nir_lower_phis_to_scalar, true);
|
||||
|
||||
Reference in New Issue
Block a user