Mesa (main): r300: prefer old not native swizzle in constant folding
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 20 19:16:16 UTC 2022
Module: Mesa
Branch: main
Commit: 6cbb19110b4daa19e719228bdf2c1d7750ca0e4b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cbb19110b4daa19e719228bdf2c1d7750ca0e4b
Author: Filip Gawin <filip at gawin.net>
Date: Sat Jun 18 13:57:14 2022 +0200
r300: prefer old not native swizzle in constant folding
r300 and r400 have strict rules with swizzles, so we
will need to convert swizzle back.
Operating on 0, 1, H in this case unnecessarily makes
rest of r300 overly complicated.
(also it's not currently able to handle this)
helps with:
deqp-gles2 at functional@shaders at random@exponential at fragment@24
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17117>
---
src/gallium/drivers/r300/compiler/radeon_optimize.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c
index 2609534187d..019d7abf4cb 100644
--- a/src/gallium/drivers/r300/compiler/radeon_optimize.c
+++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c
@@ -396,8 +396,7 @@ static void constant_folding(struct radeon_compiler * c, struct rc_instruction *
}
/* don't make the swizzle worse */
- if (!c->SwizzleCaps->IsNative(inst->U.I.Opcode, newsrc) &&
- c->SwizzleCaps->IsNative(inst->U.I.Opcode, inst->U.I.SrcReg[src]))
+ if (!c->SwizzleCaps->IsNative(inst->U.I.Opcode, newsrc))
continue;
inst->U.I.SrcReg[src] = newsrc;
More information about the mesa-commit
mailing list