diff options
-rw-r--r-- | source/blender/gpu/GPU_state.h | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_state.hh | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index fa70a8934db..7b69012dcbc 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -40,9 +40,11 @@ typedef enum eGPUBarrier { GPU_BARRIER_SHADER_IMAGE_ACCESS = (1 << 0), GPU_BARRIER_TEXTURE_FETCH = (1 << 1), GPU_BARRIER_SHADER_STORAGE = (1 << 2), + GPU_BARRIER_VERTEX_ATTRIB_ARRAY = (1 << 3), + GPU_BARRIER_ELEMENT_ARRAY = (1 << 4), } eGPUBarrier; -ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_SHADER_STORAGE) +ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_ELEMENT_ARRAY) /** * Defines the fixed pipeline blending equation. diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh index 979644b41c9..f5c38a33628 100644 --- a/source/blender/gpu/opengl/gl_state.hh +++ b/source/blender/gpu/opengl/gl_state.hh @@ -130,6 +130,12 @@ static inline GLbitfield to_gl(eGPUBarrier barrier_bits) if (barrier_bits & GPU_BARRIER_SHADER_STORAGE) { barrier |= GL_SHADER_STORAGE_BARRIER_BIT; } + if (barrier_bits & GPU_BARRIER_VERTEX_ATTRIB_ARRAY) { + barrier |= GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT; + } + if (barrier_bits & GPU_BARRIER_ELEMENT_ARRAY) { + barrier |= GL_ELEMENT_ARRAY_BARRIER_BIT; + } return barrier; } |