freedreno/ir3: Add unit tests for derivatives disasm.
authorEric Anholt <eric@anholt.net>
Tue, 30 Jun 2020 20:05:51 +0000 (13:05 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 18 Jul 2020 00:43:44 +0000 (00:43 +0000)
Since I was going back to look at fine derivs again, add some tests of
instruction encoding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5699>

src/freedreno/ir3/tests/disasm.c

index 539bfc4c2ea30a72245ebdd77b6234322d89959d..6899471b4487c87443f83dba32df3962f6d88262 100644 (file)
@@ -72,6 +72,14 @@ static const struct test {
        INSTR_6XX(8010000a_00000003, "rcp r2.z, r0.w"),
 
        /* cat5 */
+       /* dEQP-VK.glsl.derivate.dfdx.uniform_if.float_mediump */
+       INSTR_6XX(a3801102_00000001, "dsx (f32)(x)r0.z, r0.x"), /* dsx (f32)(xOOO)r0.z, r0.x */
+       /* dEQP-VK.glsl.derivate.dfdy.uniform_if.float_mediump */
+       INSTR_6XX(a3c01102_00000001, "dsy (f32)(x)r0.z, r0.x"), /* dsy (f32)(xOOO)r0.z, r0.x */
+       /* dEQP-VK.glsl.derivate.dfdxfine.uniform_loop.float_highp */
+       INSTR_6XX(a6001105_00000001, "dsxpp.1 (x)r1.y, r0.x"), /* dsxpp.1 (xOOO)r1.y, r0.x */
+       INSTR_6XX(a6201105_00000001, "dsxpp.1.p (x)r1.y, r0.x"), /* dsxpp.1 (xOOO)r1.y, r0.x */
+
        INSTR_6XX(a2802f00_00000001, "getsize (u16)(xyzw)hr0.x, r0.x, t#0"),
 
        /* cat6 */