20#include "shaderc/shaderc.hpp"
23class VKShaderInterface;
33 VkDescriptorSetLayout vk_descriptor_set_layout_ = VK_NULL_HANDLE;
40 VkPipeline vk_pipeline_base_ = VK_NULL_HANDLE;
42 bool is_compute_shader_ =
false;
43 bool is_static_shader_ =
false;
44 bool use_batch_compilation_ =
false;
87 void uniform_float(
int location,
int comp_len,
int array_size,
const float *data)
override;
88 void uniform_int(
int location,
int comp_len,
int array_size,
const int *data)
override;
125 return vk_descriptor_set_layout_ != VK_NULL_HANDLE;
130 return vk_descriptor_set_layout_;
135 shaderc_shader_kind
stage,
137 bool finalize_shader_module(
VKShaderModule &shader_module,
const char *stage_name);
138 bool finalize_descriptor_set_layouts(
VKDevice &vk_device,
140 bool finalize_pipeline_layout(VkDevice vk_device,
const VKShaderInterface &shader_interface);
152 return static_cast<VKShader &
>(shader);
157 return static_cast<VKShader *
>(shader);
int get_ssbo_vertex_fetch_output_num_verts() const override
VKShaderModule compute_module
std::string fragment_interface_declare(const shader::ShaderCreateInfo &info) const override
int program_handle_get() const override
bool compilation_finished
VKShaderModule fragment_module
void transform_feedback_names_set(Span< const char * > name_list, eGPUShaderTFBType geom_type) override
void geometry_shader_from_glsl(MutableSpan< const char * > sources) override
void compute_shader_from_glsl(MutableSpan< const char * > sources) override
std::string geometry_interface_declare(const shader::ShaderCreateInfo &info) const override
void warm_cache(int limit) override
VKPushConstants push_constants
std::string resources_declare(const shader::ShaderCreateInfo &info) const override
std::string compute_layout_declare(const shader::ShaderCreateInfo &info) const override
bool get_uses_ssbo_vertex_fetch() const override
bool has_descriptor_set() const
VkPipelineLayout vk_pipeline_layout
VkPipeline ensure_and_get_compute_pipeline()
void transform_feedback_disable() override
void uniform_int(int location, int comp_len, int array_size, const int *data) override
VKShader(const char *name)
VKShaderModule vertex_module
void vertex_shader_from_glsl(MutableSpan< const char * > sources) override
VKShaderModule geometry_module
VkPipeline ensure_and_get_graphics_pipeline(GPUPrimType primitive, VKVertexAttributeObject &vao, VKStateManager &state_manager, VKFrameBuffer &framebuffer)
std::string geometry_layout_declare(const shader::ShaderCreateInfo &info) const override
void uniform_float(int location, int comp_len, int array_size, const float *data) override
const VKShaderInterface & interface_get() const
bool transform_feedback_enable(VertBuf *) override
void fragment_shader_from_glsl(MutableSpan< const char * > sources) override
VkDescriptorSetLayout vk_descriptor_set_layout_get() const
bool finalize(const shader::ShaderCreateInfo *info=nullptr) override
std::string vertex_interface_declare(const shader::ShaderCreateInfo &info) const override
static Context * unwrap(GPUContext *ctx)
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correc...