compiles again

This commit is contained in:
Dynamitos
2023-11-05 10:36:01 +01:00
parent 4746c0f838
commit 77eb92838c
112 changed files with 1717 additions and 1540 deletions
+8 -4
View File
@@ -70,7 +70,7 @@ void VertexData::loadMesh(MeshId id, Array<Meshlet> loadedMeshlets)
.data = (uint8*)meshlets.data()
},
.stride = sizeof(MeshletDescription),
.bDynamic = true,
.dynamic = true,
});
vertexIndicesBuffer = graphics->createShaderBuffer(ShaderBufferCreateInfo {
.sourceData = {
@@ -78,7 +78,7 @@ void VertexData::loadMesh(MeshId id, Array<Meshlet> loadedMeshlets)
.data = (uint8*)vertexIndices.data(),
},
.stride = sizeof(uint32),
.bDynamic = true,
.dynamic = true,
});
primitiveIndicesBuffer = graphics->createShaderBuffer(ShaderBufferCreateInfo {
.sourceData = {
@@ -86,7 +86,7 @@ void VertexData::loadMesh(MeshId id, Array<Meshlet> loadedMeshlets)
.data = (uint8*)primitiveIndices.data(),
},
.stride = sizeof(uint8),
.bDynamic = true,
.dynamic = true,
});
}
@@ -114,6 +114,7 @@ void VertexData::createDescriptors()
},
.stride = sizeof(InstanceData)
});
instanceDataLayout->reset();
matInst.descriptorSet = instanceDataLayout->allocateDescriptorSet();
matInst.descriptorSet->updateBuffer(0, instanceBuffer);
if (Gfx::useMeshShading)
@@ -187,15 +188,18 @@ void Seele::VertexData::init(Gfx::PGraphics graphics)
}
instanceDataLayout->create();
resizeBuffers();
graphics->getShaderCompiler()->registerVertexData(this);
}
VertexData::VertexData()
: idCounter(0)
, dirty(false)
, head(0)
, verticesAllocated(0)
{
}
void Meshlet::save(ArchiveBuffer& buffer)
void Meshlet::save(ArchiveBuffer& buffer) const
{
Serialization::save(buffer, uniqueVertices);
Serialization::save(buffer, primitiveLayout);