Major changes
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "evk/evkShader.h"
|
||||
#include "shaderc/shaderc.h"
|
||||
#include "ev_helpers.h"
|
||||
#include "spirv_reflect.h"
|
||||
|
||||
evkShader evkInitShaderFromBytes(evkDevice device, const u8* shaderBytes, u32 shaderLen)
|
||||
{
|
||||
@@ -43,11 +44,12 @@ evkShaderReflectionData evkGenerateShaderReflectionData(const u8* shaderBytes, u
|
||||
for(int bindingIdx = 0; bindingIdx < currentSet->binding_count; bindingIdx++)
|
||||
{
|
||||
evkDescriptorBinding binding = {
|
||||
.name = evstring_new(currentSet->bindings[bindingIdx]->name),
|
||||
.stageFlags = res.stage,
|
||||
.binding = currentSet->bindings[bindingIdx]->binding,
|
||||
.descriptorType = (VkDescriptorType) currentSet->bindings[bindingIdx]->descriptor_type,
|
||||
.descriptorCount = currentSet->bindings[bindingIdx]->count,
|
||||
.set = currentSet->set,
|
||||
// .set = currentSet->set,
|
||||
};
|
||||
|
||||
vec_push(&res.bindings, &binding);
|
||||
@@ -95,6 +97,7 @@ evkShaderCompiler evkCreateShaderCompiler()
|
||||
compiler.sc = shaderc_compiler_initialize();
|
||||
compiler.scopt = shaderc_compile_options_initialize();
|
||||
shaderc_compile_options_set_include_callbacks(compiler.scopt, _shader_include_resolve, _shader_include_release, NULL);
|
||||
shaderc_compile_options_set_generate_debug_info(compiler.scopt);
|
||||
return compiler;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user