aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkVaryingHandler.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-10 11:19:51 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-10 17:13:34 +0000
commit434c534bd0ec08cb355fecfb6d2110197b523e74 (patch)
tree119167b88683157346ab8250bbc553903e046f7f /src/gpu/vk/GrVkVaryingHandler.cpp
parente13a69baac9dc326510009fa7c0c5966aee9240c (diff)
Add integer texture support.
This allows us to create integer textures and sample them from a GrProcessor's code. Filtering is limited to NEAREST. Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs. Vulkan support is TBD. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4348 Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d Reviewed-on: https://skia-review.googlesource.com/4348 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkVaryingHandler.cpp')
-rw-r--r--src/gpu/vk/GrVkVaryingHandler.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gpu/vk/GrVkVaryingHandler.cpp b/src/gpu/vk/GrVkVaryingHandler.cpp
index f6fed21955..10c536260f 100644
--- a/src/gpu/vk/GrVkVaryingHandler.cpp
+++ b/src/gpu/vk/GrVkVaryingHandler.cpp
@@ -20,6 +20,7 @@ static inline int grsltype_to_location_size(GrSLType type) {
3, // kMat33f_GrSLType
4, // kMat44f_GrSLType
0, // kTexture2DSampler_GrSLType
+ 0, // kTexture2DISampler_GrSLType
0, // kTextureExternalSampler_GrSLType
0, // kTexture2DRectSampler_GrSLType
0, // kTextureBufferSampler_GrSLType
@@ -40,14 +41,15 @@ static inline int grsltype_to_location_size(GrSLType type) {
GR_STATIC_ASSERT(6 == kMat33f_GrSLType);
GR_STATIC_ASSERT(7 == kMat44f_GrSLType);
GR_STATIC_ASSERT(8 == kTexture2DSampler_GrSLType);
- GR_STATIC_ASSERT(9 == kTextureExternalSampler_GrSLType);
- GR_STATIC_ASSERT(10 == kTexture2DRectSampler_GrSLType);
- GR_STATIC_ASSERT(11 == kTextureBufferSampler_GrSLType);
- GR_STATIC_ASSERT(12 == kBool_GrSLType);
- GR_STATIC_ASSERT(13 == kInt_GrSLType);
- GR_STATIC_ASSERT(14 == kUint_GrSLType);
- GR_STATIC_ASSERT(15 == kTexture2D_GrSLType);
- GR_STATIC_ASSERT(16 == kSampler_GrSLType);
+ GR_STATIC_ASSERT(9 == kTexture2DISampler_GrSLType);
+ GR_STATIC_ASSERT(10 == kTextureExternalSampler_GrSLType);
+ GR_STATIC_ASSERT(11 == kTexture2DRectSampler_GrSLType);
+ GR_STATIC_ASSERT(12 == kTextureBufferSampler_GrSLType);
+ GR_STATIC_ASSERT(13 == kBool_GrSLType);
+ GR_STATIC_ASSERT(14 == kInt_GrSLType);
+ GR_STATIC_ASSERT(15 == kUint_GrSLType);
+ GR_STATIC_ASSERT(16 == kTexture2D_GrSLType);
+ GR_STATIC_ASSERT(17 == kSampler_GrSLType);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kSizes) == kGrSLTypeCount);
}