first step OK that it's to resumed to use L2W in VertexInputStream.

This commit is contained in:
2024-03-26 01:20:20 +08:00
parent b48ef1ac30
commit a60ffbb7da
24 changed files with 171 additions and 122 deletions

View File

@@ -39,6 +39,10 @@ private:
DataArray<RenderItem> ri_array;
uint ri_count;
bool has_l2w;
bool has_mi;
VkDeviceSize l2w_buffer_size[4];
void StatMI();
void Stat();
@@ -56,7 +60,7 @@ protected:
public:
MaterialRenderList(GPUDevice *d,Material *m);
MaterialRenderList(GPUDevice *d,bool l2w,Material *m);
~MaterialRenderList();
void Add(Renderable *ri,const Matrix4f &mat);

View File

@@ -69,7 +69,6 @@ public:
}
const bool hasSet (const DescriptorSetType &type)const;
const bool hasAssign ()const;
const VIL * GetDefaultVIL()const;
VIL * CreateVIL(const VILConfig *format_map=nullptr);

View File

@@ -35,6 +35,8 @@ public:
void Free() override {/* DON'T RUN ANY OPERATION.*/}
void Flush(const VkDeviceSize);
bool Write(const void *source,const uint64 offset,const uint64 size) override;
};//class VKMemoryAllocator:public AbstractMemoryAllocator
VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_MEMORY_ALLOCATOR_INCLUDE

View File

@@ -45,15 +45,6 @@ constexpr const ShaderBufferSource SBS_CameraInfo=
// UBO必须严格指定数组的大小
// SSBO则不需要使用[]方式指定为动态大小数组
constexpr const ShaderBufferSource SBS_LocalToWorld=
{
"LocalToWorldData",
"l2w",
R"(
mat4 mats[L2W_MAX_COUNT];)"
};
constexpr const char MaterialInstanceStruct[]="MaterialInstance";
constexpr const ShaderBufferSource SBS_MaterialInstance=

View File

@@ -34,8 +34,6 @@ namespace hgl{namespace graph
UBODescriptor *mi_ubo;
uint32_t l2w_shader_stage;
uint32_t l2w_max_count;
UBODescriptor *l2w_ubo;
ShaderCreateInfoMap shader_map; ///<着色器列表

View File

@@ -84,8 +84,6 @@ public:
void SetMaterialInstance(UBODescriptor *,const AnsiString &);
void AddMaterialInstanceOutput();
void SetLocalToWorld(UBODescriptor *);
void SetMain(const AnsiString &str){main_function=str;}
void SetMain(const char *str,const int len)
{

View File

@@ -21,8 +21,9 @@ namespace hgl
int hasInput(const char *);
void AddLocalToWorld();
void AddMaterialInstanceID();
void AddJoint();
void AddAssign();
};//class ShaderCreateInfoVertex:public ShaderCreateInfo
}//namespace graph
}//namespace hgl::graph