Mesa (main): r300: fix handling swizzle in transform_source_conflicts

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 29 18:36:08 UTC 2021


Module: Mesa
Branch: main
Commit: 2ddfb9c256bf18c3031eac28dae04745668f3299
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ddfb9c256bf18c3031eac28dae04745668f3299

Author: Filip Gawin <filip.gawin at zoho.com>
Date:   Tue Dec 21 18:52:31 2021 +0100

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 <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14282>

---

 src/gallium/drivers/r300/ci/r300-rv515-fails.txt  |  8 --------
 src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 10 ++++++++--
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/r300/ci/r300-rv515-fails.txt b/src/gallium/drivers/r300/ci/r300-rv515-fails.txt
index 9263ec35926..58b6d8c5e01 100644
--- a/src/gallium/drivers/r300/ci/r300-rv515-fails.txt
+++ b/src/gallium/drivers/r300/ci/r300-rv515-fails.txt
@@ -80,14 +80,6 @@ dEQP-GLES2.functional.shaders.return.return_in_dynamic_loop_dynamic_vertex,Fail
 
 dEQP-GLES2.functional.shaders.random.texture.fragment.141,Fail
 
-# VS: Only the first channel of a POW result is right it looks like.
-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
-
 dEQP-GLES2.functional.shaders.struct.local.dynamic_loop_nested_struct_array_fragment,Fail
 
 dEQP-GLES2.functional.texture.format.a8_cube_npot,Fail
diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
index 58f5d0ad60d..42d7af49fdb 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
@@ -717,10 +717,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;
 		}
 	}
 
@@ -732,10 +735,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;
 		}
 	}
 



More information about the mesa-commit mailing list