Add integer vectors to GrSLType
BUG=skia:
Change-Id: I4a4a50e214f2240d83f6f0b02cf43e695c067933
Reviewed-on: https://skia-review.googlesource.com/8122
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/vk/GrVkUniformHandler.cpp b/src/gpu/vk/GrVkUniformHandler.cpp
index f0f0fff..f69c9d1 100644
--- a/src/gpu/vk/GrVkUniformHandler.cpp
+++ b/src/gpu/vk/GrVkUniformHandler.cpp
@@ -28,6 +28,12 @@
return 0xF;
case kVec4f_GrSLType:
return 0xF;
+ case kVec2i_GrSLType:
+ return 0x7;
+ case kVec3i_GrSLType:
+ return 0xF;
+ case kVec4i_GrSLType:
+ return 0xF;
case kMat22f_GrSLType:
return 0x7;
case kMat33f_GrSLType:
@@ -59,9 +65,9 @@
static inline uint32_t grsltype_to_vk_size(GrSLType type) {
switch(type) {
case kInt_GrSLType:
- return 4;
+ return sizeof(int32_t);
case kUint_GrSLType:
- return 4;
+ return sizeof(int32_t);
case kFloat_GrSLType:
return sizeof(float);
case kVec2f_GrSLType:
@@ -70,6 +76,12 @@
return 3 * sizeof(float);
case kVec4f_GrSLType:
return 4 * sizeof(float);
+ case kVec2i_GrSLType:
+ return 2 * sizeof(int32_t);
+ case kVec3i_GrSLType:
+ return 3 * sizeof(int32_t);
+ case kVec4i_GrSLType:
+ return 4 * sizeof(int32_t);
case kMat22f_GrSLType:
//TODO: this will be 4 * szof(float) on std430.
return 8 * sizeof(float);