diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-09 13:51:39 -0400 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2020-04-24 06:53:34 +0200 |
commit | 497977bbe612cf023a1157fe2fc1d93f88ffe1f6 (patch) | |
tree | 27d1fd2262d074a5c6a722b009729b50e2e8df80 /src/panfrost/include | |
parent | 0167391a1ac9d6b5a519f67a7d0fb58eef89da0d (diff) |
panfrost: decode textures and samplers on bifrost
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4680>
Diffstat (limited to 'src/panfrost/include')
-rw-r--r-- | src/panfrost/include/panfrost-job.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index c5934ab824e..5ff3007dbf3 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1082,11 +1082,12 @@ struct mali_vertex_tiler_postfix { */ u64 uniform_buffers; - /* This is a pointer to an array of pointers to the texture + /* On Bifrost, this is a pointer to an array of bifrost_texture_descriptor. + * On Midgard, this is a pointer to an array of pointers to the texture * descriptors, number of pointers bounded by number of textures. The * indirection is needed to accomodate varying numbers and sizes of * texture descriptors */ - u64 texture_trampoline; + u64 textures; /* For OpenGL, from what I've seen, this is intimately connected to * texture_meta. cwabbott says this is not the case under Vulkan, hence @@ -1331,6 +1332,35 @@ struct mali_sampler_descriptor { float border_color[4]; } __attribute__((packed)); +/* Bifrost sampler descriptors look pretty similar */ + +#define BIFROST_SAMP_MIN_NEAREST (1) +#define BIFROST_SAMP_MAG_LINEAR (1) + +struct bifrost_sampler_descriptor { + uint8_t unk1; + + enum mali_wrap_mode wrap_s : 4; + enum mali_wrap_mode wrap_t : 4; + enum mali_wrap_mode wrap_r : 4; + uint8_t unk8 : 4; + + uint8_t unk2 : 3; + uint8_t min_filter : 1; + uint8_t norm_coords : 1; + uint8_t zero1 : 1; + uint8_t mip_filter : 1; + uint8_t mag_filter : 1; + + int16_t min_lod; + int16_t max_lod; + int8_t zero2; + int8_t zero3; + + uint32_t zero4; + uint32_t zero5; +} __attribute__((packed)); + /* viewport0/viewport1 form the arguments to glViewport. viewport1 is * modified by MALI_POSITIVE; viewport0 is as-is. */ |