struct panfrost_fence {
struct pipe_reference reference;
- struct util_dynarray syncfds;
+ uint32_t syncobj;
+ bool signaled;
};
struct panfrost_streamout {
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;
+
+ struct panfrost_blend_state blit_blend;
};
/* Corresponds to the CSO */
};
/* 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 {
bool reads_point_coord;
bool reads_face;
bool reads_frag_coord;
+ bool writes_global;
unsigned stack_size;
unsigned shared_size;
+ /* Does the fragment shader have side effects? In particular, if output
+ * is masked out, is it legal to skip shader execution? */
+ bool fs_sidefx;
+
+ /* For Bifrost - output type for each RT */
+ enum bifrost_shader_type blend_types[BIFROST_MAX_RENDER_TARGET_COUNT];
unsigned int varying_count;
- struct mali_attr_meta varyings[PIPE_MAX_ATTRIBS];
+ enum mali_format varyings[PIPE_MAX_ATTRIBS];
gl_varying_slot varyings_loc[PIPE_MAX_ATTRIBS];
struct pipe_stream_output_info stream_output;
uint64_t so_mask;
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;
unsigned first_tag;
struct panfrost_bo *bo;
+
+ BITSET_WORD outputs_read;
+ enum pipe_format rt_formats[8];
};
/* A collection of varyings (the CSO) */
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 */
struct panfrost_sampler_view {
struct pipe_sampler_view base;
- struct panfrost_bo *midgard_bo;
+ struct panfrost_bo *bo;
struct bifrost_texture_descriptor *bifrost_descriptor;
+ mali_ptr texture_bo;
+ uint64_t modifier;
};
static inline struct panfrost_context *
unsigned
panfrost_ubo_count(struct panfrost_context *ctx, enum pipe_shader_type stage);
+void
+panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
+ struct pipe_context *pctx,
+ struct pipe_resource *texture);
+
/* Instancing */
mali_ptr