mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
agx: don't produce split of immediate
can't be consumed, affects KHR-GL42.shader_image_load_store.basic-allTargets-load-ms Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
parent
6e2c71dc3b
commit
982e644d18
2 changed files with 8 additions and 0 deletions
|
|
@ -249,6 +249,12 @@ agx_subdivide_to(agx_builder *b, agx_index dst, agx_index s0, unsigned comp)
|
|||
assert((s0.size == (dst.size + 1)) && "only 2x subdivide handled");
|
||||
assert((comp == 0 || comp == 1) && "too many components");
|
||||
|
||||
/* Handle immediates specially so we don't have to constant fold splits. */
|
||||
if (s0.type == AGX_INDEX_IMMEDIATE) {
|
||||
unsigned bits = 16 * agx_size_align_16(dst.size);
|
||||
return agx_mov_imm_to(b, dst, (s0.value >> bits) & BITFIELD64_MASK(bits));
|
||||
}
|
||||
|
||||
agx_instr *split = agx_split(b, 2, s0);
|
||||
split->dest[comp] = dst;
|
||||
split->dest[1 - comp] = agx_temp(b->shader, dst.size);
|
||||
|
|
|
|||
|
|
@ -163,6 +163,8 @@ agx_optimizer_inline_imm(agx_instr **defs, agx_instr *I, unsigned srcs,
|
|||
if ((I->op == AGX_OPCODE_LOCAL_LOAD || I->op == AGX_OPCODE_DEVICE_LOAD) &&
|
||||
s != 1)
|
||||
continue;
|
||||
if (I->op == AGX_OPCODE_SPLIT)
|
||||
continue;
|
||||
|
||||
if (I->op == AGX_OPCODE_IMAGE_WRITE &&
|
||||
!image_write_source_can_be_immediate(I, s))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue