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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 2348523002: Support use of non-coherent memory allocations in Vulkan. (Closed)
Patch Set: Some more clean up Created 4 years, 3 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
« src/gpu/vk/GrVkGpu.cpp ('K') | « src/gpu/vk/GrVkMemory.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 // set up initial image layouts and create surfaces 256 // set up initial image layouts and create surfaces
257 fImageLayouts = new VkImageLayout[fImageCount]; 257 fImageLayouts = new VkImageLayout[fImageCount];
258 fSurfaces = new sk_sp<SkSurface>[fImageCount]; 258 fSurfaces = new sk_sp<SkSurface>[fImageCount];
259 for (uint32_t i = 0; i < fImageCount; ++i) { 259 for (uint32_t i = 0; i < fImageCount; ++i) {
260 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; 260 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED;
261 261
262 GrBackendRenderTargetDesc desc; 262 GrBackendRenderTargetDesc desc;
263 GrVkImageInfo info; 263 GrVkImageInfo info;
264 info.fImage = fImages[i]; 264 info.fImage = fImages[i];
265 info.fAlloc = { VK_NULL_HANDLE, 0, 0 }; 265 info.fAlloc = { VK_NULL_HANDLE, 0, 0, 0 };
266 info.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; 266 info.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED;
267 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; 267 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
268 info.fFormat = format; 268 info.fFormat = format;
269 info.fLevelCount = 1; 269 info.fLevelCount = 1;
270 desc.fWidth = fWidth; 270 desc.fWidth = fWidth;
271 desc.fHeight = fHeight; 271 desc.fHeight = fHeight;
272 desc.fConfig = fPixelConfig; 272 desc.fConfig = fPixelConfig;
273 desc.fOrigin = kTopLeft_GrSurfaceOrigin; 273 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
274 desc.fSampleCnt = 0; 274 desc.fSampleCnt = 0;
275 desc.fStencilBits = 0; 275 desc.fStencilBits = 0;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 1, // swapchainCount 597 1, // swapchainCount
598 &fSwapchain, // pSwapchains 598 &fSwapchain, // pSwapchains
599 &backbuffer->fImageIndex, // pImageIndices 599 &backbuffer->fImageIndex, // pImageIndices
600 NULL // pResults 600 NULL // pResults
601 }; 601 };
602 602
603 fQueuePresentKHR(fPresentQueue, &presentInfo); 603 fQueuePresentKHR(fPresentQueue, &presentInfo);
604 } 604 }
605 605
606 } //namespace sk_app 606 } //namespace sk_app
OLDNEW
« src/gpu/vk/GrVkGpu.cpp ('K') | « src/gpu/vk/GrVkMemory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698