mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
radeonsi: use tgsi_shader_info in fetch_input_gs
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
7a645c5366
commit
e23fec1445
1 changed files with 5 additions and 4 deletions
|
|
@ -354,10 +354,11 @@ static LLVMValueRef fetch_input_gs(
|
||||||
LLVMValueRef t_list;
|
LLVMValueRef t_list;
|
||||||
LLVMValueRef args[9];
|
LLVMValueRef args[9];
|
||||||
unsigned vtx_offset_param;
|
unsigned vtx_offset_param;
|
||||||
struct si_shader_input *input = &shader->input[reg->Register.Index];
|
struct tgsi_shader_info *info = &shader->selector->info;
|
||||||
|
unsigned semantic_name = info->input_semantic_name[reg->Register.Index];
|
||||||
|
unsigned semantic_index = info->input_semantic_index[reg->Register.Index];
|
||||||
|
|
||||||
if (swizzle != ~0 &&
|
if (swizzle != ~0 && semantic_name == TGSI_SEMANTIC_PRIMID) {
|
||||||
shader->input[reg->Register.Index].name == TGSI_SEMANTIC_PRIMID) {
|
|
||||||
if (swizzle == 0)
|
if (swizzle == 0)
|
||||||
return LLVMGetParam(si_shader_ctx->radeon_bld.main_fn,
|
return LLVMGetParam(si_shader_ctx->radeon_bld.main_fn,
|
||||||
SI_PARAM_PRIMITIVE_ID);
|
SI_PARAM_PRIMITIVE_ID);
|
||||||
|
|
@ -400,7 +401,7 @@ static LLVMValueRef fetch_input_gs(
|
||||||
args[0] = t_list;
|
args[0] = t_list;
|
||||||
args[1] = vtx_offset;
|
args[1] = vtx_offset;
|
||||||
args[2] = lp_build_const_int32(gallivm,
|
args[2] = lp_build_const_int32(gallivm,
|
||||||
(get_param_index(input->name, input->sid,
|
(get_param_index(semantic_name, semantic_index,
|
||||||
shader->selector->gs_used_inputs) * 4 +
|
shader->selector->gs_used_inputs) * 4 +
|
||||||
swizzle) * 256);
|
swizzle) * 256);
|
||||||
args[3] = uint->zero;
|
args[3] = uint->zero;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue