mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
radeonsi: use bounded indexing for constant buffers
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
a64dbdf612
commit
713353db18
1 changed files with 3 additions and 2 deletions
|
|
@ -1328,8 +1328,9 @@ static LLVMValueRef fetch_constant(
|
|||
if (reg->Register.Dimension && reg->Dimension.Indirect) {
|
||||
LLVMValueRef ptr = LLVMGetParam(ctx->radeon_bld.main_fn, SI_PARAM_CONST_BUFFERS);
|
||||
LLVMValueRef index;
|
||||
index = get_indirect_index(ctx, ®->DimIndirect,
|
||||
reg->Dimension.Index);
|
||||
index = get_bounded_indirect_index(ctx, ®->DimIndirect,
|
||||
reg->Dimension.Index,
|
||||
SI_NUM_USER_CONST_BUFFERS);
|
||||
bufp = build_indexed_load_const(ctx, ptr, index);
|
||||
} else
|
||||
bufp = ctx->const_buffers[buf];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue