aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShaderCaps.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-11-15 14:22:10 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-15 20:02:43 +0000
commit33d17cbb003975fff895954435183756f9893c17 (patch)
tree1317eec2ffe56bd384a592e749511abf3cbc6bf1 /src/gpu/GrShaderCaps.cpp
parentd8d984ecc99d8b7fc37a742e22acbe831f315142 (diff)
Add private grpixelconfigs for alpha_8 and alpha_half
Bug: skia: Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace Reviewed-on: https://skia-review.googlesource.com/71763 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrShaderCaps.cpp')
-rw-r--r--src/gpu/GrShaderCaps.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index 7e44188074..0a612db335 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -220,22 +220,24 @@ void GrShaderCaps::initSamplerPrecisionTable() {
}
uint8_t* table = fSamplerPrecisions[visibility];
- table[kUnknown_GrPixelConfig] = lowp;
- table[kAlpha_8_GrPixelConfig] = lowp;
- table[kGray_8_GrPixelConfig] = lowp;
- table[kRGB_565_GrPixelConfig] = lowp;
- table[kRGBA_4444_GrPixelConfig] = lowp;
- table[kRGBA_8888_GrPixelConfig] = lowp;
- table[kBGRA_8888_GrPixelConfig] = lowp;
- table[kSRGBA_8888_GrPixelConfig] = lowp;
- table[kSBGRA_8888_GrPixelConfig] = lowp;
- table[kRGBA_8888_sint_GrPixelConfig] = lowp;
- table[kRGBA_float_GrPixelConfig] = kHigh_GrSLPrecision;
- table[kRG_float_GrPixelConfig] = kHigh_GrSLPrecision;
- table[kAlpha_half_GrPixelConfig] = mediump;
- table[kRGBA_half_GrPixelConfig] = mediump;
-
- GR_STATIC_ASSERT(14 == kGrPixelConfigCnt);
+ table[kUnknown_GrPixelConfig] = lowp;
+ table[kAlpha_8_GrPixelConfig] = lowp;
+ table[kAlpha_8_as_Alpha_GrPixelConfig] = lowp;
+ table[kAlpha_8_as_Red_GrPixelConfig] = lowp;
+ table[kGray_8_GrPixelConfig] = lowp;
+ table[kRGB_565_GrPixelConfig] = lowp;
+ table[kRGBA_4444_GrPixelConfig] = lowp;
+ table[kRGBA_8888_GrPixelConfig] = lowp;
+ table[kBGRA_8888_GrPixelConfig] = lowp;
+ table[kSRGBA_8888_GrPixelConfig] = lowp;
+ table[kSBGRA_8888_GrPixelConfig] = lowp;
+ table[kRGBA_8888_sint_GrPixelConfig] = lowp;
+ table[kRGBA_float_GrPixelConfig] = kHigh_GrSLPrecision;
+ table[kRG_float_GrPixelConfig] = kHigh_GrSLPrecision;
+ table[kAlpha_half_GrPixelConfig] = mediump;
+ table[kAlpha_half_as_Alpha_GrPixelConfig] = mediump;
+ table[kAlpha_half_as_Red_GrPixelConfig] = mediump;
+ table[kRGBA_half_GrPixelConfig] = mediump;
}
}