mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
ac: move some code out of loop in store_tcs_output()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
228325f4b7
commit
bebfeb7e1c
1 changed files with 5 additions and 5 deletions
|
|
@ -2881,19 +2881,19 @@ store_tcs_output(struct nir_to_llvm_context *ctx,
|
||||||
buf_addr = get_tcs_tes_buffer_address_params(ctx, param, const_index, is_compact,
|
buf_addr = get_tcs_tes_buffer_address_params(ctx, param, const_index, is_compact,
|
||||||
vertex_index, indir_index);
|
vertex_index, indir_index);
|
||||||
|
|
||||||
|
bool is_tess_factor = false;
|
||||||
|
if (instr->variables[0]->var->data.location == VARYING_SLOT_TESS_LEVEL_INNER ||
|
||||||
|
instr->variables[0]->var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)
|
||||||
|
is_tess_factor = true;
|
||||||
|
|
||||||
unsigned base = is_compact ? const_index : 0;
|
unsigned base = is_compact ? const_index : 0;
|
||||||
for (unsigned chan = 0; chan < 8; chan++) {
|
for (unsigned chan = 0; chan < 8; chan++) {
|
||||||
bool is_tess_factor = false;
|
|
||||||
if (!(writemask & (1 << chan)))
|
if (!(writemask & (1 << chan)))
|
||||||
continue;
|
continue;
|
||||||
LLVMValueRef value = llvm_extract_elem(&ctx->ac, src, chan);
|
LLVMValueRef value = llvm_extract_elem(&ctx->ac, src, chan);
|
||||||
|
|
||||||
lds_store(ctx, dw_addr, value);
|
lds_store(ctx, dw_addr, value);
|
||||||
|
|
||||||
if (instr->variables[0]->var->data.location == VARYING_SLOT_TESS_LEVEL_INNER ||
|
|
||||||
instr->variables[0]->var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)
|
|
||||||
is_tess_factor = true;
|
|
||||||
|
|
||||||
if (!is_tess_factor && writemask != 0xF)
|
if (!is_tess_factor && writemask != 0xF)
|
||||||
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, value, 1,
|
ac_build_buffer_store_dword(&ctx->ac, ctx->hs_ring_tess_offchip, value, 1,
|
||||||
buf_addr, ctx->oc_lds,
|
buf_addr, ctx->oc_lds,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue