Skip to content

Commit

Permalink
fixup two phase
Browse files Browse the repository at this point in the history
  • Loading branch information
sndels committed Aug 2, 2024
1 parent 3bc153a commit b882fd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 7 additions & 5 deletions src/render/GBufferRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,17 @@ void GBufferRenderer::recordDraw(
.drawStats = inputsOutputs.inOutDrawStats,
});

const ImageState colorAttachmentState =
isSecondPhase ? ImageState::ColorAttachmentReadWrite
: ImageState::ColorAttachmentWrite;

transition(
WHEELS_MOV(scopeAlloc), cb,
Transitions{
.images = StaticArray<ImageTransition, 4>{{
{inputsOutputs.outAlbedoRoughness,
ImageState::ColorAttachmentWrite},
{inputsOutputs.outNormalMetalness,
ImageState::ColorAttachmentWrite},
{inputsOutputs.outVelocity, ImageState::ColorAttachmentWrite},
{inputsOutputs.outAlbedoRoughness, colorAttachmentState},
{inputsOutputs.outNormalMetalness, colorAttachmentState},
{inputsOutputs.outVelocity, colorAttachmentState},
{inputsOutputs.outDepth, ImageState::DepthAttachmentReadWrite},
}},
.buffers = StaticArray<BufferTransition, 3>{{
Expand Down
4 changes: 0 additions & 4 deletions src/render/MeshletCuller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,6 @@ MeshletCuller::CullOutput MeshletCuller::recordCullList(
// confuse debug naming by adding 'SecondPhase' in that case.
argumentsName.extend("MeshDiscpatchArguments");

String secondPhaseArgumentsName{scopeAlloc};
secondPhaseArgumentsName.extend(debugPrefix);
secondPhaseArgumentsName.extend("SecondPhaseInputArguments");

const bool hierarchicalDepthGiven = input.hierarchicalDepth.has_value();
ImageHandle dummyHierarchicalDepth;
if (!hierarchicalDepthGiven)
Expand Down

0 comments on commit b882fd1

Please sign in to comment.