Mesa (staging/22.0): r300: fix transformation of abs modifiers with negate
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 9 18:32:56 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 763cc4c521877d4ccc1ba25aa976ff75a5a0e9a8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=763cc4c521877d4ccc1ba25aa976ff75a5a0e9a8
Author: Pavel Ondračka <pavel.ondracka at gmail.com>
Date: Mon Feb 7 16:49:38 2022 +0100
r300: fix transformation of abs modifiers with negate
It is being overwritten by the memset. Just set the only remaining
member RelAddr explicitly.
Signed-off-by: Pavel Ondračka <pavel.ondracka at gmail.com>
Reviewed-by: Filip Gawin <filip.gawin at zoho.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14915>
(cherry picked from commit 1f5330de3a6c54faf7a0ed7485c72a2ce40ac744)
---
.pick_status.json | 2 +-
src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 4d5404e1536..cc6aba6685d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -292,7 +292,7 @@
"description": "r300: fix transformation of abs modifiers with negate",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
index de0d98240f3..ea84ad17ece 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
@@ -688,10 +688,10 @@ static int transform_nonnative_modifiers(
new_inst->U.I.SrcReg[1] = inst->U.I.SrcReg[i];
new_inst->U.I.SrcReg[1].Negate ^= RC_MASK_XYZW;
- memset(&inst->U.I.SrcReg[i], 0, sizeof(inst->U.I.SrcReg[i]));
inst->U.I.SrcReg[i].File = RC_FILE_TEMPORARY;
inst->U.I.SrcReg[i].Index = temp;
inst->U.I.SrcReg[i].Swizzle = RC_SWIZZLE_XYZW;
+ inst->U.I.SrcReg[i].RelAddr = 0;
}
}
return 1;
More information about the mesa-commit
mailing list