summaryrefslogtreecommitdiff
path: root/src/panfrost/encoder/pan_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost/encoder/pan_texture.h')
-rw-r--r--src/panfrost/encoder/pan_texture.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/panfrost/encoder/pan_texture.h b/src/panfrost/encoder/pan_texture.h
index 29be91cca83..241e1f8b4e6 100644
--- a/src/panfrost/encoder/pan_texture.h
+++ b/src/panfrost/encoder/pan_texture.h
@@ -30,6 +30,7 @@
#include <stdbool.h>
#include "util/format/u_format.h"
+#include "panfrost-job.h"
struct panfrost_slice {
unsigned offset;
@@ -63,6 +64,36 @@ panfrost_format_supports_afbc(enum pipe_format format);
unsigned
panfrost_afbc_header_size(unsigned width, unsigned height);
+/* mali_texture_descriptor */
+
+unsigned
+panfrost_estimate_texture_size(
+ unsigned first_level, unsigned last_level,
+ unsigned first_layer, unsigned last_layer,
+ enum mali_texture_type type, enum mali_texture_layout layout);
+
+void
+panfrost_new_texture(
+ void *out,
+ uint16_t width, uint16_t height,
+ uint16_t depth, uint16_t array_size,
+ enum pipe_format format,
+ enum mali_texture_type type,
+ enum mali_texture_layout layout,
+ unsigned first_level, unsigned last_level,
+ unsigned first_layer, unsigned last_layer,
+ unsigned cube_stride,
+ unsigned swizzle,
+ mali_ptr base,
+ struct panfrost_slice *slices);
+
+
+unsigned
+panfrost_get_layer_stride(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level);
+
+unsigned
+panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face);
+
/* Formats */
enum mali_format