diff options
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 9 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_build.h | 3 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 6 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index cc1eaf1385c..08fedc7bf41 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -547,10 +547,9 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx, LLVMValueRef rsrc, LLVMValueRef vdata, unsigned num_channels, - LLVMValueRef vaddr, + LLVMValueRef voffset, LLVMValueRef soffset, unsigned inst_offset, - bool offen, bool glc, bool slc) { @@ -566,12 +565,12 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx, rsrc, vdata, LLVMConstInt(ctx->i32, num_channels, 0), - vaddr, + voffset ? voffset : LLVMGetUndef(ctx->i32), soffset, LLVMConstInt(ctx->i32, inst_offset, 0), LLVMConstInt(ctx->i32, dfmt[num_channels - 1], 0), LLVMConstInt(ctx->i32, V_008F0C_BUF_NUM_FORMAT_UINT, 0), - LLVMConstInt(ctx->i32, offen, 0), + LLVMConstInt(ctx->i32, voffset != NULL, 0), LLVMConstInt(ctx->i32, 0, 0), /* idxen */ LLVMConstInt(ctx->i32, glc, 0), LLVMConstInt(ctx->i32, slc, 0), @@ -579,7 +578,7 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx, }; /* The instruction offset field has 12 bits */ - assert(offen || inst_offset < (1 << 12)); + assert(voffset || inst_offset < (1 << 12)); /* The intrinsic is overloaded, we need to add a type suffix for overloading to work. */ unsigned func = CLAMP(num_channels, 1, 3) - 1; diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index 65a9a055a72..78df441b6dc 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -126,10 +126,9 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx, LLVMValueRef rsrc, LLVMValueRef vdata, unsigned num_channels, - LLVMValueRef vaddr, + LLVMValueRef voffset, LLVMValueRef soffset, unsigned inst_offset, - bool offen, bool glc, bool slc); LLVMValueRef diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index d7c9d5968d9..c3634701dad 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3159,7 +3159,7 @@ visit_emit_vertex(struct nir_to_llvm_context *ctx, ac_build_buffer_store_dword(&ctx->ac, ctx->gsvs_ring, out_val, 1, voffset, ctx->gs2vs_offset, 0, - 1, 1, 1); + 1, 1); } idx += slot_inc; } @@ -4673,9 +4673,9 @@ handle_es_outputs_post(struct nir_to_llvm_context *ctx) ac_build_buffer_store_dword(&ctx->ac, ctx->esgs_ring, out_val, 1, - LLVMGetUndef(ctx->i32), ctx->es2gs_offset, + NULL, ctx->es2gs_offset, (4 * param_index + j + start) * 4, - 0, 1, 1); + 1, 1); } } ctx->shader_info->vs.esgs_itemsize = (max_output_written + 1) * 16; |