OLD | NEW |
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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 VK_ACCESS_TRANSFER_WRITE_BIT, | 394 VK_ACCESS_TRANSFER_WRITE_BIT, |
395 VK_PIPELINE_STAGE_TRANSFER_BIT, | 395 VK_PIPELINE_STAGE_TRANSFER_BIT, |
396 false); | 396 false); |
397 | 397 |
398 rt->msaaImage()->setImageLayout(this, | 398 rt->msaaImage()->setImageLayout(this, |
399 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, | 399 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, |
400 VK_ACCESS_TRANSFER_READ_BIT, | 400 VK_ACCESS_TRANSFER_READ_BIT, |
401 VK_PIPELINE_STAGE_TRANSFER_BIT, | 401 VK_PIPELINE_STAGE_TRANSFER_BIT, |
402 false); | 402 false); |
403 | 403 |
404 fCurrentCmdBuffer->resolveImage(this, *rt, *rt->msaaImage(), 1, &resolve
Info); | 404 fCurrentCmdBuffer->resolveImage(this, *rt->msaaImage(), *rt, 1, &resolve
Info); |
405 | 405 |
406 rt->flagAsResolved(); | 406 rt->flagAsResolved(); |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 bool GrVkGpu::uploadTexDataLinear(GrVkTexture* tex, | 410 bool GrVkGpu::uploadTexDataLinear(GrVkTexture* tex, |
411 int left, int top, int width, int height, | 411 int left, int top, int width, int height, |
412 GrPixelConfig dataConfig, | 412 GrPixelConfig dataConfig, |
413 const void* data, | 413 const void* data, |
414 size_t rowBytes) { | 414 size_t rowBytes) { |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 pBounds = &adjustedBounds; | 1793 pBounds = &adjustedBounds; |
1794 } | 1794 } |
1795 | 1795 |
1796 // Currently it is fine for us to always pass in 1 for the clear count even
if no attachment | 1796 // Currently it is fine for us to always pass in 1 for the clear count even
if no attachment |
1797 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the
color attachment | 1797 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the
color attachment |
1798 // which is always at the first attachment. | 1798 // which is always at the first attachment. |
1799 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
*pBounds, true); | 1799 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
*pBounds, true); |
1800 fCurrentCmdBuffer->executeCommands(this, buffer); | 1800 fCurrentCmdBuffer->executeCommands(this, buffer); |
1801 fCurrentCmdBuffer->endRenderPass(this); | 1801 fCurrentCmdBuffer->endRenderPass(this); |
1802 | 1802 |
1803 this->didWriteToSurface(target, pBounds); | 1803 this->didWriteToSurface(target, &bounds); |
1804 } | 1804 } |
1805 | 1805 |
OLD | NEW |