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() {
endMetalRenderEncoding();
_computePipelineState.markDirty();
_computePushConstants.markDirty();
_computeResourcesState.markDirty();
if (_mtlComputeEncoder && _cmdBuffer->_hasStageCounterTimestampCommand) { [_mtlComputeEncoder updateFence: getStageCountersMTLFence()]; }
endMetalEncoding(_mtlComputeEncoder);
_mtlComputeEncoderUse = kMVKCommandUseNone;
@ -856,7 +860,7 @@ id<MTLComputeCommandEncoder> MVKCommandEncoder::getMTLComputeEncoder(MVKCommandU
_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();