radv: remove unnecessary radv_shader_info:{vs,tes}.export_prim_id
Use the VS outputinfo struct instead. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13062>
This commit is contained in:

committed by
Marge Bot

parent
32358b0335
commit
1e5b9b7410
@@ -1180,7 +1180,7 @@ radv_postprocess_config(const struct radv_device *device, const struct ac_shader
|
|||||||
|
|
||||||
config_out->rsrc2 |= S_00B12C_OC_LDS_EN(1) | S_00B12C_EXCP_EN(excp_en);
|
config_out->rsrc2 |= S_00B12C_OC_LDS_EN(1) | S_00B12C_EXCP_EN(excp_en);
|
||||||
} else {
|
} else {
|
||||||
bool enable_prim_id = info->tes.export_prim_id || info->uses_prim_id;
|
bool enable_prim_id = info->tes.outinfo.export_prim_id || info->uses_prim_id;
|
||||||
vgpr_comp_cnt = enable_prim_id ? 3 : 2;
|
vgpr_comp_cnt = enable_prim_id ? 3 : 2;
|
||||||
|
|
||||||
config_out->rsrc1 |= S_00B128_MEM_ORDERED(pdevice->rad_info.chip_class >= GFX10);
|
config_out->rsrc1 |= S_00B128_MEM_ORDERED(pdevice->rad_info.chip_class >= GFX10);
|
||||||
@@ -1231,7 +1231,7 @@ radv_postprocess_config(const struct radv_device *device, const struct ac_shader
|
|||||||
*/
|
*/
|
||||||
if (info->vs.needs_instance_id && pdevice->rad_info.chip_class >= GFX10) {
|
if (info->vs.needs_instance_id && pdevice->rad_info.chip_class >= GFX10) {
|
||||||
vgpr_comp_cnt = 3;
|
vgpr_comp_cnt = 3;
|
||||||
} else if (info->vs.export_prim_id) {
|
} else if (info->vs.outinfo.export_prim_id) {
|
||||||
vgpr_comp_cnt = 2;
|
vgpr_comp_cnt = 2;
|
||||||
} else if (info->vs.needs_instance_id) {
|
} else if (info->vs.needs_instance_id) {
|
||||||
vgpr_comp_cnt = 1;
|
vgpr_comp_cnt = 1;
|
||||||
@@ -1285,7 +1285,7 @@ radv_postprocess_config(const struct radv_device *device, const struct ac_shader
|
|||||||
if (es_stage == MESA_SHADER_VERTEX) {
|
if (es_stage == MESA_SHADER_VERTEX) {
|
||||||
es_vgpr_comp_cnt = info->vs.needs_instance_id ? 3 : 0;
|
es_vgpr_comp_cnt = info->vs.needs_instance_id ? 3 : 0;
|
||||||
} else if (es_stage == MESA_SHADER_TESS_EVAL) {
|
} else if (es_stage == MESA_SHADER_TESS_EVAL) {
|
||||||
bool enable_prim_id = info->tes.export_prim_id || info->uses_prim_id;
|
bool enable_prim_id = info->tes.outinfo.export_prim_id || info->uses_prim_id;
|
||||||
es_vgpr_comp_cnt = enable_prim_id ? 3 : 2;
|
es_vgpr_comp_cnt = enable_prim_id ? 3 : 2;
|
||||||
} else
|
} else
|
||||||
unreachable("Unexpected ES shader stage");
|
unreachable("Unexpected ES shader stage");
|
||||||
|
@@ -307,7 +307,6 @@ struct radv_shader_info {
|
|||||||
struct radv_es_output_info es_info;
|
struct radv_es_output_info es_info;
|
||||||
bool as_es;
|
bool as_es;
|
||||||
bool as_ls;
|
bool as_ls;
|
||||||
bool export_prim_id;
|
|
||||||
bool tcs_in_out_eq;
|
bool tcs_in_out_eq;
|
||||||
uint64_t tcs_temp_only_input_mask;
|
uint64_t tcs_temp_only_input_mask;
|
||||||
uint8_t num_linked_outputs;
|
uint8_t num_linked_outputs;
|
||||||
@@ -338,7 +337,6 @@ struct radv_shader_info {
|
|||||||
enum gl_tess_spacing spacing;
|
enum gl_tess_spacing spacing;
|
||||||
bool ccw;
|
bool ccw;
|
||||||
bool point_mode;
|
bool point_mode;
|
||||||
bool export_prim_id;
|
|
||||||
uint8_t num_linked_inputs;
|
uint8_t num_linked_inputs;
|
||||||
uint8_t num_linked_patch_inputs;
|
uint8_t num_linked_patch_inputs;
|
||||||
uint8_t num_linked_outputs;
|
uint8_t num_linked_outputs;
|
||||||
|
@@ -664,7 +664,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
|
|||||||
info->tes.ccw = nir->info.tess.ccw;
|
info->tes.ccw = nir->info.tess.ccw;
|
||||||
info->tes.point_mode = nir->info.tess.point_mode;
|
info->tes.point_mode = nir->info.tess.point_mode;
|
||||||
info->tes.as_es = key->vs_common_out.as_es;
|
info->tes.as_es = key->vs_common_out.as_es;
|
||||||
info->tes.export_prim_id = key->vs_common_out.export_prim_id;
|
|
||||||
info->is_ngg = key->vs_common_out.as_ngg;
|
info->is_ngg = key->vs_common_out.as_ngg;
|
||||||
info->is_ngg_passthrough = key->vs_common_out.as_ngg_passthrough;
|
info->is_ngg_passthrough = key->vs_common_out.as_ngg_passthrough;
|
||||||
break;
|
break;
|
||||||
@@ -674,7 +673,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
|
|||||||
case MESA_SHADER_VERTEX:
|
case MESA_SHADER_VERTEX:
|
||||||
info->vs.as_es = key->vs_common_out.as_es;
|
info->vs.as_es = key->vs_common_out.as_es;
|
||||||
info->vs.as_ls = key->vs_common_out.as_ls;
|
info->vs.as_ls = key->vs_common_out.as_ls;
|
||||||
info->vs.export_prim_id = key->vs_common_out.export_prim_id;
|
|
||||||
info->is_ngg = key->vs_common_out.as_ngg;
|
info->is_ngg = key->vs_common_out.as_ngg;
|
||||||
info->is_ngg_passthrough = key->vs_common_out.as_ngg_passthrough;
|
info->is_ngg_passthrough = key->vs_common_out.as_ngg_passthrough;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user