Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_ContextCGL.h
| Show All 17 Lines | |||||
| @class MTLDevice; | @class MTLDevice; | ||||
| @class MTLRenderPipelineState; | @class MTLRenderPipelineState; | ||||
| @class MTLTexture; | @class MTLTexture; | ||||
| @class NSOpenGLContext; | @class NSOpenGLContext; | ||||
| @class NSOpenGLView; | @class NSOpenGLView; | ||||
| @class NSView; | @class NSView; | ||||
| class GHOST_ContextCGL : public GHOST_Context { | class GHOST_ContextCGL : public GHOST_Context { | ||||
| public: | |||||
| /* Defines the number of simultaneous command buffers which can be in flight. | |||||
| * The default limit of `64` is considered to be optimal for Blender. Too many command buffers | |||||
| * will result in workload fragmnetation and additional system-level overhead. This limit should | |||||
| * also only be increased if the application is consistently exceeding the limit, and there are | |||||
| * no command buffer leaks. | |||||
| * | |||||
| * If this limit is reached, starting a new command buffer will fail. The Metal backend will | |||||
| * therefore stall until completion and log a warning when this limit is reached in order to | |||||
| * ensure correct function of the app. | |||||
| * | |||||
| * It is generally preferable to reduce the prevalence of GPU_flush or GPU Context switches | |||||
| * (which will both break command submissions), rather than increasing this limit. */ | |||||
| static const int max_command_buffer_count = 64; | |||||
| public: | public: | ||||
| /** | /** | ||||
| * Constructor. | * Constructor. | ||||
| */ | */ | ||||
| GHOST_ContextCGL(bool stereoVisual, | GHOST_ContextCGL(bool stereoVisual, | ||||
| NSView *metalView, | NSView *metalView, | ||||
| CAMetalLayer *metalLayer, | CAMetalLayer *metalLayer, | ||||
| NSOpenGLView *openglView, | NSOpenGLView *openglView, | ||||
| ▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines | |||||