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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
6 #define GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
7
8 #include <vulkan/vulkan.h>
9
10 #include "base/macros.h"
11
12 namespace gpu {
13
14 class VulkanImageView {
15 public:
16 enum ImageType {
17 IMAGE_TYPE_COLOR,
18 IMAGE_TYPE_DEPTH,
19 IMAGE_TYPE_STENCIL,
20 IMAGE_TYPE_DEPTH_STENCIL,
21
22 NUM_IMAGE_TYPES,
23 IMAGE_TYPE_INVALID = -1,
24 };
25
26 VulkanImageView();
27 ~VulkanImageView();
28
29 bool Initialize(VkImage image,
30 VkImageViewType image_view_type,
31 ImageType image_type,
32 VkFormat format,
33 uint32_t width,
34 uint32_t height,
35 uint32_t base_mip_level,
36 uint32_t num_mips,
37 uint32_t base_layer_level,
38 uint32_t num_layers);
39 void Destroy();
40
41 ImageType image_type() const { return image_type_; }
42 VkImageView handle() const { return handle_; }
43 VkFormat format() const { return format_; }
44 uint32_t width() const { return width_; }
45 uint32_t height() const { return height_; }
46 uint32_t mips() const { return mips_; }
47 uint32_t layers() const { return layers_; }
48
49 private:
50 ImageType image_type_ = IMAGE_TYPE_INVALID;
51 VkImageView handle_ = VK_NULL_HANDLE;
52 VkFormat format_ = VK_FORMAT_UNDEFINED;
53 uint32_t width_ = 0;
54 uint32_t height_ = 0;
55 uint32_t mips_ = 0;
56 uint32_t layers_ = 0;
57
58 DISALLOW_COPY_AND_ASSIGN(VulkanImageView);
59 };
60
61 } // namespace gpu
62
63 #endif // GPU_VULKAN_VULKAN_IMAGE_VIEW_H_
OLDNEW
« 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