aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-11-16 17:59:22 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-16 17:59:33 +0000
commit3b2f5b60ff9a82ade01746d7e7cbbcc9348d6c03 (patch)
tree2231d093c5854d90efe4e7e2e74c8575e8c365fe /src/gpu/vk
parent7970765f7db5919ef5c6ad04b1a1bfe6505355c6 (diff)
Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
This reverts commit b5fb7cf0163ccb939f90ecf53ef70732c01f23ae. Reason for revert: breaking more devices Original change's description: > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"" > > This reverts commit 0fb6db4be6e30777cc5c87f1b601e8c4aacff2b1. > > Reason for revert: fixed bug > > Original change's description: > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half" > > > > This reverts commit 33d17cbb003975fff895954435183756f9893c17. > > > > Reason for revert: broke intel bots > > > > Original change's description: > > > 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> > > > > TBR=egdaniel@google.com,bsalomon@google.com > > > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/72180 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com > > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79 > Reviewed-on: https://skia-review.googlesource.com/72241 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/72660 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkCaps.cpp4
-rw-r--r--src/gpu/vk/GrVkUtil.cpp8
2 files changed, 3 insertions, 9 deletions
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 4ab1f024e0..2b24205af8 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -208,9 +208,7 @@ void GrVkCaps::initShaderCaps(const VkPhysicalDeviceProperties& properties, uint
// fConfigOutputSwizzle will default to RGBA so we only need to set it for alpha only config.
for (int i = 0; i < kGrPixelConfigCnt; ++i) {
GrPixelConfig config = static_cast<GrPixelConfig>(i);
- // Vulkan doesn't support a single channel format stored in alpha.
- if (GrPixelConfigIsAlphaOnly(config) &&
- kAlpha_8_as_Alpha_GrPixelConfig != config) {
+ if (GrPixelConfigIsAlphaOnly(config)) {
shaderCaps->fConfigTextureSwizzle[i] = GrSwizzle::RRRR();
shaderCaps->fConfigOutputSwizzle[i] = GrSwizzle::AAAA();
} else {
diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp
index 2f4e9b1d1d..0ce47cb962 100644
--- a/src/gpu/vk/GrVkUtil.cpp
+++ b/src/gpu/vk/GrVkUtil.cpp
@@ -42,12 +42,9 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) {
// store the data is if it was B4G4R4A4 and swizzle in shaders
*format = VK_FORMAT_B4G4R4A4_UNORM_PACK16;
return true;
- case kAlpha_8_GrPixelConfig: // fall through
- case kAlpha_8_as_Red_GrPixelConfig:
+ case kAlpha_8_GrPixelConfig:
*format = VK_FORMAT_R8_UNORM;
return true;
- case kAlpha_8_as_Alpha_GrPixelConfig:
- return false;
case kGray_8_GrPixelConfig:
*format = VK_FORMAT_R8_UNORM;
return true;
@@ -60,8 +57,7 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) {
case kRGBA_half_GrPixelConfig:
*format = VK_FORMAT_R16G16B16A16_SFLOAT;
return true;
- case kAlpha_half_GrPixelConfig: // fall through
- case kAlpha_half_as_Red_GrPixelConfig:
+ case kAlpha_half_GrPixelConfig:
*format = VK_FORMAT_R16_SFLOAT;
return true;
}