panfrost: Move checksum routines to root panfrost
[mesa.git] / src / panfrost / encoder / pan_encoder.h
index 0e135d0f5114272b71c2450fe72f8b6719b65155..42ec8320acbb33bd3f2b302e20014cb0278459d2 100644 (file)
@@ -27,6 +27,7 @@
 #ifndef __PAN_ENCODER_H
 #define __PAN_ENCODER_H
 
+#include <stdbool.h>
 #include "panfrost-job.h"
 
 /* Invocation packing */
@@ -56,14 +57,56 @@ panfrost_pack_work_groups_fused(
 /* Tiler structure size computation */
 
 unsigned
-panfrost_tiler_header_size(unsigned width, unsigned height, uint8_t mask);
+panfrost_tiler_header_size(unsigned width, unsigned height, unsigned mask, bool hierarchy);
 
 unsigned
-panfrost_tiler_body_size(unsigned width, unsigned height, uint8_t mask);
+panfrost_tiler_full_size(unsigned width, unsigned height, unsigned mask, bool hierarchy);
 
 unsigned
 panfrost_choose_hierarchy_mask(
         unsigned width, unsigned height,
-        unsigned vertex_count);
+        unsigned vertex_count, bool hierarchy);
+
+/* Stack sizes */
+
+unsigned
+panfrost_get_stack_shift(unsigned stack_size);
+
+unsigned
+panfrost_get_total_stack_size(
+                unsigned stack_shift,
+                unsigned threads_per_core,
+                unsigned core_count);
+
+/* Property queries */
+
+
+unsigned panfrost_query_gpu_version(int fd);
+unsigned panfrost_query_core_count(int fd);
+unsigned panfrost_query_thread_tls_alloc(int fd);
+
+const char * panfrost_model_name(unsigned gpu_id);
+
+/* Attributes / instancing */
+
+unsigned
+panfrost_padded_vertex_count(unsigned vertex_count);
+
+unsigned
+panfrost_vertex_instanced(
+        unsigned padded_count,
+        unsigned instance_shift, unsigned instance_odd,
+        unsigned divisor,
+        union mali_attr *attrs);
+
+void panfrost_vertex_id(unsigned padded_count, union mali_attr *attr);
+void panfrost_instance_id(unsigned padded_count, union mali_attr *attr);
+
+/* Samplers */
+
+enum mali_func
+panfrost_flip_compare_func(enum mali_func f);
+
+
 
 #endif