nouveau/nir: Implement load_global_constant
[mesa.git] / src / gallium / drivers / zink / zink_program.h
index bd6f7dbaa7a6801a109fc37570883593d7751e41..5e68783a2f80177ea6d36c3db90194c8e4d93174 100644 (file)
@@ -29,7 +29,8 @@
 #include "pipe/p_state.h"
 #include "util/u_inlines.h"
 
-struct zink_context;
+#include "zink_context.h"
+
 struct zink_screen;
 struct zink_shader;
 struct zink_gfx_pipeline_state;
@@ -37,21 +38,26 @@ struct zink_gfx_pipeline_state;
 struct hash_table;
 struct set;
 
+struct zink_shader_module {
+   struct pipe_reference reference;
+   VkShaderModule shader;
+};
+
 struct zink_gfx_program {
    struct pipe_reference reference;
 
-   VkShaderModule stages[PIPE_SHADER_TYPES - 1]; // compute stage doesn't belong here
-   struct zink_shader *shaders[PIPE_SHADER_TYPES - 1];
+   struct zink_shader_module *modules[ZINK_SHADER_COUNT]; // compute stage doesn't belong here
+   struct zink_shader *shaders[ZINK_SHADER_COUNT];
    VkDescriptorSetLayout dsl;
    VkPipelineLayout layout;
    unsigned num_descriptors;
-   struct hash_table *pipelines[PIPE_PRIM_TRIANGLE_FAN + 1];
+   struct hash_table *pipelines[10]; // number of draw modes we support
    struct set *render_passes;
 };
 
 struct zink_gfx_program *
 zink_create_gfx_program(struct zink_context *ctx,
-                        struct zink_shader *stages[PIPE_SHADER_TYPES - 1]);
+                        struct zink_shader *stages[ZINK_SHADER_COUNT]);
 
 void
 zink_destroy_gfx_program(struct zink_screen *screen,