Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_state.cc
| Show All 10 Lines | |||||
| # define PIXELSIZE (1.0f) | # define PIXELSIZE (1.0f) | ||||
| #endif | #endif | ||||
| #include "BLI_math_vector.h" | #include "BLI_math_vector.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "GPU_state.h" | #include "GPU_state.h" | ||||
| #include "gpu_backend.hh" | |||||
| #include "gpu_context_private.hh" | #include "gpu_context_private.hh" | ||||
| #include "gpu_state_private.hh" | #include "gpu_state_private.hh" | ||||
| using namespace blender::gpu; | using namespace blender::gpu; | ||||
| #define SET_STATE(_prefix, _state, _value) \ | #define SET_STATE(_prefix, _state, _value) \ | ||||
| do { \ | do { \ | ||||
| ▲ Show 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | |||||
| /** \name Synchronization Utils | /** \name Synchronization Utils | ||||
| * \{ */ | * \{ */ | ||||
| void GPU_memory_barrier(eGPUBarrier barrier) | void GPU_memory_barrier(eGPUBarrier barrier) | ||||
| { | { | ||||
| Context::get()->state_manager->issue_barrier(barrier); | Context::get()->state_manager->issue_barrier(barrier); | ||||
| } | } | ||||
| GPUFence *GPU_fence_create() | |||||
| { | |||||
| Fence *fence = GPUBackend::get()->fence_alloc(); | |||||
| return wrap(fence); | |||||
| } | |||||
| void GPU_fence_free(GPUFence *fence) | |||||
| { | |||||
| delete unwrap(fence); | |||||
| } | |||||
| void GPU_fence_signal(GPUFence *fence) | |||||
| { | |||||
| unwrap(fence)->signal(); | |||||
| } | |||||
| void GPU_fence_wait(GPUFence *fence) | |||||
| { | |||||
| unwrap(fence)->wait(); | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Default State | /** \name Default State | ||||
| * \{ */ | * \{ */ | ||||
| StateManager::StateManager() | StateManager::StateManager() | ||||
| { | { | ||||
| Show All 25 Lines | |||||