diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 9baee2a692a..4bae3d2d396 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -646,7 +646,8 @@ setup_nir(isel_context *ctx, nir_shader *nir) lower_to_scalar = true; lower_pack = true; } - if (nir->info.stage != MESA_SHADER_COMPUTE) + if (nir->info.stage != MESA_SHADER_COMPUTE && + nir->info.stage != MESA_SHADER_FRAGMENT) nir_lower_io(nir, nir_var_shader_in | nir_var_shader_out, type_size, (nir_lower_io_options)0); lower_to_scalar |= nir_opt_shrink_vectors(nir); diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index d7cdff10ff8..e2f8d56bfbe 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -758,7 +758,7 @@ radv_lower_fs_io(nir_shader *nir) nir_assign_io_var_locations(nir, nir_var_shader_in, &nir->num_inputs, MESA_SHADER_FRAGMENT); - NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in, type_size_vec4, 0); + NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out, type_size_vec4, 0); /* This pass needs actual constants */ nir_opt_constant_folding(nir);