Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_state.h
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup gpu | * \ingroup gpu | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| /** Opaque type hiding blender::gpu::Fence. */ | |||||
| typedef struct GPUFence GPUFence; | |||||
| typedef enum eGPUWriteMask { | typedef enum eGPUWriteMask { | ||||
| GPU_WRITE_NONE = 0, | GPU_WRITE_NONE = 0, | ||||
| GPU_WRITE_RED = (1 << 0), | GPU_WRITE_RED = (1 << 0), | ||||
| GPU_WRITE_GREEN = (1 << 1), | GPU_WRITE_GREEN = (1 << 1), | ||||
| GPU_WRITE_BLUE = (1 << 2), | GPU_WRITE_BLUE = (1 << 2), | ||||
| GPU_WRITE_ALPHA = (1 << 3), | GPU_WRITE_ALPHA = (1 << 3), | ||||
| GPU_WRITE_DEPTH = (1 << 4), | GPU_WRITE_DEPTH = (1 << 4), | ||||
| GPU_WRITE_STENCIL = (1 << 5), | GPU_WRITE_STENCIL = (1 << 5), | ||||
| ▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Just turn off the `bgl` safeguard system. Can be called even without #GPU_bgl_start. | * Just turn off the `bgl` safeguard system. Can be called even without #GPU_bgl_start. | ||||
| */ | */ | ||||
| void GPU_bgl_end(void); | void GPU_bgl_end(void); | ||||
| bool GPU_bgl_get(void); | bool GPU_bgl_get(void); | ||||
| void GPU_memory_barrier(eGPUBarrier barrier); | void GPU_memory_barrier(eGPUBarrier barrier); | ||||
| GPUFence *GPU_fence_create(void); | |||||
| void GPU_fence_free(GPUFence *fence); | |||||
| void GPU_fence_signal(GPUFence *fence); | |||||
| void GPU_fence_wait(GPUFence *fence); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||