radv: move a few passes to after load/store vectorization
load/store vectorization can create 8/16-bit alu to do packing/unpacking, which would make shader_info::bit_sizes_used out of date. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4791>
This commit is contained in:
@@ -3101,9 +3101,6 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
|
|||||||
if (nir[i]) {
|
if (nir[i]) {
|
||||||
radv_start_feedback(stage_feedbacks[i]);
|
radv_start_feedback(stage_feedbacks[i]);
|
||||||
|
|
||||||
/* do this again since information such as outputs_read can be out-of-date */
|
|
||||||
nir_shader_gather_info(nir[i], nir_shader_get_entrypoint(nir[i]));
|
|
||||||
|
|
||||||
if (!radv_use_llvm_for_stage(device, i)) {
|
if (!radv_use_llvm_for_stage(device, i)) {
|
||||||
NIR_PASS_V(nir[i], nir_lower_non_uniform_access,
|
NIR_PASS_V(nir[i], nir_lower_non_uniform_access,
|
||||||
nir_lower_non_uniform_ubo_access |
|
nir_lower_non_uniform_ubo_access |
|
||||||
@@ -3113,8 +3110,6 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
|
|||||||
}
|
}
|
||||||
NIR_PASS_V(nir[i], nir_lower_memory_model);
|
NIR_PASS_V(nir[i], nir_lower_memory_model);
|
||||||
|
|
||||||
radv_lower_io(device, nir[i]);
|
|
||||||
|
|
||||||
bool lower_to_scalar = false;
|
bool lower_to_scalar = false;
|
||||||
bool lower_pack = false;
|
bool lower_pack = false;
|
||||||
nir_variable_mode robust_modes = (nir_variable_mode)0;
|
nir_variable_mode robust_modes = (nir_variable_mode)0;
|
||||||
@@ -3135,6 +3130,11 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
|
|||||||
lower_pack = true;
|
lower_pack = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* do this again since information such as outputs_read can be out-of-date */
|
||||||
|
nir_shader_gather_info(nir[i], nir_shader_get_entrypoint(nir[i]));
|
||||||
|
|
||||||
|
radv_lower_io(device, nir[i]);
|
||||||
|
|
||||||
lower_to_scalar |= nir_opt_shrink_vectors(nir[i]);
|
lower_to_scalar |= nir_opt_shrink_vectors(nir[i]);
|
||||||
|
|
||||||
if (lower_to_scalar)
|
if (lower_to_scalar)
|
||||||
|
Reference in New Issue
Block a user