Update inline MVKVector sizing for viewport & scissors.
Revert MVKSwapchainImage::_availabilitySignalers to use std::list for performance.
This commit is contained in:
parent
f7336d8071
commit
58d78623c3
@ -115,7 +115,7 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t _firstViewport;
|
||||
MVKVectorInline<MTLViewport, 8> _mtlViewports;
|
||||
MVKVectorInline<MTLViewport, kMVKCachedViewportCount> _mtlViewports;
|
||||
};
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t _firstScissor;
|
||||
MVKVectorInline<MTLScissorRect, 8> _mtlScissors;
|
||||
MVKVectorInline<MTLScissorRect, kMVKCachedScissorCount> _mtlScissors;
|
||||
};
|
||||
|
||||
|
||||
|
@ -147,7 +147,7 @@ protected:
|
||||
void encodeImpl() override;
|
||||
void resetImpl() override;
|
||||
|
||||
MVKVectorInline<MTLViewport, 8> _mtlViewports;
|
||||
MVKVectorInline<MTLViewport, kMVKCachedViewportCount> _mtlViewports;
|
||||
};
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@ protected:
|
||||
void encodeImpl() override;
|
||||
void resetImpl() override;
|
||||
|
||||
MVKVectorInline<MTLScissorRect, 8> _mtlScissors;
|
||||
MVKVectorInline<MTLScissorRect, kMVKCachedScissorCount> _mtlScissors;
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,6 +65,10 @@ class MVKCommandResourceFactory;
|
||||
/** The buffer index to use for vertex content. */
|
||||
const static uint32_t kMVKVertexContentBufferIndex = 0;
|
||||
|
||||
// Parameters to define the sizing of inline collections
|
||||
const static uint32_t kMVKCachedViewportCount = 16;
|
||||
const static uint32_t kMVKCachedScissorCount = 16;
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark MVKPhysicalDevice
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include "MVKResource.h"
|
||||
#include "MVKSync.h"
|
||||
#include "MVKVector.h"
|
||||
#include <mutex>
|
||||
#include <list>
|
||||
|
||||
#import <IOSurface/IOSurfaceRef.h>
|
||||
|
||||
@ -396,7 +396,7 @@ protected:
|
||||
uint32_t _swapchainIndex;
|
||||
id<CAMetalDrawable> _mtlDrawable;
|
||||
std::mutex _availabilityLock;
|
||||
MVKVectorInline<MVKSwapchainSignaler, 4> _availabilitySignalers;
|
||||
std::list<MVKSwapchainSignaler> _availabilitySignalers;
|
||||
MVKSwapchainSignaler _preSignaled;
|
||||
MVKSwapchainImageAvailability _availability;
|
||||
};
|
||||
|
@ -142,8 +142,8 @@ protected:
|
||||
VkPipelineRasterizationStateCreateInfo _rasterInfo;
|
||||
VkPipelineDepthStencilStateCreateInfo _depthStencilInfo;
|
||||
|
||||
MVKVectorInline<MTLViewport, 8> _mtlViewports;
|
||||
MVKVectorInline<MTLScissorRect, 8> _mtlScissors;
|
||||
MVKVectorInline<MTLViewport, kMVKCachedViewportCount> _mtlViewports;
|
||||
MVKVectorInline<MTLScissorRect, kMVKCachedScissorCount> _mtlScissors;
|
||||
|
||||
id<MTLRenderPipelineState> _mtlPipelineState;
|
||||
MTLCullMode _mtlCullMode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user