mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
ac,radeonsi: stop using nir_intrinsic_base for TCS inputs passed via VGPRs
This also removes one use of input_semantic[]. Acked-by: Pierre-Eric Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
This commit is contained in:
parent
c8ce9d4b48
commit
a48ffce4bd
3 changed files with 5 additions and 6 deletions
|
|
@ -2630,7 +2630,8 @@ static LLVMValueRef visit_load_input(struct ac_nir_context *ctx, nir_intrinsic_i
|
|||
LLVMGetElementType(dest_type) : dest_type;
|
||||
|
||||
LLVMValueRef result = ctx->abi->load_tess_varyings(ctx->abi, component_type,
|
||||
base, component, count);
|
||||
nir_intrinsic_io_semantics(instr).location,
|
||||
component, count);
|
||||
if (instr->def.bit_size == 16) {
|
||||
result = ac_to_integer(&ctx->ac, result);
|
||||
result = LLVMBuildTrunc(ctx->ac.builder, result, dest_type, "");
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct ac_shader_abi {
|
|||
bool is_16bit[AC_LLVM_MAX_OUTPUTS * 4];
|
||||
|
||||
LLVMValueRef (*load_tess_varyings)(struct ac_shader_abi *abi, LLVMTypeRef type,
|
||||
unsigned driver_location, unsigned component,
|
||||
gl_varying_slot slot, unsigned component,
|
||||
unsigned num_components);
|
||||
|
||||
LLVMValueRef (*load_ubo)(struct ac_shader_abi *abi, LLVMValueRef index);
|
||||
|
|
|
|||
|
|
@ -11,18 +11,16 @@
|
|||
#include "nir.h"
|
||||
|
||||
static LLVMValueRef si_nir_load_tcs_varyings(struct ac_shader_abi *abi, LLVMTypeRef type,
|
||||
unsigned driver_location, unsigned component,
|
||||
gl_varying_slot slot, unsigned component,
|
||||
unsigned num_components)
|
||||
{
|
||||
struct si_shader_context *ctx = si_shader_context_from_abi(abi);
|
||||
struct si_shader_info *info = &ctx->shader->selector->info;
|
||||
|
||||
assert(ctx->shader->key.ge.opt.same_patch_vertices);
|
||||
|
||||
uint8_t semantic = info->input_semantic[driver_location];
|
||||
/* Load the TCS input from a VGPR. */
|
||||
unsigned func_param = ctx->args->ac.tcs_rel_ids.arg_index + 1 +
|
||||
si_shader_io_get_unique_index(semantic) * 4;
|
||||
si_shader_io_get_unique_index(slot) * 4;
|
||||
|
||||
LLVMValueRef value[4];
|
||||
for (unsigned i = component; i < component + num_components; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue