Debian Codegraph @

src/kosmickrisp/vulkan/kk_nir_lower_vbo.h

raw symbols SCIP
1 /*
2 * Copyright 2022 Alyssa Rosenzweig
3 * Copyright 2025 LunarG, Inc.
4 * Copyright 2025 Google LLC
5 * SPDX-License-Identifier: MIT
6 */
7
8 #pragma once
9
10 #include <stdbool.h>
11 #include <stdint.h>
12 #include "util/format/u_formats.h"
13 #include "nir.h"
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #define KK_MAX_ATTRIBS (32)
20 #define KK_MAX_VBUFS (32)
21
22 /* See pipe_vertex_element for justification on the sizes. This structure should
23 * be small so it can be embedded into a shader key.
24 */
25 struct kk_attribute {
26 /* If instanced, Zero means all get the same value (Vulkan semantics). */
27 uint32_t divisor;
28 /* Buffer binding to load stride from root_table */
29 uint32_t binding;
30
31 /* pipe_format, all vertex formats should be <= 255 */
32 uint8_t format;
33
34 unsigned buf : 7;
35 bool instanced : 1;
36 };
37
38 bool kk_nir_lower_vbo(nir_shader *shader, struct kk_attribute *attribs);
39
40 bool kk_vbo_supports_format(enum pipe_format format);
41
42 #ifdef __cplusplus
43 } /* extern C */
44 #endif