Skip to content

Commit

Permalink
Merge pull request #1980 from mbechard/main
Browse files Browse the repository at this point in the history
Fix regression caused by #1922
  • Loading branch information
billhollings authored Jul 19, 2023
2 parents 42fa511 + 817038e commit cf531d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,10 @@
void MVKCommandEncoder::endCurrentMetalEncoding() {
endMetalRenderEncoding();

_computePipelineState.markDirty();
_computePushConstants.markDirty();
_computeResourcesState.markDirty();

if (_mtlComputeEncoder && _cmdBuffer->_hasStageCounterTimestampCommand) { [_mtlComputeEncoder updateFence: getStageCountersMTLFence()]; }
endMetalEncoding(_mtlComputeEncoder);
_mtlComputeEncoderUse = kMVKCommandUseNone;
Expand All @@ -856,7 +860,7 @@
_mtlComputeEncoder = [_mtlCmdBuffer computeCommandEncoder];
retainIfImmediatelyEncoding(_mtlComputeEncoder);
beginMetalComputeEncoding(cmdUse);
markCurrentComputeStateDirty = true; // Always mark current compute state dirty for new encoder
markCurrentComputeStateDirty = false; // Already marked dirty above in endCurrentMetalEncoding()
}
if(markCurrentComputeStateDirty) {
_computePipelineState.markDirty();
Expand Down

0 comments on commit cf531d0

Please sign in to comment.