Merge pull request #1980 from mbechard/main

Fix regression caused by #1922
This commit is contained in:
Bill Hollings 2023-07-19 15:30:22 -04:00 committed by GitHub
commit cf531d04de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -839,6 +839,10 @@ void MVKCommandEncoder::endMetalRenderEncoding() {
void MVKCommandEncoder::endCurrentMetalEncoding() { void MVKCommandEncoder::endCurrentMetalEncoding() {
endMetalRenderEncoding(); endMetalRenderEncoding();
_computePipelineState.markDirty();
_computePushConstants.markDirty();
_computeResourcesState.markDirty();
if (_mtlComputeEncoder && _cmdBuffer->_hasStageCounterTimestampCommand) { [_mtlComputeEncoder updateFence: getStageCountersMTLFence()]; } if (_mtlComputeEncoder && _cmdBuffer->_hasStageCounterTimestampCommand) { [_mtlComputeEncoder updateFence: getStageCountersMTLFence()]; }
endMetalEncoding(_mtlComputeEncoder); endMetalEncoding(_mtlComputeEncoder);
_mtlComputeEncoderUse = kMVKCommandUseNone; _mtlComputeEncoderUse = kMVKCommandUseNone;
@ -856,7 +860,7 @@ id<MTLComputeCommandEncoder> MVKCommandEncoder::getMTLComputeEncoder(MVKCommandU
_mtlComputeEncoder = [_mtlCmdBuffer computeCommandEncoder]; _mtlComputeEncoder = [_mtlCmdBuffer computeCommandEncoder];
retainIfImmediatelyEncoding(_mtlComputeEncoder); retainIfImmediatelyEncoding(_mtlComputeEncoder);
beginMetalComputeEncoding(cmdUse); beginMetalComputeEncoding(cmdUse);
markCurrentComputeStateDirty = true; // Always mark current compute state dirty for new encoder markCurrentComputeStateDirty = false; // Already marked dirty above in endCurrentMetalEncoding()
} }
if(markCurrentComputeStateDirty) { if(markCurrentComputeStateDirty) {
_computePipelineState.markDirty(); _computePipelineState.markDirty();