this sucks, but there is hope

This commit is contained in:
Dynamitos
2024-04-20 21:35:43 +02:00
parent a27e280ab8
commit acc976fe84
30 changed files with 279 additions and 192 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ void BasePass::endFrame()
void BasePass::publishOutputs()
{
basePassLayout = graphics->createPipelineLayout();
basePassLayout = graphics->createPipelineLayout("BasePassLayout");
basePassLayout->addDescriptorLayout(viewParamsLayout);
basePassLayout->addDescriptorLayout(scene->getLightEnvironment()->getDescriptorLayout());
+1 -1
View File
@@ -119,7 +119,7 @@ void DebugPass::createRenderPass()
};
renderPass = graphics->createRenderPass(std::move(layout), dependency, viewport);
pipelineLayout = graphics->createPipelineLayout();
pipelineLayout = graphics->createPipelineLayout("DebugPassLayout");
pipelineLayout->addDescriptorLayout(viewParamsLayout);
pipelineLayout->create();
@@ -16,7 +16,7 @@ DepthPrepass::DepthPrepass(Gfx::PGraphics graphics, PScene scene)
: RenderPass(graphics, scene)
, descriptorSets(3)
{
depthPrepassLayout = graphics->createPipelineLayout();
depthPrepassLayout = graphics->createPipelineLayout("DepthPrepassLayout");
depthPrepassLayout->addDescriptorLayout(viewParamsLayout);
if (graphics->supportMeshShading())
{
@@ -114,9 +114,11 @@ void LightCullingPass::publishOutputs()
//t_lightGrid
cullingDescriptorLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 6, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_IMAGE, .access = Gfx::SE_DESCRIPTOR_ACCESS_READ_WRITE_BIT});
cullingDescriptorLayout->create();
lightEnv = scene->getLightEnvironment();
cullingLayout = graphics->createPipelineLayout();
cullingLayout = graphics->createPipelineLayout("CullingLayout");
cullingLayout->addDescriptorLayout(viewParamsLayout);
cullingLayout->addDescriptorLayout(dispatchParamsLayout);
cullingLayout->addDescriptorLayout(cullingDescriptorLayout);
@@ -213,7 +215,8 @@ void LightCullingPass::setupFrustums()
dispatchParamsLayout = graphics->createDescriptorLayout("pDispatchParams");
dispatchParamsLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 0, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_UNIFORM_BUFFER, });
dispatchParamsLayout->addDescriptorBinding(Gfx::DescriptorBinding{.binding = 1, .descriptorType = Gfx::SE_DESCRIPTOR_TYPE_STORAGE_BUFFER, .access = Gfx::SE_DESCRIPTOR_ACCESS_WRITE_ONLY_BIT });
frustumLayout = graphics->createPipelineLayout();
dispatchParamsLayout->create();
frustumLayout = graphics->createPipelineLayout("FrustumLayout");
frustumLayout->addDescriptorLayout(viewParamsLayout);
frustumLayout->addDescriptorLayout(dispatchParamsLayout);
Map<std::string, uint32> mapping;
@@ -15,6 +15,7 @@ RenderPass::RenderPass(Gfx::PGraphics graphics, PScene scene)
.data = (uint8*)&viewParams,
},
.dynamic = true,
.name = "viewParamsBuffer",
};
viewParamsBuffer = graphics->createUniformBuffer(uniformInitializer);
viewParamsLayout->create();
@@ -122,7 +122,7 @@ void SkyboxRenderPass::createRenderPass()
createInfo.entryPoint = "fragmentMain";
fragmentShader = graphics->createFragmentShader(createInfo);
pipelineLayout = graphics->createPipelineLayout();
pipelineLayout = graphics->createPipelineLayout("SkyboxLayout");
pipelineLayout->addDescriptorLayout(viewParamsLayout);
pipelineLayout->addDescriptorLayout(skyboxDataLayout);
pipelineLayout->addDescriptorLayout(textureLayout);