diff options
Diffstat (limited to 'source/blender/gpu/metal/mtl_state.hh')
-rw-r--r-- | source/blender/gpu/metal/mtl_state.hh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/gpu/metal/mtl_state.hh b/source/blender/gpu/metal/mtl_state.hh index e6472491b35..1af56378c5a 100644 --- a/source/blender/gpu/metal/mtl_state.hh +++ b/source/blender/gpu/metal/mtl_state.hh @@ -3,6 +3,7 @@ /** \file * \ingroup gpu */ +#pragma once #include "MEM_guardedalloc.h" @@ -11,6 +12,8 @@ #include "GPU_state.h" #include "gpu_state_private.hh" +#include "mtl_pso_descriptor_state.hh" + namespace blender::gpu { /* Forward Declarations. */ @@ -21,7 +24,7 @@ class MTLContext; * Metal Implementation. **/ class MTLStateManager : public StateManager { - public: + private: /* Current state of the associated MTLContext. * Avoids resetting the whole state for every change. */ @@ -29,6 +32,9 @@ class MTLStateManager : public StateManager { GPUStateMutable current_mutable_; MTLContext *context_; + /* Global pipeline descriptors. */ + MTLRenderPipelineStateDescriptor pipeline_descriptor_; + public: MTLStateManager(MTLContext *ctx); @@ -47,6 +53,12 @@ class MTLStateManager : public StateManager { void texture_unpack_row_length_set(uint len) override; + /* Global pipeline descriptors. */ + MTLRenderPipelineStateDescriptor &get_pipeline_descriptor() + { + return pipeline_descriptor_; + } + private: void set_write_mask(const eGPUWriteMask value); void set_depth_test(const eGPUDepthTest value); |