Revert "Add support for Ycbcr Conversion Samplers in vulkan."
This reverts commit 6cd74900dab22d2b616cbbeb97bef9608819beee.
Reason for revert: breaking win vulkan bots
Original change's description:
> Add support for Ycbcr Conversion Samplers in vulkan.
>
> The only thing missing from this CL is that we need to bake the
> ycbcr conversion samplers into the VkPipeline when we create it. As that
> is a larger change, that will be broken up into a few follow on CLs.
>
> Currently this only supports ycbcr conversion samplers when used with
> external textures.
>
> Bug: skia:
> Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
> Reviewed-on: https://skia-review.googlesource.com/c/164602
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: Ib56905821cbfd40cf30ec89269b551ce01605a1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/173982
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkImageView.cpp b/src/gpu/vk/GrVkImageView.cpp
index 342ce46..b737df5 100644
--- a/src/gpu/vk/GrVkImageView.cpp
+++ b/src/gpu/vk/GrVkImageView.cpp
@@ -7,37 +7,16 @@
#include "GrVkImageView.h"
#include "GrVkGpu.h"
-#include "GrVkSamplerYcbcrConversion.h"
#include "GrVkUtil.h"
-const GrVkImageView* GrVkImageView::Create(GrVkGpu* gpu, VkImage image, VkFormat format,
- Type viewType, uint32_t miplevels,
- const GrVkYcbcrConversionInfo& ycbcrInfo) {
-
- void* pNext = nullptr;
- VkSamplerYcbcrConversionInfo conversionInfo;
- GrVkSamplerYcbcrConversion* ycbcrConversion = nullptr;
-
- if (ycbcrInfo.isValid()) {
- SkASSERT(gpu->vkCaps().supportsYcbcrConversion() && format == VK_FORMAT_UNDEFINED);
-
- ycbcrConversion =
- gpu->resourceProvider().findOrCreateCompatibleSamplerYcbcrConversion(ycbcrInfo);
- if (!ycbcrConversion) {
- return nullptr;
- }
-
- conversionInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO;
- conversionInfo.pNext = nullptr;
- conversionInfo.conversion = ycbcrConversion->ycbcrConversion();
- pNext = &conversionInfo;
- }
-
+const GrVkImageView* GrVkImageView::Create(const GrVkGpu* gpu, VkImage image, VkFormat format,
+ Type viewType, uint32_t miplevels) {
VkImageView imageView;
+
// Create the VkImageView
VkImageViewCreateInfo viewInfo = {
VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, // sType
- pNext, // pNext
+ NULL, // pNext
0, // flags
image, // image
VK_IMAGE_VIEW_TYPE_2D, // viewType
@@ -58,20 +37,9 @@
return nullptr;
}
- return new GrVkImageView(imageView, ycbcrConversion);
+ return new GrVkImageView(imageView);
}
void GrVkImageView::freeGPUData(const GrVkGpu* gpu) const {
GR_VK_CALL(gpu->vkInterface(), DestroyImageView(gpu->device(), fImageView, nullptr));
-
- if (fYcbcrConversion) {
- fYcbcrConversion->unref(gpu);
- }
}
-
-void GrVkImageView::abandonGPUData() const {
- if (fYcbcrConversion) {
- fYcbcrConversion->unrefAndAbandon();
- }
-}
-