summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/sc.cpp4
-rw-r--r--sc/sh_enums.h3
-rw-r--r--sc/sh_helpers.h3
3 files changed, 9 insertions, 1 deletions
diff --git a/sc/sc.cpp b/sc/sc.cpp
index 9232e10..f0ce0ff 100644
--- a/sc/sc.cpp
+++ b/sc/sc.cpp
@@ -168,14 +168,16 @@ struct Desc {
std::pair<int, int> size() const {
switch (type) {
case svariable_type_float:
- return { 4, 4 };
case svariable_type_int:
return { 4, 4 };
case svariable_type_vec2:
+ case svariable_type_ivec2:
return { 8, 8 };
case svariable_type_vec3:
+ case svariable_type_ivec3:
return { 12, 16 };
case svariable_type_vec4:
+ case svariable_type_ivec4:
return { 16, 16 };
case svariable_type_mat2:
return { 16, 16 };
diff --git a/sc/sh_enums.h b/sc/sh_enums.h
index e9a33b8..6cf9495 100644
--- a/sc/sh_enums.h
+++ b/sc/sh_enums.h
@@ -28,6 +28,9 @@ sprogram_type_xmacro()
x(vec2) \
x(vec3) \
x(vec4) \
+ x(ivec2) \
+ x(ivec3) \
+ x(ivec4) \
x(mat2) \
x(mat3) \
x(mat4)
diff --git a/sc/sh_helpers.h b/sc/sh_helpers.h
index fa503dc..1b81bd6 100644
--- a/sc/sh_helpers.h
+++ b/sc/sh_helpers.h
@@ -5,6 +5,9 @@ int svariable_type_size(SVariable_Type type) {
case svariable_type_vec2: return 8;
case svariable_type_vec3: return 12;
case svariable_type_vec4: return 16;
+ case svariable_type_ivec2: return 8;
+ case svariable_type_ivec3: return 12;
+ case svariable_type_ivec4: return 16;
case svariable_type_mat2: return 16;
case svariable_type_mat3: return 36;
case svariable_type_mat4: return 64;