pan/va: Remove DISCARD.f32 destination
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 18 May 2022 15:57:55 +0000 (11:57 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 May 2022 16:08:26 +0000 (16:08 +0000)
It doesn't actually write anything. This is a pointless divergence from Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16585>

src/panfrost/bifrost/valhall/ISA.xml
src/panfrost/bifrost/valhall/test/test-lower-isel.cpp
src/panfrost/bifrost/valhall/va_lower_isel.c

index c8df64f..cc13897 100644 (file)
     <mod name="eq" start="36" size="1"/>
   </ins>
 
-  <ins name="DISCARD.f32" title="Discard fragment" opcode="0x20" unit="CVT">
+  <ins name="DISCARD.f32" title="Discard fragment" dests="0" opcode="0x20" unit="CVT">
     <desc>
       Evaluates the given condition, and if it passes, discards the current
-      fragment and terminates the thread. The destination should be set to R60.
-      Only valid in a **fragment** shader.
+      fragment and terminates the thread. Only valid in a **fragment** shader.
     </desc>
     <cmp/>
-    <dest>Updated coverage mask (set to R60)</dest>
     <src absneg="true" swizzle="true">Left value to compare</src>
     <src absneg="true" swizzle="true">Right value to compare</src>
   </ins>
index de6994b..aec4ca6 100644 (file)
@@ -69,13 +69,6 @@ TEST_F(LowerIsel, 16BitSwizzles) {
    }
 }
 
-TEST_F(LowerIsel, DiscardImplicitR60) {
-   CASE(bi_discard_f32(b, reg, reg, BI_CMPF_EQ), {
-         bi_instr *I = bi_discard_f32(b, reg, reg, BI_CMPF_EQ);
-         I->dest[0] = bi_register(60);
-   });
-}
-
 TEST_F(LowerIsel, JumpsLoweredToBranches) {
    bi_block block = { };
 
index 4ad22f6..2be3df6 100644 (file)
@@ -41,12 +41,6 @@ va_lower_isel(bi_instr *I)
       I->src[1] = bi_zero();
       break;
 
-   /* Needs to output the coverage mask */
-   case BI_OPCODE_DISCARD_F32:
-      assert(bi_is_null(I->dest[0]));
-      I->dest[0] = bi_register(60);
-      break;
-
    /* Extra source in Valhall not yet modeled in the Bifrost IR */
    case BI_OPCODE_ICMP_I32:
       I->op = BI_OPCODE_ICMP_U32;