xref: /aosp_15_r20/external/mesa3d/src/amd/vulkan/radv_shader_object.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2016 Red Hat.
3  * Copyright © 2016 Bas Nieuwenhuizen
4  *
5  * based in part on anv driver which is:
6  * Copyright © 2015 Intel Corporation
7  *
8  * SPDX-License-Identifier: MIT
9  */
10 
11 #ifndef RADV_SHADER_OBJECT_H
12 #define RADV_SHADER_OBJECT_H
13 
14 #include "radv_shader.h"
15 
16 struct radv_shader_object {
17    struct vk_object_base base;
18 
19    gl_shader_stage stage;
20 
21    VkShaderCodeTypeEXT code_type;
22 
23    /* Main shader */
24    struct radv_shader *shader;
25    struct radv_shader_binary *binary;
26 
27    /* Shader variants */
28    /* VS before TCS */
29    struct {
30       struct radv_shader *shader;
31       struct radv_shader_binary *binary;
32    } as_ls;
33 
34    /* VS/TES before GS */
35    struct {
36       struct radv_shader *shader;
37       struct radv_shader_binary *binary;
38    } as_es;
39 
40    /* GS copy shader */
41    struct {
42       struct radv_shader *copy_shader;
43       struct radv_shader_binary *copy_binary;
44    } gs;
45 
46    uint32_t push_constant_size;
47    uint32_t dynamic_offset_count;
48 };
49 
50 VK_DEFINE_NONDISP_HANDLE_CASTS(radv_shader_object, base, VkShaderEXT, VK_OBJECT_TYPE_SHADER_EXT);
51 
52 #endif /* RADV_SHADER_OBJECT_H */
53