From: Alyssa Rosenzweig Date: Wed, 18 May 2022 15:57:55 +0000 (-0400) Subject: pan/va: Remove DISCARD.f32 destination X-Git-Tag: upstream/22.3.5~8588 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fb8ca1851b2670fa019ea01dc8c549a812e3e87;p=platform%2Fupstream%2Fmesa.git pan/va: Remove DISCARD.f32 destination It doesn't actually write anything. This is a pointless divergence from Bifrost. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/valhall/ISA.xml b/src/panfrost/bifrost/valhall/ISA.xml index c8df64f..cc13897 100644 --- a/src/panfrost/bifrost/valhall/ISA.xml +++ b/src/panfrost/bifrost/valhall/ISA.xml @@ -805,14 +805,12 @@ - + 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. - Updated coverage mask (set to R60) Left value to compare Right value to compare diff --git a/src/panfrost/bifrost/valhall/test/test-lower-isel.cpp b/src/panfrost/bifrost/valhall/test/test-lower-isel.cpp index de6994b..aec4ca6 100644 --- a/src/panfrost/bifrost/valhall/test/test-lower-isel.cpp +++ b/src/panfrost/bifrost/valhall/test/test-lower-isel.cpp @@ -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 = { }; diff --git a/src/panfrost/bifrost/valhall/va_lower_isel.c b/src/panfrost/bifrost/valhall/va_lower_isel.c index 4ad22f6..2be3df6 100644 --- a/src/panfrost/bifrost/valhall/va_lower_isel.c +++ b/src/panfrost/bifrost/valhall/va_lower_isel.c @@ -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;