Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/opengl/gl_state.hh
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | private: | ||||
| void set_mutable_state(const GPUStateMutable &state); | void set_mutable_state(const GPUStateMutable &state); | ||||
| void texture_bind_apply(); | void texture_bind_apply(); | ||||
| void image_bind_apply(); | void image_bind_apply(); | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GLStateManager") | MEM_CXX_CLASS_ALLOC_FUNCS("GLStateManager") | ||||
| }; | }; | ||||
| /* Fence synchronization primitive. */ | |||||
| class GLFence : public Fence { | |||||
| private: | |||||
| GLsync gl_sync_ = 0; | |||||
| public: | |||||
| GLFence() : Fence(){}; | |||||
| ~GLFence(); | |||||
| void signal() override; | |||||
| void wait() override; | |||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GLFence") | |||||
| }; | |||||
| static inline GLbitfield to_gl(eGPUBarrier barrier_bits) | static inline GLbitfield to_gl(eGPUBarrier barrier_bits) | ||||
| { | { | ||||
| GLbitfield barrier = 0; | GLbitfield barrier = 0; | ||||
| if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS) { | if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS) { | ||||
| barrier |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT; | barrier |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT; | ||||
| } | } | ||||
| if (barrier_bits & GPU_BARRIER_SHADER_STORAGE) { | if (barrier_bits & GPU_BARRIER_SHADER_STORAGE) { | ||||
| barrier |= GL_SHADER_STORAGE_BARRIER_BIT; | barrier |= GL_SHADER_STORAGE_BARRIER_BIT; | ||||
| Show All 27 Lines | |||||