summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-10-09 06:32:50 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-10-09 06:32:50 +0300
commit816600382e92a4efb8dad715cf98e9d170f4e29a (patch)
treecbdb9a64a2914b318612e70a16ec05a707b6e7a7 /drivers
parent880a0177d12463b612268afe95bd3d8dd565bf52 (diff)
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/storage/material_storage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 8e6009c943..f5241e33ab 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -897,7 +897,9 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type,
case ShaderLanguage::TYPE_BVEC3:
case ShaderLanguage::TYPE_IVEC3:
case ShaderLanguage::TYPE_UVEC3:
- case ShaderLanguage::TYPE_VEC3:
+ case ShaderLanguage::TYPE_VEC3: {
+ memset(data, 0, 12 * p_array_size);
+ } break;
case ShaderLanguage::TYPE_BVEC4:
case ShaderLanguage::TYPE_IVEC4:
case ShaderLanguage::TYPE_UVEC4: