Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: gpu/vulkan/vulkan_image_view.h

Issue 1776453003: Added initial implementation of Vulkan Render Passes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_vulkan
Patch Set: Adding logging/macros headers Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/vulkan/vulkan_command_pool.cc ('k') | gpu/vulkan/vulkan_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/vulkan_image_view.h
diff --git a/gpu/vulkan/vulkan_image_view.h b/gpu/vulkan/vulkan_image_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..476d78527f4f8df2385af663c1a183bd0e84e41d
--- /dev/null
+++ b/gpu/vulkan/vulkan_image_view.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
+#define GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
+
+#include <vulkan/vulkan.h>
+
+#include "base/macros.h"
+
+namespace gpu {
+
+class VulkanImageView {
+ public:
+ enum ImageType {
+ IMAGE_TYPE_COLOR,
+ IMAGE_TYPE_DEPTH,
+ IMAGE_TYPE_STENCIL,
+ IMAGE_TYPE_DEPTH_STENCIL,
+
+ NUM_IMAGE_TYPES,
+ IMAGE_TYPE_INVALID = -1,
+ };
+
+ VulkanImageView();
+ ~VulkanImageView();
+
+ bool Initialize(VkImage image,
+ VkImageViewType image_view_type,
+ ImageType image_type,
+ VkFormat format,
+ uint32_t width,
+ uint32_t height,
+ uint32_t base_mip_level,
+ uint32_t num_mips,
+ uint32_t base_layer_level,
+ uint32_t num_layers);
+ void Destroy();
+
+ ImageType image_type() const { return image_type_; }
+ VkImageView handle() const { return handle_; }
+ VkFormat format() const { return format_; }
+ uint32_t width() const { return width_; }
+ uint32_t height() const { return height_; }
+ uint32_t mips() const { return mips_; }
+ uint32_t layers() const { return layers_; }
+
+ private:
+ ImageType image_type_ = IMAGE_TYPE_INVALID;
+ VkImageView handle_ = VK_NULL_HANDLE;
+ VkFormat format_ = VK_FORMAT_UNDEFINED;
+ uint32_t width_ = 0;
+ uint32_t height_ = 0;
+ uint32_t mips_ = 0;
+ uint32_t layers_ = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(VulkanImageView);
+};
+
+} // namespace gpu
+
+#endif // GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
« no previous file with comments | « gpu/vulkan/vulkan_command_pool.cc ('k') | gpu/vulkan/vulkan_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698