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

Side by Side Diff: src/gpu/vk/GrVkImage.cpp

Issue 2242553002: Allow vulkan to upload data to testing textures with optimal layouts (Closed) Base URL: https://skia.googlesource.com/skia.git@yuv
Patch Set: fix cast Created 4 years, 4 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 | « src/gpu/vk/GrVkGpu.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkGpu.h" 8 #include "GrVkGpu.h"
9 #include "GrVkImage.h" 9 #include "GrVkImage.h"
10 #include "GrVkMemory.h" 10 #include "GrVkMemory.h"
(...skipping 26 matching lines...) Expand all
37 if (newLayout == currentLayout) { 37 if (newLayout == currentLayout) {
38 return; 38 return;
39 } 39 }
40 40
41 VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask(currentLayou t); 41 VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask(currentLayou t);
42 VkPipelineStageFlags srcStageMask = GrVkMemory::LayoutToPipelineStageFlags(c urrentLayout); 42 VkPipelineStageFlags srcStageMask = GrVkMemory::LayoutToPipelineStageFlags(c urrentLayout);
43 43
44 VkImageAspectFlags aspectFlags = vk_format_to_aspect_flags(fInfo.fFormat); 44 VkImageAspectFlags aspectFlags = vk_format_to_aspect_flags(fInfo.fFormat);
45 VkImageMemoryBarrier imageMemoryBarrier = { 45 VkImageMemoryBarrier imageMemoryBarrier = {
46 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // sType 46 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // sType
47 NULL, // pNext 47 nullptr, // pNext
48 srcAccessMask, // outputMask 48 srcAccessMask, // outputMask
49 dstAccessMask, // inputMask 49 dstAccessMask, // inputMask
50 currentLayout, // oldLayout 50 currentLayout, // oldLayout
51 newLayout, // newLayout 51 newLayout, // newLayout
52 VK_QUEUE_FAMILY_IGNORED, // srcQueueFamilyIndex 52 VK_QUEUE_FAMILY_IGNORED, // srcQueueFamilyIndex
53 VK_QUEUE_FAMILY_IGNORED, // dstQueueFamilyIndex 53 VK_QUEUE_FAMILY_IGNORED, // dstQueueFamilyIndex
54 fInfo.fImage, // image 54 fInfo.fImage, // image
55 { aspectFlags, 0, fInfo.fLevelCount, 0, 1 } // subresourceRange 55 { aspectFlags, 0, fInfo.fLevelCount, 0, 1 } // subresourceRange
56 }; 56 };
57 57
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 void GrVkImage::Resource::freeGPUData(const GrVkGpu* gpu) const { 151 void GrVkImage::Resource::freeGPUData(const GrVkGpu* gpu) const {
152 VK_CALL(gpu, DestroyImage(gpu->device(), fImage, nullptr)); 152 VK_CALL(gpu, DestroyImage(gpu->device(), fImage, nullptr));
153 bool isLinear = (VK_IMAGE_TILING_LINEAR == fImageTiling); 153 bool isLinear = (VK_IMAGE_TILING_LINEAR == fImageTiling);
154 GrVkMemory::FreeImageMemory(gpu, isLinear, fAlloc); 154 GrVkMemory::FreeImageMemory(gpu, isLinear, fAlloc);
155 } 155 }
156 156
157 void GrVkImage::BorrowedResource::freeGPUData(const GrVkGpu* gpu) const { 157 void GrVkImage::BorrowedResource::freeGPUData(const GrVkGpu* gpu) const {
158 } 158 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698