Index: src/gpu/vk/GrVkRenderTarget.cpp |
diff --git a/src/gpu/vk/GrVkRenderTarget.cpp b/src/gpu/vk/GrVkRenderTarget.cpp |
index 708af7970e3b32d911a548aa71ba7688d1b35209..83a4b44a59562e5d3fae11bc21260951dcb2f542 100644 |
--- a/src/gpu/vk/GrVkRenderTarget.cpp |
+++ b/src/gpu/vk/GrVkRenderTarget.cpp |
@@ -33,10 +33,10 @@ GrVkRenderTarget::GrVkRenderTarget(GrVkGpu* gpu, |
, GrVkImage(info, wrapped) |
// for the moment we only support 1:1 color to stencil |
, GrRenderTarget(gpu, desc, kUnified_SampleConfig) |
- , fFramebuffer(nullptr) |
, fColorAttachmentView(colorAttachmentView) |
, fMSAAImage(new GrVkImage(msaaInfo, GrVkImage::kNot_Wrapped)) |
, fResolveAttachmentView(resolveAttachmentView) |
+ , fFramebuffer(nullptr) |
, fCachedSimpleRenderPass(nullptr) { |
SkASSERT(desc.fSampleCnt); |
// The plus 1 is to account for the resolve texture. |
@@ -58,10 +58,10 @@ GrVkRenderTarget::GrVkRenderTarget(GrVkGpu* gpu, |
, GrVkImage(info, wrapped) |
// for the moment we only support 1:1 color to stencil |
, GrRenderTarget(gpu, desc, kUnified_SampleConfig) |
- , fFramebuffer(nullptr) |
, fColorAttachmentView(colorAttachmentView) |
, fMSAAImage(new GrVkImage(msaaInfo, GrVkImage::kNot_Wrapped)) |
, fResolveAttachmentView(resolveAttachmentView) |
+ , fFramebuffer(nullptr) |
, fCachedSimpleRenderPass(nullptr) { |
SkASSERT(desc.fSampleCnt); |
// The plus 1 is to account for the resolve texture. |
@@ -80,10 +80,10 @@ GrVkRenderTarget::GrVkRenderTarget(GrVkGpu* gpu, |
: GrSurface(gpu, desc) |
, GrVkImage(info, wrapped) |
, GrRenderTarget(gpu, desc, kUnified_SampleConfig) |
- , fFramebuffer(nullptr) |
, fColorAttachmentView(colorAttachmentView) |
, fMSAAImage(nullptr) |
, fResolveAttachmentView(nullptr) |
+ , fFramebuffer(nullptr) |
, fCachedSimpleRenderPass(nullptr) { |
SkASSERT(!desc.fSampleCnt); |
fColorValuesPerPixel = 1; |
@@ -101,10 +101,10 @@ GrVkRenderTarget::GrVkRenderTarget(GrVkGpu* gpu, |
: GrSurface(gpu, desc) |
, GrVkImage(info, wrapped) |
, GrRenderTarget(gpu, desc, kUnified_SampleConfig) |
- , fFramebuffer(nullptr) |
, fColorAttachmentView(colorAttachmentView) |
, fMSAAImage(nullptr) |
, fResolveAttachmentView(nullptr) |
+ , fFramebuffer(nullptr) |
, fCachedSimpleRenderPass(nullptr) { |
SkASSERT(!desc.fSampleCnt); |
fColorValuesPerPixel = 1; |
@@ -117,6 +117,7 @@ GrVkRenderTarget::Create(GrVkGpu* gpu, |
const GrSurfaceDesc& desc, |
const GrVkImageInfo& info, |
GrVkImage::Wrapped wrapped) { |
+ SkASSERT(1 == info.fLevelCount); |
VkFormat pixelFormat; |
GrPixelConfigToVkFormat(desc.fConfig, &pixelFormat); |