freedreno/ir3/parser: Fix pre-a6xx resinfo

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8175>
This commit is contained in:
Rob Clark
2020-12-30 16:58:09 -08:00
committed by Marge Bot
parent 32539c1afc
commit 1746c4d211
2 changed files with 16 additions and 2 deletions

View File

@@ -953,6 +953,10 @@ cat6_atomic_l: cat6_atomic_opc cat6_typed cat6_dim cat6_type '.' cat6_immed
cat6_atomic: cat6_atomic_g
| cat6_atomic_l
cat6_ibo_opc_1src: T_OP_RESINFO { new_instr(OPC_RESINFO)->cat6.type = TYPE_U32; }
cat6_ibo: cat6_ibo_opc_1src cat6_dim dst_reg ',' 'g' '[' cat6_reg_or_immed ']'
cat6_id_opc:
T_OP_GETSPID { new_instr(OPC_GETSPID); }
| T_OP_GETWID { new_instr(OPC_GETWID); }
@@ -1009,6 +1013,7 @@ cat6_instr: cat6_load
| cat6_storeib
| cat6_prefetch
| cat6_atomic
| cat6_ibo
| cat6_id
| cat6_bindless_ldc
| cat6_bindless_ibo

View File

@@ -172,12 +172,21 @@ static const struct test {
INSTR_6XX(c0260000_0063c000, "resinfo.b.untyped.1d.u32.1.imm r0.x, 0"), /* resinfo.u32.1d.mode0.base0 r0.x, 0 */
/* dEQP-VK.image.image_size.2d.readonly_12x34.txt */
INSTR_6XX(c0260000_0063c300, "resinfo.b.untyped.2d.u32.1.imm.base0 r0.x, 0"), /* resinfo.u32.2d.mode4.base0 r0.x, 0 */
/* dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_7 */
INSTR_5XX(c3e60000_00000e00, "resinfo.4d r0.x, g[0]"), /* resinfo.u32.1dtype r0.x, 0 */
/* dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_32x32.txt */
INSTR_5XX(c3e60000_00000200, "resinfo.2d r0.x, g[0]"), /* resinfo.u32.2d r0.x, 0 */
#if 0
/* TODO our encoding differs in b11 ('typed'), which seems to be a dontcare bit */
/* dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_7 */
INSTR_5XX(c3e60000_00000e00, "resinfo.4d r0.x, g[0]"), /* resinfo.u32.1dtype r0.x, 0 */
/* dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_writeonly_12x34x56 */
INSTR_5XX(c3e60000_00000c00, "resinfo.3d r0.x, g[0]"), /* resinfo.u32.3d r0.x, 0 */
#else
/* dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_7 */
INSTR_5XX(c3e60000_00000600, "resinfo.4d r0.x, g[0]"), /* resinfo.u32.1dtype r0.x, 0 */
/* dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_32x32.txt */
INSTR_5XX(c3e60000_00000400, "resinfo.3d r0.x, g[0]"), /* resinfo.u32.3d r0.x, 0 */
#endif
/* ldgb */
/* dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_vec4 */