diff options
author | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:12 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:12 +0300 |
commit | 00dcfdf916c69672210b006e62d966f1bc2fbeb7 (patch) | |
tree | 0cbb1b91fe26c750197126085b74224a795a103c /source/blender/python/gpu/gpu_py_shader_create_info.cc | |
parent | a39532670f6b668da7be5810fb1f844b82feeba3 (diff) | |
parent | d5934974219135102f364f57c45a8b1465e2b8d9 (diff) |
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'source/blender/python/gpu/gpu_py_shader_create_info.cc')
-rw-r--r-- | source/blender/python/gpu/gpu_py_shader_create_info.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc index 3b043c605fa..c9e49c5cc4b 100644 --- a/source/blender/python/gpu/gpu_py_shader_create_info.cc +++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc @@ -15,7 +15,6 @@ #include "intern/gpu_shader_create_info.hh" #include "../generic/py_capi_utils.h" -#include "../generic/python_utildefines.h" #include "gpu_py_shader.h" /* own include */ @@ -59,7 +58,7 @@ static const struct PyC_FlagSet pygpu_qualifiers[] = { " - ``IVEC3``\n" \ " - ``IVEC4``\n" \ " - ``BOOL``\n" -static const struct PyC_StringEnumItems pygpu_attrtype_items[] = { +const struct PyC_StringEnumItems pygpu_attrtype_items[] = { {(int)Type::FLOAT, "FLOAT"}, {(int)Type::VEC2, "VEC2"}, {(int)Type::VEC3, "VEC3"}, @@ -674,6 +673,9 @@ static int constant_type_size(Type type) case Type::FLOAT: case Type::INT: case Type::UINT: + case Type::UCHAR4: + case Type::CHAR4: + case blender::gpu::shader::Type::VEC3_101010I2: return 4; break; case Type::VEC2: @@ -696,6 +698,18 @@ static int constant_type_size(Type type) case Type::MAT4: return 64; break; + case blender::gpu::shader::Type::UCHAR: + case blender::gpu::shader::Type::CHAR: + return 1; + break; + case blender::gpu::shader::Type::UCHAR2: + case blender::gpu::shader::Type::CHAR2: + return 2; + break; + case blender::gpu::shader::Type::UCHAR3: + case blender::gpu::shader::Type::CHAR3: + return 3; + break; } BLI_assert(false); return -1; |