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

Author: Pavel Ondračka <pavel.ondra...@gmail.com>
Date:   Fri Dec 15 11:49:02 2023 +0100

r300: remove backend CMP lowering

Leave assert in place for now though.

No changes in shader-db.

Reviewed-by: Filip Gawin <filip.ga...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26816>

---

 .../drivers/r300/compiler/radeon_program_alu.c     | 25 +---------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.c 
b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
index 85e8afb3ed4..c809ff01c74 100644
--- a/src/gallium/drivers/r300/compiler/radeon_program_alu.c
+++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
@@ -363,30 +363,7 @@ static void transform_r300_vertex_CMP(struct 
radeon_compiler* c,
        if (c->is_r500 && !rc_inst_has_three_diff_temp_srcs(inst))
                return;
 
-       /* There is no decent CMP available on r300, so let's rig one up.
-        * CMP is defined as dst = src0 < 0.0 ? src1 : src2
-        * The following sequence consumes zero to two temps and two extra slots
-        * (the second temp and the second slot is consumed by transform_LRP),
-        * but should be equivalent:
-        *
-        * SLT tmp0, src0, 0.0
-        * LRP dst, tmp0, src1, src2
-        *
-        * Yes, I know, I'm a mad scientist. ~ C. & M. */
-       struct rc_dst_register dst = new_dst_reg(c, inst);
-
-       /* SLT tmp0, src0, 0.0 */
-       emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
-               dst,
-               inst->U.I.SrcReg[0], builtin_zero);
-
-       /* LRP dst, tmp0, src1, src2 */
-       transform_LRP(c,
-               emit3(c, inst->Prev, RC_OPCODE_LRP, NULL,
-                     inst->U.I.DstReg,
-                     srcreg(RC_FILE_TEMPORARY, dst.Index), 
inst->U.I.SrcReg[1],  inst->U.I.SrcReg[2]));
-
-       rc_remove_instruction(inst);
+       unreachable();
 }
 
 static void transform_r300_vertex_DP2(struct radeon_compiler* c,

Reply via email to