From: Eric Anholt Date: Fri, 24 Apr 2020 20:44:40 +0000 (-0700) Subject: freedreno/ir3: Add some more tests of cat6 disasm. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e5b0c92c549b392065f4856a2e5370b2157d961;p=mesa.git freedreno/ir3: Add some more tests of cat6 disasm. I put these together from traces I had while trying to do LDC for GL. Part-of: --- diff --git a/src/freedreno/ir3/tests/disasm.c b/src/freedreno/ir3/tests/disasm.c index ee94578391e..81916c69e5a 100644 --- a/src/freedreno/ir3/tests/disasm.c +++ b/src/freedreno/ir3/tests/disasm.c @@ -73,6 +73,8 @@ static const struct test { /* cat6 */ INSTR_6XX(c0c00000_00000000, "stg.f16 g[hr0.x], hr0.x, hr0.x"), INSTR_6XX(c1100000_c1000000, "stl.f16 l[0], hr0.x, hr48.y"), + INSTR_6XX(c0260000_0063c200, "resinfo.untyped.2d.u32.1 r0.x, r0.x, 0"), /* resinfo.u32.2d.mode0.base0 r0.x, 0 */ + INSTR_6XX(c0260000_0063c000, "resinfo.untyped.1d.u32.1 r0.x, r0.x, 0"), /* resinfo.u32.1d.mode0.base0 r0.x, 0 */ /* discard stuff */ INSTR_6XX(42b400f8_20010004, "cmps.s.eq p0.x, r1.x, 1"), @@ -91,6 +93,28 @@ static const struct test { INSTR_6XX(40100007_68090008, "add.f r1.w, r2.x, (neg)(1/log2(10))"), INSTR_6XX(40100007_680a0008, "add.f r1.w, r2.x, (neg)(log2(10))"), INSTR_6XX(40100007_680b0008, "add.f r1.w, r2.x, (neg)(4.0)"), + + /* LDC. Our disasm differs greatly from qcom here, and we've got some + * important info they lack(?!), but same goes the other way. + */ + /* dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.uniform_fragment */ + INSTR_6XX(c0260000_00c78040, "ldc.offset0.1 r0.x, r0.x, 0"), /* ldc.1.mode1.base0 r0.x, 0, r0.x */ + INSTR_6XX(c0260201_00c78040, "ldc.offset0.1 r0.y, r0.x, 1"), /* ldc.1.mode1.base0 r0.y, 0, r0.y */ + /* dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.dynamically_uniform_fragment */ + INSTR_6XX(c0260000_00c78080, "ldc.offset0.1 r0.x, r0.x, 0"), /* ldc.1.mode2.base0 r0.x, 0, r0.x */ + INSTR_6XX(c0260201_00c78080, "ldc.offset0.1 r0.y, r0.x, 1"), /* ldc.1.mode2.base0 r0.y, 0, r0.y */ + /* custom shaders, loading .x, .y, .z, .w from an array of vec4 in block 0 */ + INSTR_6XX(c0260000_00478000, "ldc.offset0.1 r0.x, r0.x, 0"), /* ldc.1.mode0.base0 r0.x, r0.x, 0 */ + INSTR_6XX(c0260000_00478200, "ldc.offset1.1 r0.x, r0.x, 0"), /* ldc.1.mode0.base0 r0.x, r0.x, 0 */ + INSTR_6XX(c0260000_00478400, "ldc.offset2.1 r0.x, r0.x, 0"), /* ldc.1.mode0.base0 r0.x, r0.x, 0 */ + INSTR_6XX(c0260000_00478600, "ldc.offset3.1 r0.x, r0.x, 0"), /* ldc.1.mode0.base0 r0.x, r0.x, 0 */ + + /* dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.fragment.sampler2d */ + INSTR_6XX(a0c01f04_0cc00005, "sam (f32)(xyzw)r1.x, r0.z, s#6, t#6"), + /* dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.fragment.sampler2d (looks like maybe the compiler didn't figure out */ + INSTR_6XX(a0c81f07_0100000b, "sam.s2en (f32)(xyzw)r1.w, r1.y, hr2.x"), /* sam.s2en.mode0 (f32)(xyzw)r1.w, r1.y, hr2.x */ + /* dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.dynamically_uniform.fragment.sampler2d */ + INSTR_6XX(a0c81f07_8100000b, "sam.s2en.uniform (f32)(xyzw)r1.w, r1.y, hr2.x"), /* sam.s2en.mode4 (f32)(xyzw)r1.w, r1.y, hr2.x */ }; static void