mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
tgsi_exec: Roll the loops for condmask handling.
No need to hand-unroll this, the compiler will do it. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9347>
This commit is contained in:
parent
ac6aad3d59
commit
3429c83f87
1 changed files with 6 additions and 24 deletions
|
|
@ -5489,18 +5489,9 @@ exec_instruction(
|
|||
assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
|
||||
mach->CondStack[mach->CondStackTop++] = mach->CondMask;
|
||||
FETCH( &r[0], 0, TGSI_CHAN_X );
|
||||
/* update CondMask */
|
||||
if( ! r[0].f[0] ) {
|
||||
mach->CondMask &= ~0x1;
|
||||
}
|
||||
if( ! r[0].f[1] ) {
|
||||
mach->CondMask &= ~0x2;
|
||||
}
|
||||
if( ! r[0].f[2] ) {
|
||||
mach->CondMask &= ~0x4;
|
||||
}
|
||||
if( ! r[0].f[3] ) {
|
||||
mach->CondMask &= ~0x8;
|
||||
for (int i = 0; i < TGSI_QUAD_SIZE; i++) {
|
||||
if (!r[0].f[i])
|
||||
mach->CondMask &= ~(1 << i);
|
||||
}
|
||||
UPDATE_EXEC_MASK(mach);
|
||||
/* Todo: If CondMask==0, jump to ELSE */
|
||||
|
|
@ -5511,18 +5502,9 @@ exec_instruction(
|
|||
assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
|
||||
mach->CondStack[mach->CondStackTop++] = mach->CondMask;
|
||||
IFETCH( &r[0], 0, TGSI_CHAN_X );
|
||||
/* update CondMask */
|
||||
if( ! r[0].u[0] ) {
|
||||
mach->CondMask &= ~0x1;
|
||||
}
|
||||
if( ! r[0].u[1] ) {
|
||||
mach->CondMask &= ~0x2;
|
||||
}
|
||||
if( ! r[0].u[2] ) {
|
||||
mach->CondMask &= ~0x4;
|
||||
}
|
||||
if( ! r[0].u[3] ) {
|
||||
mach->CondMask &= ~0x8;
|
||||
for (int i = 0; i < TGSI_QUAD_SIZE; i++) {
|
||||
if (!r[0].u[i])
|
||||
mach->CondMask &= ~(1 << i);
|
||||
}
|
||||
UPDATE_EXEC_MASK(mach);
|
||||
/* Todo: If CondMask==0, jump to ELSE */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue