diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-01-12 12:45:16 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-01-12 12:45:16 -0300 |
commit | 0041efec1dc6e9fc806721196de54bd7dadd97a8 (patch) | |
tree | 082bceb58cf09ea29ad6c889d86c0ec115a76953 /drivers | |
parent | f4d603b9027b09a4050ca9621bf17d07af65c5b0 (diff) |
Fix mat2 alignment
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shader_compiler_gles3.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 61f3fb5b2a..945970c6b4 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -70,8 +70,10 @@ static int _get_datatype_size(SL::DataType p_type) { case SL::TYPE_VEC2: return 8; case SL::TYPE_VEC3: return 12; case SL::TYPE_VEC4: return 16; - case SL::TYPE_MAT2: return 16; - case SL::TYPE_MAT3: return 44; + case SL::TYPE_MAT2: + return 24; //4 * 4 + 4 * 2 + case SL::TYPE_MAT3: + return 44; // 4 * 4 + 4 * 4 + 4 * 3 case SL::TYPE_MAT4: return 64; case SL::TYPE_SAMPLER2D: return 16; case SL::TYPE_ISAMPLER2D: return 16; |