panfrost: Specialize vertex state for Valhall
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>
This commit is contained in:
parent
0795f3d7e4
commit
c408f7551c
|
@ -95,6 +95,26 @@ struct panfrost_sampler_view {
|
||||||
struct panfrost_pool *pool;
|
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.
|
/* Statically assert that PIPE_* enums match the hardware enums.
|
||||||
* (As long as they match, we don't need to translate them.)
|
* (As long as they match, we don't need to translate them.)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -305,19 +305,6 @@ struct pan_vertex_buffer {
|
||||||
unsigned divisor;
|
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
|
unsigned
|
||||||
pan_assign_vertex_buffer(struct pan_vertex_buffer *buffers,
|
pan_assign_vertex_buffer(struct pan_vertex_buffer *buffers,
|
||||||
unsigned *nr_bufs,
|
unsigned *nr_bufs,
|
||||||
|
@ -327,6 +314,7 @@ pan_assign_vertex_buffer(struct pan_vertex_buffer *buffers,
|
||||||
struct panfrost_zsa_state;
|
struct panfrost_zsa_state;
|
||||||
struct panfrost_sampler_state;
|
struct panfrost_sampler_state;
|
||||||
struct panfrost_sampler_view;
|
struct panfrost_sampler_view;
|
||||||
|
struct panfrost_vertex_state;
|
||||||
|
|
||||||
static inline struct panfrost_context *
|
static inline struct panfrost_context *
|
||||||
pan_context(struct pipe_context *pcontext)
|
pan_context(struct pipe_context *pcontext)
|
||||||
|
|
Loading…
Reference in New Issue