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

Issue 2344323002: Refactor vulkan buffer mapping and unmapping (Closed)

Created:
4 years, 3 months ago by egdaniel
Modified:
4 years, 3 months ago
Reviewers:
jvanverth1
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Refactor vulkan buffer mapping and unmapping A lot of this is so we don't have duplicated code in both the map/unmap and updateData functions of GrVkBuffer. Also there were slightly differences in how we handled various things in the two cases that this now unifies. Also I added a barrier after the vkUpdateBuffer call which I believe was missing. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344323002 Committed: https://skia.googlesource.com/skia/+/927ac9c532084c816801434340383e4bd822c726

Patch Set 1 #

Patch Set 2 : additional barrier #

Patch Set 3 : Don't reset fMapPtr on static #

Total comments: 2

Patch Set 4 : Dont delete static cpu buffer #

Total comments: 5

Patch Set 5 : remove unneeded barrier #

Total comments: 1

Patch Set 6 : inner->internal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -48 lines) Patch
M src/gpu/vk/GrVkBuffer.h View 1 2 3 4 5 3 chunks +10 lines, -2 lines 0 comments Download
M src/gpu/vk/GrVkBuffer.cpp View 1 2 3 4 5 2 chunks +49 lines, -37 lines 0 comments Download
M src/gpu/vk/GrVkGpu.cpp View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M src/gpu/vk/GrVkUniformBuffer.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (4 generated)
egdaniel
https://codereview.chromium.org/2344323002/diff/40001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/40001/src/gpu/vk/GrVkBuffer.cpp#newcode156 src/gpu/vk/GrVkBuffer.cpp:156: SkASSERT(fMapPtr); we now never delete the resources for static ...
4 years, 3 months ago (2016-09-16 20:00:28 UTC) #3
egdaniel
https://codereview.chromium.org/2344323002/diff/40001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/40001/src/gpu/vk/GrVkBuffer.cpp#newcode163 src/gpu/vk/GrVkBuffer.cpp:163: delete [] (unsigned char*)fMapPtr; We actually should not need ...
4 years, 3 months ago (2016-09-16 20:43:12 UTC) #4
jvanverth1
https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp#newcode157 src/gpu/vk/GrVkBuffer.cpp:157: this->addMemoryBarrier(gpu, I believe we add barriers externally in some ...
4 years, 3 months ago (2016-09-19 14:44:11 UTC) #5
egdaniel
https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp#newcode216 src/gpu/vk/GrVkBuffer.cpp:216: this->innerMap(gpu, srcSizeInBytes, createdNewBuffer); On 2016/09/19 14:44:11, jvanverth1 wrote: > ...
4 years, 3 months ago (2016-09-19 15:17:24 UTC) #6
jvanverth1
https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp#newcode216 src/gpu/vk/GrVkBuffer.cpp:216: this->innerMap(gpu, srcSizeInBytes, createdNewBuffer); On 2016/09/19 15:17:24, egdaniel wrote: > ...
4 years, 3 months ago (2016-09-19 15:37:31 UTC) #7
egdaniel
https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp File src/gpu/vk/GrVkBuffer.cpp (right): https://codereview.chromium.org/2344323002/diff/60001/src/gpu/vk/GrVkBuffer.cpp#newcode216 src/gpu/vk/GrVkBuffer.cpp:216: this->innerMap(gpu, srcSizeInBytes, createdNewBuffer); On 2016/09/19 15:37:31, jvanverth1 wrote: > ...
4 years, 3 months ago (2016-09-19 16:01:42 UTC) #8
jvanverth1
lgtm
4 years, 3 months ago (2016-09-19 16:14:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2344323002/100001
4 years, 3 months ago (2016-09-19 16:16:33 UTC) #11
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 16:32:12 UTC) #13
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/927ac9c532084c816801434340383e4bd822c726

Powered by Google App Engine
This is Rietveld 408576698