From 410a38642372688f45d8780c05b66558b1bbfb3e Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Mon, 22 May 2023 14:29:16 +0800 Subject: [PATCH] added ShaderDescriptorInfo::AddStruct --- inc/hgl/shadergen/ShaderDescriptorInfo.h | 1 + src/ShaderGen/ShaderDescriptorInfo.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/inc/hgl/shadergen/ShaderDescriptorInfo.h b/inc/hgl/shadergen/ShaderDescriptorInfo.h index a1fb7977..f54705a7 100644 --- a/inc/hgl/shadergen/ShaderDescriptorInfo.h +++ b/inc/hgl/shadergen/ShaderDescriptorInfo.h @@ -59,6 +59,7 @@ public: bool AddInput(ShaderAttribute *); bool AddOutput(ShaderAttribute *); + void AddStruct(const AnsiString &); bool AddUBO(DescriptorSetType type,const UBODescriptor *sd); bool AddSampler(DescriptorSetType type,const SamplerDescriptor *sd); diff --git a/src/ShaderGen/ShaderDescriptorInfo.cpp b/src/ShaderGen/ShaderDescriptorInfo.cpp index bb94e9c8..496b0300 100644 --- a/src/ShaderGen/ShaderDescriptorInfo.cpp +++ b/src/ShaderGen/ShaderDescriptorInfo.cpp @@ -49,6 +49,11 @@ bool ShaderDescriptorInfo::AddOutput(ShaderAttribute *ss) return(true); } +void ShaderDescriptorInfo::AddStruct(const AnsiString &name) +{ + struct_list.AddUnique(name); +} + bool ShaderDescriptorInfo::AddUBO(DescriptorSetType type,const UBODescriptor *ubo) { if(!ubo)