From 5b299e5999e2b59e30edd4e770f64aa700e482d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 26 Jan 2022 12:46:37 +0100 Subject: D13910: Workbench: Port shaders to use GPUShaderCreateInfo Also adds a few things to GPUShader for easily create shaders. Heavy usage of macros to compose the createInfo and avoid duplications and copy paste bugs. This makes the link between the shader request functions (in workbench_shader.cc) and the actual createInfo a bit obscure since the names are composed and not searchable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13910 --- source/blender/gpu/GPU_shader.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/gpu/GPU_shader.h') diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index d2716b46124..972758febd4 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -149,9 +149,14 @@ typedef enum { } GPUUniformBuiltin; typedef enum { + /** Deprecated */ GPU_UNIFORM_BLOCK_VIEW = 0, /* viewBlock */ GPU_UNIFORM_BLOCK_MODEL, /* modelBlock */ GPU_UNIFORM_BLOCK_INFO, /* infoBlock */ + /** New ones */ + GPU_UNIFORM_BLOCK_DRW_VIEW, + GPU_UNIFORM_BLOCK_DRW_MODEL, + GPU_UNIFORM_BLOCK_DRW_INFOS, GPU_NUM_UNIFORM_BLOCKS, /* Special value, denotes number of builtin uniforms block. */ } GPUUniformBlockBuiltin; -- cgit v1.2.3