From 3c817ed511c084fdffc011963c0efcc607369669 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 2 Mar 2022 10:03:54 -0500 Subject: [PATCH] pan/bi: Model Valhall texture instructions These act like a TEXC+immediate. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/ISA.xml | 147 ++++++++++++++++++++++++++++++++ src/panfrost/bifrost/compiler.h | 12 ++- 2 files changed, 158 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/ISA.xml b/src/panfrost/bifrost/ISA.xml index 8c930aa82e9..f5174d058bc 100644 --- a/src/panfrost/bifrost/ISA.xml +++ b/src/panfrost/bifrost/ISA.xml @@ -8347,4 +8347,151 @@ + + + + + + + + + + 1d + 2d + 3d + cube + + + none + r + g + rg + b + rb + gb + rgb + a + ra + ga + rga + ba + rba + gba + rgba + + + zero_lod + computed_lod + explicit + computed_bias + grdesc + + + f16 + f32 + s32 + u32 + s16 + u16 + + + + + + + + + + + + 1d + 2d + 3d + cube + + + none + r + g + rg + b + rb + gb + rgb + a + ra + ga + rga + ba + rba + gba + rgba + + + f16 + f32 + s32 + u32 + s16 + u16 + + + + + + + + + + + + + gather4_r + gather4_g + gather4_b + gather4_a + + + 1d + 2d + 3d + cube + + + none + r + g + rg + b + rb + gb + rgb + a + ra + ga + rga + ba + rba + gba + rgba + + + f16 + f32 + s32 + u32 + s16 + u16 + + + + + + + + + + + + diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 25c5673aebe..515a8f10696 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -480,10 +480,20 @@ typedef struct { enum bi_varying_name varying_name; /* LD_VAR_SPECIAL */ bool skip; /* VAR_TEX, TEXS, TEXC */ bool lod_mode; /* VAR_TEX, TEXS, implicitly for TEXC */ + + /* Used for valhall texturing */ + bool shadow; + bool texel_offset; + bool array_enable; + bool integer_coordinates; + enum bi_fetch_component fetch_component; + enum bi_va_lod_mode va_lod_mode; + enum bi_dimension dimension; + enum bi_write_mask write_mask; }; /* Maximum size, for hashing */ - unsigned flags[5]; + unsigned flags[11]; struct { enum bi_subgroup subgroup; /* WMASK, CLPER */