JBR-5193 Do not use extra commandQueue in metal pipeline

Removed extra command queue

(cherry picked from commit a235903851)
This commit is contained in:
Alexey Ushakov
2023-01-18 10:31:31 +01:00
committed by jbrbot
parent ef1f73d103
commit 6316134d60
3 changed files with 2 additions and 14 deletions

View File

@@ -74,7 +74,6 @@
@property (readonly, strong) id<MTLDevice> device;
@property (strong) id<MTLCommandQueue> commandQueue;
@property (strong) id<MTLCommandQueue> blitCommandQueue;
@property (strong) id<MTLBuffer> vertexBuffer;
@property (readonly) EncoderManager * encoderManager;
@@ -229,7 +228,6 @@
-(NSObject*)getBufImgOp;
- (id<MTLCommandBuffer>)createCommandBuffer;
- (id<MTLCommandBuffer>)createBlitCommandBuffer;
- (void)commitCommandBuffer:(BOOL)waitUntilCompleted display:(BOOL)updateDisplay;
- (void)startRedraw:(MTLLayer*)layer;
- (void)stopRedraw:(MTLLayer*)layer;

View File

@@ -129,7 +129,7 @@ MTLTransform* tempTransform = nil;
@synthesize textureFunction,
vertexCacheEnabled, aaEnabled, device, pipelineStateStorage,
commandQueue, blitCommandQueue, vertexBuffer,
commandQueue, vertexBuffer,
texturePool, paint=_paint, encoderManager=_encoderManager,
samplerManager=_samplerManager, stencilManager=_stencilManager;
@@ -172,7 +172,6 @@ extern void initSamplers(id<MTLDevice> device);
// Create command queue
commandQueue = [device newCommandQueue];
blitCommandQueue = [device newCommandQueue];
_tempTransform = [[MTLTransform alloc] init];
if (isDisplaySyncEnabled()) {
@@ -194,7 +193,6 @@ extern void initSamplers(id<MTLDevice> device);
//self.texturePool = nil;
self.vertexBuffer = nil;
self.commandQueue = nil;
self.blitCommandQueue = nil;
self.pipelineStateStorage = nil;
if (_encoderManager != nil) {
@@ -510,14 +508,6 @@ extern void initSamplers(id<MTLDevice> device);
return [self.commandQueue commandBuffer];
}
/*
* This should be exclusively used only for final blit
* and present of CAMetalDrawable in MTLLayer
*/
- (id<MTLCommandBuffer>)createBlitCommandBuffer {
return [self.blitCommandQueue commandBuffer];
}
-(void)setBufImgOp:(NSObject*)bufImgOp {
if (_bufImgOp != nil) {
[_bufImgOp release]; // context owns bufImgOp object

View File

@@ -111,7 +111,7 @@ BOOL isDisplaySyncEnabled() {
return;
}
id<MTLCommandBuffer> commandBuf = [self.ctx createBlitCommandBuffer];
id<MTLCommandBuffer> commandBuf = [self.ctx createCommandBuffer];
if (commandBuf == nil) {
J2dTraceLn(J2D_TRACE_VERBOSE, "MTLLayer.blitTexture: commandBuf is null");
return;