aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkPipelineLayout.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-06-19 15:22:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-20 13:37:28 +0000
commit7d918fde03d44011e7aac067227f88c4ba4cc3b8 (patch)
tree5f185edf442e4afff5c16bec75df4ad65d560082 /src/gpu/vk/GrVkPipelineLayout.h
parent53418da8c64773fed8c927404a8f7e78e93e1c95 (diff)
Don't destroy VkPipelineLayouts until after command buffer recording.
Bug: skia: Change-Id: I70be1dc6b29db9a9152e008293a7d0a276384011 Reviewed-on: https://skia-review.googlesource.com/135867 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkPipelineLayout.h')
-rw-r--r--src/gpu/vk/GrVkPipelineLayout.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkPipelineLayout.h b/src/gpu/vk/GrVkPipelineLayout.h
new file mode 100644
index 0000000000..7ab3242ebe
--- /dev/null
+++ b/src/gpu/vk/GrVkPipelineLayout.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2018 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrVkPipelineLayout_DEFINED
+#define GrVkPipelineLayout_DEFINED
+
+#include "GrTypes.h"
+#include "GrVkResource.h"
+#include "vk/GrVkDefines.h"
+
+class GrVkPipelineLayout : public GrVkResource {
+public:
+ GrVkPipelineLayout(VkPipelineLayout layout) : fPipelineLayout(layout) {}
+
+ VkPipelineLayout layout() const { return fPipelineLayout; }
+
+#ifdef SK_TRACE_VK_RESOURCES
+ void dumpInfo() const override {
+ SkDebugf("GrVkPipelineLayout: %d (%d refs)\n", fPipelineLayout, this->getRefCnt());
+ }
+#endif
+
+private:
+ GrVkPipelineLayout(const GrVkPipelineLayout&);
+ GrVkPipelineLayout& operator=(const GrVkPipelineLayout&);
+
+ void freeGPUData(const GrVkGpu* gpu) const override;
+
+ VkPipelineLayout fPipelineLayout;
+
+ typedef GrVkResource INHERITED;
+};
+
+#endif