From 1ec2c58de0154c502d9d6ec1f2d72418a914e825 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 21 Dec 2021 18:52:31 +0100 Subject: [PATCH] r300: fix handling swizzle in transform_source_conflicts these tests are now passing: dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec2_vertex,Fail dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec3_vertex,Fail dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec4_vertex,Fail dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec2_vertex,Fail dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec3_vertex,Fail dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec4_vertex,Fail Fixes: 1c2c4ddbd1e9 ("r300g: copy the compiler from r300c") Reviewed-by: Emma Anholt Part-of: (cherry picked from commit 2ddfb9c256bf18c3031eac28dae04745668f3299) --- .pick_status.json | 2 +- src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9f56c1cdfc4..d39e6ceb184 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3550,7 +3550,7 @@ "description": "r300: fix handling swizzle in transform_source_conflicts", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1c2c4ddbd1e97bfd13430521e5c09cb5ce8e36e6" }, diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c index 24121ca8fe4..f4ba0e1abae 100644 --- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c +++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c @@ -732,10 +732,13 @@ static int transform_source_conflicts( inst_mov->U.I.DstReg.File = RC_FILE_TEMPORARY; inst_mov->U.I.DstReg.Index = tmpreg; inst_mov->U.I.SrcReg[0] = inst->U.I.SrcReg[2]; + inst_mov->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW; + inst_mov->U.I.SrcReg[0].Negate = 0; + inst_mov->U.I.SrcReg[0].Abs = 0; - reset_srcreg(&inst->U.I.SrcReg[2]); inst->U.I.SrcReg[2].File = RC_FILE_TEMPORARY; inst->U.I.SrcReg[2].Index = tmpreg; + inst->U.I.SrcReg[2].RelAddr = false; } } @@ -747,10 +750,13 @@ static int transform_source_conflicts( inst_mov->U.I.DstReg.File = RC_FILE_TEMPORARY; inst_mov->U.I.DstReg.Index = tmpreg; inst_mov->U.I.SrcReg[0] = inst->U.I.SrcReg[1]; + inst_mov->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW; + inst_mov->U.I.SrcReg[0].Negate = 0; + inst_mov->U.I.SrcReg[0].Abs = 0; - reset_srcreg(&inst->U.I.SrcReg[1]); inst->U.I.SrcReg[1].File = RC_FILE_TEMPORARY; inst->U.I.SrcReg[1].Index = tmpreg; + inst->U.I.SrcReg[1].RelAddr = false; } }