Run spirv-opt when compiling shaders
This commit is contained in:
@@ -18,12 +18,13 @@
|
||||
*/
|
||||
|
||||
#include "shader.h"
|
||||
#include "wivrn_shaders.h"
|
||||
|
||||
vk::raii::ShaderModule load_shader(vk::raii::Device & device, const std::vector<uint32_t> & spirv)
|
||||
{
|
||||
vk::ShaderModuleCreateInfo create_info{
|
||||
.codeSize = spirv.size() * sizeof(uint32_t),
|
||||
.pCode = data(spirv),
|
||||
.pCode = spirv.data(),
|
||||
};
|
||||
|
||||
return vk::raii::ShaderModule{device, create_info};
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <vulkan/vulkan_raii.hpp>
|
||||
|
||||
extern const std::map<std::string, std::vector<uint32_t>> shaders;
|
||||
|
||||
vk::raii::ShaderModule load_shader(vk::raii::Device & device, const std::vector<uint32_t> & spirv);
|
||||
vk::raii::ShaderModule load_shader(vk::raii::Device & device, const std::string & name);
|
||||
|
||||
Reference in New Issue
Block a user