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

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

Issue 1943333002: Add sync in vulkan when writing to linear texture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: always sync Created 4 years, 7 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 | « no previous file | 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 9
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 VkPipelineStageFlags dstStageMask = VK_PIPELINE_STAGE_HOST_BIT; 272 VkPipelineStageFlags dstStageMask = VK_PIPELINE_STAGE_HOST_BIT;
273 VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask( layout); 273 VkAccessFlags srcAccessMask = GrVkMemory::LayoutToSrcAccessMask( layout);
274 VkAccessFlags dstAccessMask = VK_ACCESS_HOST_WRITE_BIT; 274 VkAccessFlags dstAccessMask = VK_ACCESS_HOST_WRITE_BIT;
275 vkTex->setImageLayout(this, 275 vkTex->setImageLayout(this,
276 VK_IMAGE_LAYOUT_GENERAL, 276 VK_IMAGE_LAYOUT_GENERAL,
277 srcAccessMask, 277 srcAccessMask,
278 dstAccessMask, 278 dstAccessMask,
279 srcStageMask, 279 srcStageMask,
280 dstStageMask, 280 dstStageMask,
281 false); 281 false);
282 this->submitCommandBuffer(kForce_SyncQueue);
282 } 283 }
283 success = this->uploadTexDataLinear(vkTex, left, top, width, height, config, 284 success = this->uploadTexDataLinear(vkTex, left, top, width, height, config,
284 texels.begin()->fPixels, texels. begin()->fRowBytes); 285 texels.begin()->fPixels, texels. begin()->fRowBytes);
285 } else { 286 } else {
286 int newMipLevels = texels.count(); 287 int newMipLevels = texels.count();
287 int currentMipLevels = vkTex->texturePriv().maxMipMapLevel(); 288 int currentMipLevels = vkTex->texturePriv().maxMipMapLevel();
288 if ((currentMipLevels || newMipLevels != 1) && newMipLevels != curre ntMipLevels) { 289 if ((currentMipLevels || newMipLevels != 1) && newMipLevels != curre ntMipLevels) {
289 if (!vkTex->reallocForMipmap(this, newMipLevels)) { 290 if (!vkTex->reallocForMipmap(this, newMipLevels)) {
290 return false; 291 return false;
291 } 292 }
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 aglSwapBuffers(aglGetCurrentContext()); 1808 aglSwapBuffers(aglGetCurrentContext());
1808 int set_a_break_pt_here = 9; 1809 int set_a_break_pt_here = 9;
1809 aglSwapBuffers(aglGetCurrentContext()); 1810 aglSwapBuffers(aglGetCurrentContext());
1810 #elif defined(SK_BUILD_FOR_WIN32) 1811 #elif defined(SK_BUILD_FOR_WIN32)
1811 SwapBuf(); 1812 SwapBuf();
1812 int set_a_break_pt_here = 9; 1813 int set_a_break_pt_here = 9;
1813 SwapBuf(); 1814 SwapBuf();
1814 #endif 1815 #endif
1815 #endif 1816 #endif
1816 } 1817 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698