radv: inline radv_nir_lower_poly_line_smooth

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
This commit is contained in:
Georg Lehmann
2025-02-01 20:21:07 +01:00
committed by Marge Bot
parent b588b56078
commit ff225dee67
4 changed files with 4 additions and 28 deletions
-1
View File
@@ -72,7 +72,6 @@ libradv_files = files(
'nir/radv_nir_lower_hit_attrib_derefs.c',
'nir/radv_nir_lower_intrinsics_early.c',
'nir/radv_nir_lower_io.c',
'nir/radv_nir_lower_poly_line_smooth.c',
'nir/radv_nir_lower_primitive_shading_rate.c',
'nir/radv_nir_lower_ray_queries.c',
'nir/radv_nir_lower_view_index.c',
-2
View File
@@ -69,8 +69,6 @@ void radv_nir_lower_io(struct radv_device *device, nir_shader *nir);
bool radv_nir_lower_io_to_mem(struct radv_device *device, struct radv_shader_stage *stage);
void radv_nir_lower_poly_line_smooth(nir_shader *nir, const struct radv_graphics_state_key *gfx_state);
bool radv_nir_lower_cooperative_matrix(nir_shader *shader, unsigned wave_size);
bool radv_nir_lower_draw_id_to_zero(nir_shader *shader);
@@ -1,23 +0,0 @@
/*
* Copyright © 2023 Valve Corporation
*
* SPDX-License-Identifier: MIT
*/
#include "nir.h"
#include "nir_builder.h"
#include "radv_nir.h"
#include "radv_pipeline_graphics.h"
void
radv_nir_lower_poly_line_smooth(nir_shader *nir, const struct radv_graphics_state_key *gfx_state)
{
bool progress = false;
if (!gfx_state->dynamic_line_rast_mode)
return false;
NIR_PASS(progress, nir, nir_lower_poly_line_smooth, RADV_NUM_SMOOTH_AA_SAMPLES);
if (progress)
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
}
+4 -2
View File
@@ -2727,12 +2727,14 @@ radv_graphics_shaders_compile(struct radv_device *device, struct vk_pipeline_cac
}
if (stages[MESA_SHADER_FRAGMENT].nir) {
radv_nir_lower_poly_line_smooth(stages[MESA_SHADER_FRAGMENT].nir, gfx_state);
bool update_info = false;
if (gfx_state->dynamic_line_rast_mode)
NIR_PASS(update_info, stages[MESA_SHADER_FRAGMENT].nir, nir_lower_poly_line_smooth,
RADV_NUM_SMOOTH_AA_SAMPLES);
if (!gfx_state->ps.has_epilog)
radv_nir_remap_color_attachment(stages[MESA_SHADER_FRAGMENT].nir, gfx_state);
bool update_info = false;
NIR_PASS(update_info, stages[MESA_SHADER_FRAGMENT].nir, nir_opt_frag_coord_to_pixel_coord);
if (update_info)
nir_shader_gather_info(stages[MESA_SHADER_FRAGMENT].nir,