radeonsi: remove dead code in TCS/TES/GS since const_index is always 0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>
This commit is contained in:
@@ -104,7 +104,7 @@ static LLVMValueRef si_nir_load_input_gs(struct ac_shader_abi *abi, unsigned loc
|
||||
|
||||
LLVMValueRef value[4];
|
||||
for (unsigned i = component; i < component + num_components; i++) {
|
||||
value[i] = si_llvm_load_input_gs(&ctx->abi, driver_location / 4 + const_index,
|
||||
value[i] = si_llvm_load_input_gs(&ctx->abi, driver_location / 4,
|
||||
vertex_index, type, i);
|
||||
}
|
||||
|
||||
|
@@ -415,7 +415,7 @@ static LLVMValueRef si_nir_load_tcs_varyings(struct ac_shader_abi *abi, LLVMType
|
||||
}
|
||||
|
||||
if (!param_index) {
|
||||
param_index = LLVMConstInt(ctx->ac.i32, const_index, 0);
|
||||
param_index = ctx->ac.i32_0;
|
||||
}
|
||||
|
||||
dw_addr = get_dw_address_from_generic_indices(ctx, stride, dw_addr, vertex_index, param_index,
|
||||
@@ -449,7 +449,7 @@ static LLVMValueRef si_nir_load_input_tes(struct ac_shader_abi *abi, LLVMTypeRef
|
||||
base = ac_get_arg(&ctx->ac, ctx->tcs_offchip_offset);
|
||||
|
||||
if (!param_index) {
|
||||
param_index = LLVMConstInt(ctx->ac.i32, const_index, 0);
|
||||
param_index = ctx->ac.i32_0;
|
||||
}
|
||||
|
||||
addr =
|
||||
@@ -483,7 +483,7 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi, const struct nir_
|
||||
|
||||
bool is_const = !param_index;
|
||||
if (!param_index)
|
||||
param_index = LLVMConstInt(ctx->ac.i32, const_index, 0);
|
||||
param_index = ctx->ac.i32_0;
|
||||
|
||||
const bool is_patch = vertex_index == NULL;
|
||||
|
||||
@@ -502,7 +502,7 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi, const struct nir_
|
||||
dw_addr = get_dw_address_from_generic_indices(ctx, NULL, dw_addr, vertex_index, param_index,
|
||||
semantic);
|
||||
|
||||
if (is_const && const_index == 0) {
|
||||
if (is_const) {
|
||||
int semantic = info->output_semantic[driver_location];
|
||||
|
||||
/* Always write tess factors into LDS for the TCS epilog. */
|
||||
|
Reference in New Issue
Block a user