xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/zink/zink_state.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright 2018 Collabora Ltd.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * on the rights to use, copy, modify, merge, publish, distribute, sub
8  * license, and/or sell copies of the Software, and to permit persons to whom
9  * the Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21  * USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef ZINK_STATE_H
25 #define ZINK_STATE_H
26 
27 #include "zink_types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 void
34 zink_context_state_init(struct pipe_context *pctx);
35 
36 
37 struct pipe_vertex_state *
38 zink_create_vertex_state(struct pipe_screen *pscreen,
39                           struct pipe_vertex_buffer *buffer,
40                           const struct pipe_vertex_element *elements,
41                           unsigned num_elements,
42                           struct pipe_resource *indexbuf,
43                           uint32_t full_velem_mask);
44 void
45 zink_vertex_state_destroy(struct pipe_screen *pscreen, struct pipe_vertex_state *vstate);
46 struct pipe_vertex_state *
47 zink_cache_create_vertex_state(struct pipe_screen *pscreen,
48                                struct pipe_vertex_buffer *buffer,
49                                const struct pipe_vertex_element *elements,
50                                unsigned num_elements,
51                                struct pipe_resource *indexbuf,
52                                uint32_t full_velem_mask);
53 void
54 zink_cache_vertex_state_destroy(struct pipe_screen *pscreen, struct pipe_vertex_state *vstate);
55 
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif
62