aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkGpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/vk/GrVkGpu.cpp')
-rw-r--r--src/gpu/vk/GrVkGpu.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 3b1b219c31..0011a78552 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1509,6 +1509,11 @@ GrBackendTexture GrVkGpu::createTestingOnlyBackendTexture(const void* srcData, i
GrPixelConfig config, bool isRenderTarget,
GrMipMapped mipMapped) {
this->handleDirtyContext();
+
+ if (w > this->caps()->maxTextureSize() || h > this->caps()->maxTextureSize()) {
+ return GrBackendTexture();
+ }
+
GrVkImageInfo info;
if (!this->createTestingOnlyVkImage(config, w, h, true, isRenderTarget, mipMapped, srcData,
&info)) {