aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-03-18 11:57:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 11:57:24 -0700
commitfd359caf0cbdefd759d1c788d72faba3f65a6386 (patch)
tree541034405d63060f5b336bd9d739dd60cb13f99b /include
parent89edf7a95ea694ba2c0a33adedf553c4183cdc19 (diff)
Implement Vulkan GrBackendObject for textures.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/gpu/vk/GrVkTypes.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/gpu/vk/GrVkTypes.h b/include/gpu/vk/GrVkTypes.h
new file mode 100755
index 0000000000..e671f5dddd
--- /dev/null
+++ b/include/gpu/vk/GrVkTypes.h
@@ -0,0 +1,42 @@
+
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrVkTypes_DEFINED
+#define GrVkTypes_DEFINED
+
+#include <vulkan/vulkan.h>
+
+/**
+ * KHR_debug
+ */
+/*typedef void (GR_GL_FUNCTION_TYPE* GrVkDEBUGPROC)(GrVkenum source,
+ GrVkenum type,
+ GrVkuint id,
+ GrVkenum severity,
+ GrVksizei length,
+ const GrVkchar* message,
+ const void* userParam);*/
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+/**
+ * Types for interacting with Vulkan resources created externally to Skia. GrBackendObjects for
+ * Vulkan textures are really const GrVkTextureInfo*
+ */
+
+struct GrVkTextureInfo {
+ VkImage fImage;
+ VkDeviceMemory fAlloc; // this may be null iff the texture is an RT and uses borrow semantics
+ VkImageTiling fImageTiling;
+ VkImageLayout fImageLayout;
+};
+
+GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkTextureInfo*));
+
+#endif