Move ShaderStage and name into Shader struct

These fields will eventually be determined automatically but for now it
makes more sense to pass them as arguements to RenderDriver::create_shader.
This commit is contained in:
2025-04-23 00:25:15 +10:00
parent 74eba7266e
commit e710b80f36
4 changed files with 11 additions and 8 deletions

View File

@@ -26,6 +26,8 @@ namespace Nova {
struct Shader {
VkShaderModule handle = VK_NULL_HANDLE;
ShaderStage stage = ShaderStage::VERTEX;
std::string name;
};
struct Surface {
@@ -67,7 +69,7 @@ namespace Nova {
void resize_swapchain(SwapchainID swapchain) override;
void destroy_swapchain(SwapchainID swapchain) override;
[[nodiscard]] ShaderID create_shader(const std::span<u8> bytes) override;
[[nodiscard]] ShaderID create_shader(const std::span<u8> bytes, ShaderStage stage) override;
void destroy_shader(ShaderID shader) override;
[[nodiscard]] PipelineID create_pipeline(GraphicsPipelineParams& params) override;