diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 10:48:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 10:54:24 +0300 |
commit | 5abab0a41a02a0dbae0ea3ec355b7dfb6a778613 (patch) | |
tree | c18ed3a2395967c3aad146e316b26694ed746e4f /source/blender/gpu/intern/gpu_shader_create_info.hh | |
parent | a7f7b0b77e3ffce679c1b3a79bd7b9fd92779959 (diff) |
GPUShaderCreateInfo: Remove push_constant indexing
This is too much impractical and offers no real benefit.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_create_info.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.hh | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index 6236e92a226..63c6e94f4c8 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -314,7 +314,6 @@ struct ShaderCreateInfo { Vector<StageInterfaceInfo *> geometry_out_interfaces_; struct PushConst { - int index; Type type; StringRefNull name; int array_size; @@ -503,22 +502,14 @@ struct ShaderCreateInfo { /** \name Push constants * * Data managed by GPUShader. Can be set through uniform functions. Must be less than 128bytes. - * One slot represents 4bytes. Each element needs to have enough empty space left after it. - * example: - * [0] = PUSH_CONSTANT(MAT4, "ModelMatrix"), - * ---- 16 slots occupied by ModelMatrix ---- - * [16] = PUSH_CONSTANT(VEC4, "color"), - * ---- 4 slots occupied by color ---- - * [20] = PUSH_CONSTANT(BOOL, "srgbToggle"), - * The maximum slot is 31. * \{ */ - Self &push_constant(int slot, Type type, StringRefNull name, int array_size = 0) + Self &push_constant(Type type, StringRefNull name, int array_size = 0) { BLI_assert_msg(name.find("[") == -1, "Array syntax is forbidden for push constants." "Use the array_size parameter instead."); - push_constants_.append({slot, type, name, array_size}); + push_constants_.append({type, name, array_size}); interface_names_size_ += name.size() + 1; return *(Self *)this; } |