agx: model 64-bit uniform restriction on ALU

this one is annoying!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
Alyssa Rosenzweig
2024-03-01 13:13:36 -04:00
committed by Marge Bot
parent 5b6640d013
commit 6e2cc790eb
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -927,7 +927,7 @@ agx_builder_insert(agx_cursor *cursor, agx_instr *I)
}
bool agx_instr_accepts_uniform(enum agx_opcode op, unsigned src_index,
unsigned value);
unsigned value, enum agx_size size);
/* Routines defined for AIR */
void agx_print_index(agx_index index, bool is_float, FILE *fp);
@@ -14,11 +14,14 @@
*/
bool
agx_instr_accepts_uniform(enum agx_opcode op, unsigned src_index,
unsigned value)
unsigned value, enum agx_size size)
{
/* Some instructions only seem able to access uniforms in the low half */
bool high = value >= 256;
/* ALU cannot access 64-bit uniforms */
bool is_64 = size == AGX_SIZE_64;
switch (op) {
case AGX_OPCODE_IMAGE_LOAD:
case AGX_OPCODE_TEXTURE_LOAD:
@@ -52,7 +55,7 @@ agx_instr_accepts_uniform(enum agx_opcode op, unsigned src_index,
case AGX_OPCODE_STACK_STORE:
return false;
default:
return true;
return !is_64;
}
}
@@ -64,7 +67,8 @@ agx_lower_uniform_sources(agx_context *ctx)
agx_foreach_src(I, s) {
if (I->src[s].type == AGX_INDEX_UNIFORM &&
!agx_instr_accepts_uniform(I->op, s, I->src[s].value)) {
!agx_instr_accepts_uniform(I->op, s, I->src[s].value,
I->src[s].size)) {
agx_index idx = I->src[s];
idx.abs = idx.neg = false;