diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 15:13:23 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 15:17:04 +0300 |
commit | 08d008a5085bf57ba43c7aa76d51ea60b732a11a (patch) | |
tree | 0e2f86d5f9ab3b4ee74c14deccbde76c249aef49 /source/blender/gpu/GPU_shader_shared.h | |
parent | 2486346f6f0418d90b714119466921ac1da477e4 (diff) |
GPU: Create Info for GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR.
This patch converts GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR shader to use
the GPUShaderCreateInfo pattern. It can be used as a reference when
converting other shaders.
In this special case the flat uniform vector cannot be used anymore as it
doesn't fit as push constants. To solve this a uniform buffer is used.
Diffstat (limited to 'source/blender/gpu/GPU_shader_shared.h')
-rw-r--r-- | source/blender/gpu/GPU_shader_shared.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_shader_shared.h b/source/blender/gpu/GPU_shader_shared.h index 4d277921773..f400e151487 100644 --- a/source/blender/gpu/GPU_shader_shared.h +++ b/source/blender/gpu/GPU_shader_shared.h @@ -80,3 +80,10 @@ struct SimpleLightingData { float _pad; }; BLI_STATIC_ASSERT_ALIGN(struct SimpleLightingData, 16) + +#define MAX_CALLS 16 + +struct MultiRectCallData { + float4 calls_data[MAX_CALLS * 3]; +}; +BLI_STATIC_ASSERT_ALIGN(struct MultiRectCallData, 16) |