somewhat fixed threadpool

This commit is contained in:
2021-11-13 19:28:18 +01:00
parent 01049019fd
commit ad09492e3e
20 changed files with 71 additions and 90 deletions
+4 -3
View File
@@ -152,10 +152,9 @@ void MaterialAsset::endFrame()
{
}
void MaterialAsset::updateDescriptorData()
Gfx::PDescriptorSet MaterialAsset::createDescriptorSet()
{
layout->reset();
descriptorSet = layout->allocateDescriptorSet();
Gfx::PDescriptorSet descriptorSet = layout->allocateDescriptorSet();
BulkResourceData uniformUpdate;
uniformUpdate.size = uniformDataSize;
uniformUpdate.data = uniformData;
@@ -169,8 +168,10 @@ void MaterialAsset::updateDescriptorData()
descriptorSet->updateBuffer(uniformBinding, uniformBuffer);
}
descriptorSet->writeChanges();
return descriptorSet;
}
const Gfx::ShaderCollection* MaterialAsset::getShaders(Gfx::RenderPassType renderPass, VertexInputType* vertexInput) const
{
Gfx::ShaderPermutation permutation;
+1 -5
View File
@@ -20,10 +20,7 @@ public:
Gfx::SeBlendOp getBlendMode() const {return Gfx::SE_BLEND_OP_END_RANGE;}
Gfx::MaterialShadingModel getShadingModel() const {return Gfx::MaterialShadingModel::DefaultLit;}
// This needs to be called while the descriptorset is unused
void updateDescriptorData();
void resetDescriptorSet();
const Gfx::PDescriptorSet getDescriptor() const { return descriptorSet; };
Gfx::PDescriptorSet createDescriptorSet();
Gfx::PDescriptorLayout getDescriptorLayout() const { return layout; }
// The name of the generated material shader, opposed to the name of the .asset file
@@ -37,7 +34,6 @@ private:
//For now its simply the collection of parameters, since there is no point for expressions
Array<PShaderParameter> parameters;
Gfx::PDescriptorSet descriptorSet;
Gfx::PDescriptorLayout layout;
Gfx::PUniformBuffer uniformBuffer;
uint32 uniformDataSize;