#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;
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,