panfrost: XMLify Midgard samplers
[mesa.git] / src / gallium / drivers / panfrost / pan_context.h
index 7ba1170cdf313f7ec818b9ce9759d968dddb3e21..680ff5e64e75eef162f24fa1e5705e8c06678d36 100644 (file)
@@ -82,7 +82,8 @@ struct panfrost_query {
 
 struct panfrost_fence {
         struct pipe_reference reference;
-        struct util_dynarray syncfds;
+        uint32_t syncobj;
+        bool signaled;
 };
 
 struct panfrost_streamout {
@@ -161,7 +162,7 @@ struct panfrost_context {
         struct pipe_viewport_state pipe_viewport;
         struct pipe_scissor_state scissor;
         struct pipe_blend_color blend_color;
-        struct pipe_depth_stencil_alpha_state *depth_stencil;
+        struct panfrost_zsa_state *depth_stencil;
         struct pipe_stencil_ref stencil_ref;
         unsigned sample_mask;
         unsigned min_samples;
@@ -176,8 +177,7 @@ struct panfrost_rasterizer {
 };
 
 /* Variants bundle together to form the backing CSO, bundling multiple
- * shaders with varying emulated features baked in (alpha test
- * parameters, etc) */
+ * shaders with varying emulated features baked in */
 
 /* A shader state corresponds to the actual, current variant of the shader */
 struct panfrost_shader_state {
@@ -216,9 +216,6 @@ struct panfrost_shader_state {
         unsigned sysval_count;
         unsigned sysval[MAX_SYSVAL_COUNT];
 
-        /* Information on this particular shader variant */
-        struct pipe_alpha_state alpha_state;
-
         uint16_t point_sprite_mask;
         unsigned point_sprite_upper_left : 1;
 
@@ -260,10 +257,19 @@ struct panfrost_vertex_state {
         struct mali_attr_meta hw[PIPE_MAX_ATTRIBS];
 };
 
+struct panfrost_zsa_state {
+        struct pipe_depth_stencil_alpha_state base;
+
+        /* Precomputed stencil state */
+        struct mali_stencil_packed stencil_front;
+        struct mali_stencil_packed stencil_back;
+        u8 stencil_mask_front;
+        u8 stencil_mask_back;
+};
+
 struct panfrost_sampler_state {
         struct pipe_sampler_state base;
-        struct mali_sampler_descriptor midgard_hw;
-        struct bifrost_sampler_descriptor bifrost_hw;
+        struct mali_midgard_sampler_packed hw;
 };
 
 /* Misnomer: Sampler view corresponds to textures, not samplers */
@@ -273,7 +279,7 @@ struct panfrost_sampler_view {
         struct panfrost_bo *bo;
         struct bifrost_texture_descriptor *bifrost_descriptor;
         mali_ptr texture_bo;
-        enum mali_texture_layout layout;
+        uint64_t modifier;
 };
 
 static inline struct panfrost_context *