mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
aco: fix 16-bit VS inputs
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Fixes:3fba5bb9cc("aco: implement 16-bit vertex fetches with tbuffer_load_format_d16_*") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225> (cherry picked from commit3260844448)
This commit is contained in:
parent
3f3ecdccb1
commit
064abf28b6
2 changed files with 6 additions and 6 deletions
|
|
@ -9877,7 +9877,7 @@
|
|||
"description": "aco: fix 16-bit VS inputs",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "3fba5bb9cc49aa526ce9b108229aa7e01349275d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5556,7 +5556,7 @@ visit_load_input(isel_context* ctx, nir_intrinsic_instr* instr)
|
|||
bool use_mubuf =
|
||||
(nfmt == V_008F0C_BUF_NUM_FORMAT_FLOAT || nfmt == V_008F0C_BUF_NUM_FORMAT_UINT ||
|
||||
nfmt == V_008F0C_BUF_NUM_FORMAT_SINT) &&
|
||||
vtx_info->chan_byte_size == 4;
|
||||
vtx_info->chan_byte_size == 4 && bitsize != 16;
|
||||
unsigned fetch_dfmt = V_008F0C_BUF_DATA_FORMAT_INVALID;
|
||||
if (!use_mubuf) {
|
||||
fetch_dfmt =
|
||||
|
|
@ -5647,7 +5647,7 @@ visit_load_input(isel_context* ctx, nir_intrinsic_instr* instr)
|
|||
mtbuf->mtbuf().vtx_binding = attrib_binding + 1;
|
||||
}
|
||||
|
||||
emit_split_vector(ctx, fetch_dst, fetch_dst.size());
|
||||
emit_split_vector(ctx, fetch_dst, fetch_dst.bytes() * 8 / bitsize);
|
||||
|
||||
if (fetch_component == 1) {
|
||||
channels[channel_start] = fetch_dst;
|
||||
|
|
@ -5679,11 +5679,11 @@ visit_load_input(isel_context* ctx, nir_intrinsic_instr* instr)
|
|||
num_temp++;
|
||||
elems[i] = channel;
|
||||
} else if (is_float && idx == 3) {
|
||||
vec->operands[i] = Operand::c32(0x3f800000u);
|
||||
vec->operands[i] = bitsize == 16 ? Operand::c16(0x3c00u) : Operand::c32(0x3f800000u);
|
||||
} else if (!is_float && idx == 3) {
|
||||
vec->operands[i] = Operand::c32(1u);
|
||||
vec->operands[i] = Operand::get_const(ctx->options->gfx_level, 1u, bitsize / 8u);
|
||||
} else {
|
||||
vec->operands[i] = Operand::zero();
|
||||
vec->operands[i] = Operand::zero(bitsize / 8u);
|
||||
}
|
||||
}
|
||||
vec->definitions[0] = Definition(dst);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue