diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index f4f9055466f..a2dd077aa1f 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -95,6 +95,26 @@ struct panfrost_sampler_view { struct panfrost_pool *pool; }; +struct panfrost_vertex_state { + unsigned num_elements; + struct pipe_vertex_element pipe[PIPE_MAX_ATTRIBS]; + +#if PAN_ARCH >= 9 + /* Packed attribute descriptor. All fields are set at CSO create time + * except for stride, which must be ORed in at draw time + */ + struct mali_attribute_packed attributes[PIPE_MAX_ATTRIBS]; +#else + /* buffers corresponds to attribute buffer, element_buffers corresponds + * to an index in buffers for each vertex element */ + struct pan_vertex_buffer buffers[PIPE_MAX_ATTRIBS]; + unsigned element_buffer[PIPE_MAX_ATTRIBS]; + unsigned nr_bufs; + + unsigned formats[PIPE_MAX_ATTRIBS]; +#endif +}; + /* Statically assert that PIPE_* enums match the hardware enums. * (As long as they match, we don't need to translate them.) */ diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index b9e3a7b1476..c234a7a3dc9 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -305,19 +305,6 @@ struct pan_vertex_buffer { unsigned divisor; }; -struct panfrost_vertex_state { - unsigned num_elements; - - /* buffers corresponds to attribute buffer, element_buffers corresponds - * to an index in buffers for each vertex element */ - struct pan_vertex_buffer buffers[PIPE_MAX_ATTRIBS]; - unsigned element_buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_bufs; - - struct pipe_vertex_element pipe[PIPE_MAX_ATTRIBS]; - unsigned formats[PIPE_MAX_ATTRIBS]; -}; - unsigned pan_assign_vertex_buffer(struct pan_vertex_buffer *buffers, unsigned *nr_bufs, @@ -327,6 +314,7 @@ pan_assign_vertex_buffer(struct pan_vertex_buffer *buffers, struct panfrost_zsa_state; struct panfrost_sampler_state; struct panfrost_sampler_view; +struct panfrost_vertex_state; static inline struct panfrost_context * pan_context(struct pipe_context *pcontext)