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

Issue 1825393002: Consolidate GPU buffer implementations (Closed)

Created:
4 years, 9 months ago by Chris Dalton
Modified:
4 years, 9 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Consolidate GPU buffer implementations Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f Committed: https://skia.googlesource.com/skia/+/397536cabe12a9936659870dd220c869789424ba

Patch Set 1 #

Total comments: 1

Patch Set 2 : bug #

Patch Set 3 : copyright dates #

Patch Set 4 : comment #

Patch Set 5 : vulkan #

Total comments: 11

Patch Set 6 : gyp #

Total comments: 2

Patch Set 7 : rebase + vulkan #

Total comments: 8

Patch Set 8 : casts #

Patch Set 9 : compiler warnings #

Patch Set 10 : more warnings #

Patch Set 11 : asserts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+827 lines, -1425 lines) Patch
M gyp/gpu.gypi View 1 2 3 4 5 6 8 chunks +3 lines, -12 lines 0 comments Download
M include/gpu/GrCaps.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M include/gpu/GrContextOptions.h View 2 chunks +2 lines, -2 lines 0 comments Download
M include/gpu/GrTypesPriv.h View 1 2 3 5 6 1 chunk +23 lines, -7 lines 0 comments Download
M src/gpu/GrBatchAtlas.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M src/gpu/GrBatchFlushState.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/GrBatchFlushState.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
A src/gpu/GrBuffer.h View 1 2 3 4 5 6 7 8 1 chunk +145 lines, -0 lines 0 comments Download
M src/gpu/GrBufferAllocPool.h View 7 chunks +11 lines, -24 lines 0 comments Download
M src/gpu/GrBufferAllocPool.cpp View 12 chunks +17 lines, -28 lines 0 comments Download
M src/gpu/GrCaps.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrDrawTarget.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 chunk +0 lines, -1 line 0 comments Download
D src/gpu/GrGeometryBuffer.h View 1 chunk +0 lines, -124 lines 0 comments Download
M src/gpu/GrGpu.h View 1 2 3 4 5 6 6 chunks +18 lines, -50 lines 0 comments Download
M src/gpu/GrGpu.cpp View 1 2 3 4 5 6 4 chunks +8 lines, -25 lines 0 comments Download
D src/gpu/GrIndexBuffer.h View 1 chunk +0 lines, -51 lines 0 comments Download
M src/gpu/GrMesh.h View 6 chunks +11 lines, -11 lines 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/GrResourceProvider.h View 6 chunks +19 lines, -30 lines 0 comments Download
M src/gpu/GrResourceProvider.cpp View 4 chunks +16 lines, -58 lines 0 comments Download
M src/gpu/GrSoftwarePathRenderer.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M src/gpu/GrTest.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -7 lines 0 comments Download
D src/gpu/GrTransferBuffer.h View 1 chunk +0 lines, -76 lines 0 comments Download
D src/gpu/GrVertexBuffer.h View 1 chunk +0 lines, -42 lines 0 comments Download
M src/gpu/batches/GrAAConvexPathRenderer.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/batches/GrAADistanceFieldPathRenderer.cpp View 1 2 3 4 5 6 7 4 chunks +6 lines, -5 lines 0 comments Download
M src/gpu/batches/GrAAFillRectBatch.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrAAHairLinePathRenderer.cpp View 5 chunks +7 lines, -8 lines 0 comments Download
M src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrAAStrokeRectBatch.cpp View 3 chunks +4 lines, -5 lines 0 comments Download
M src/gpu/batches/GrAtlasTextBatch.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrAtlasTextBatch.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/batches/GrDefaultPathRenderer.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrDrawVerticesBatch.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrNinePatch.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/batches/GrNonAAFillRectBatch.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/batches/GrNonAAStrokeRectBatch.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/batches/GrPLSPathRenderer.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/batches/GrTInstanceBatch.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/batches/GrTessellatingPathRenderer.cpp View 5 chunks +7 lines, -8 lines 0 comments Download
M src/gpu/batches/GrTestBatch.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/gpu/batches/GrVertexBatch.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/batches/GrVertexBatch.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/effects/GrDashingEffect.cpp View 1 chunk +0 lines, -1 line 0 comments Download
A src/gpu/gl/GrGLBuffer.h View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A src/gpu/gl/GrGLBuffer.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +338 lines, -0 lines 0 comments Download
D src/gpu/gl/GrGLBufferImpl.h View 1 chunk +0 lines, -69 lines 0 comments Download
D src/gpu/gl/GrGLBufferImpl.cpp View 1 chunk +0 lines, -122 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M src/gpu/gl/GrGLDefines.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.h View 1 2 3 4 5 6 6 chunks +5 lines, -18 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 4 5 6 7 8 9 10 7 chunks +18 lines, -226 lines 0 comments Download
D src/gpu/gl/GrGLIndexBuffer.h View 1 chunk +0 lines, -48 lines 0 comments Download
D src/gpu/gl/GrGLIndexBuffer.cpp View 1 chunk +0 lines, -60 lines 0 comments Download
D src/gpu/gl/GrGLTransferBuffer.h View 1 chunk +0 lines, -48 lines 0 comments Download
D src/gpu/gl/GrGLTransferBuffer.cpp View 1 chunk +0 lines, -51 lines 0 comments Download
M src/gpu/gl/GrGLVertexArray.h View 1 chunk +0 lines, -2 lines 0 comments Download
D src/gpu/gl/GrGLVertexBuffer.h View 1 chunk +0 lines, -48 lines 0 comments Download
D src/gpu/gl/GrGLVertexBuffer.cpp View 1 chunk +0 lines, -60 lines 0 comments Download
M src/gpu/vk/GrVkCaps.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/vk/GrVkGpu.h View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M src/gpu/vk/GrVkGpu.cpp View 1 2 3 4 5 6 2 chunks +23 lines, -14 lines 0 comments Download
M src/gpu/vk/GrVkIndexBuffer.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/vk/GrVkIndexBuffer.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M src/gpu/vk/GrVkTransferBuffer.h View 1 2 3 4 5 6 3 chunks +10 lines, -7 lines 0 comments Download
M src/gpu/vk/GrVkTransferBuffer.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M src/gpu/vk/GrVkVertexBuffer.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/vk/GrVkVertexBuffer.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 57 (19 generated)
Chris Dalton
This is mostly a cut/paste/search/replace marathon. The actual behavior should be identical to before (working ...
4 years, 9 months ago (2016-03-23 16:53:49 UTC) #3
egdaniel
adding jim for vulkan buffer knowledge
4 years, 9 months ago (2016-03-23 16:56:58 UTC) #5
Chris Dalton
Ok, I've verified that the GL command stream is identical before and after this change, ...
4 years, 9 months ago (2016-03-24 03:44:25 UTC) #6
Chris Dalton
This updates the vulkan bits. The vulkan build has several compile errors from me out ...
4 years, 9 months ago (2016-03-24 05:07:59 UTC) #7
jvanverth1
On 2016/03/24 05:07:59, Chris Dalton wrote: > This updates the vulkan bits. The vulkan build ...
4 years, 9 months ago (2016-03-24 13:36:14 UTC) #8
Chris Dalton
On 2016/03/24 13:36:14, jvanverth1 wrote: > On 2016/03/24 05:07:59, Chris Dalton wrote: > > This ...
4 years, 9 months ago (2016-03-24 14:06:32 UTC) #9
bsalomon
https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h File src/gpu/GrBuffer.h (right): https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h#newcode19 src/gpu/GrBuffer.h:19: * and "stream" access patterns are disqualified by nature ...
4 years, 9 months ago (2016-03-24 14:30:44 UTC) #10
Chris Dalton
<Publish+Mail link not working. Testing with nonempty commit message> https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h File src/gpu/GrBuffer.h (right): https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h#newcode19 src/gpu/GrBuffer.h:19: ...
4 years, 9 months ago (2016-03-24 15:04:40 UTC) #11
bsalomon
lgtm assuming it doesn't break the vulkan build. https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h File src/gpu/GrBuffer.h (right): https://codereview.chromium.org/1825393002/diff/80001/src/gpu/GrBuffer.h#newcode19 src/gpu/GrBuffer.h:19: * ...
4 years, 9 months ago (2016-03-24 15:55:47 UTC) #12
Chris Dalton
Jim and Greg, the vk changes are a bare minimum to keep it compiling, but ...
4 years, 9 months ago (2016-03-24 16:07:07 UTC) #13
jvanverth1
On 2016/03/24 16:07:07, Chris Dalton wrote: > Jim and Greg, the vk changes are a ...
4 years, 9 months ago (2016-03-24 16:31:32 UTC) #14
jvanverth1
On 2016/03/24 16:31:32, jvanverth1 wrote: > On 2016/03/24 16:07:07, Chris Dalton wrote: > > Jim ...
4 years, 9 months ago (2016-03-24 16:47:16 UTC) #15
jvanverth1
On 2016/03/24 16:47:16, jvanverth1 wrote: > On 2016/03/24 16:31:32, jvanverth1 wrote: > > On 2016/03/24 ...
4 years, 9 months ago (2016-03-24 16:49:32 UTC) #16
jvanverth1
https://codereview.chromium.org/1825393002/diff/100001/src/gpu/GrResourceProvider.cpp File src/gpu/GrResourceProvider.cpp (right): https://codereview.chromium.org/1825393002/diff/100001/src/gpu/GrResourceProvider.cpp#newcode40 src/gpu/GrResourceProvider.cpp:40: uint16_t* data = (uint16_t*) buffer->map(); I'm not sure how ...
4 years, 9 months ago (2016-03-24 16:55:19 UTC) #17
jvanverth1
A couple of other things. First, on the Vulkan side we are not storing UniformBuffers ...
4 years, 9 months ago (2016-03-24 17:05:43 UTC) #18
jvanverth1
On 2016/03/24 17:05:43, jvanverth1 wrote: > A couple of other things. First, on the Vulkan ...
4 years, 9 months ago (2016-03-24 17:06:38 UTC) #19
Chris Dalton
On 2016/03/24 17:06:38, jvanverth1 wrote: > On 2016/03/24 17:05:43, jvanverth1 wrote: > > A couple ...
4 years, 9 months ago (2016-03-24 17:09:13 UTC) #20
jvanverth1
On 2016/03/24 17:09:13, Chris Dalton wrote: > On 2016/03/24 17:06:38, jvanverth1 wrote: > > On ...
4 years, 9 months ago (2016-03-24 17:23:17 UTC) #21
bsalomon
On 2016/03/24 17:23:17, jvanverth1 wrote: > On 2016/03/24 17:09:13, Chris Dalton wrote: > > On ...
4 years, 9 months ago (2016-03-24 17:28:45 UTC) #22
Chris Dalton
Ok, this is a much simpler stab at the vulkan part. In the future we ...
4 years, 9 months ago (2016-03-24 18:14:11 UTC) #23
jvanverth1
lgtm A few casts you might need to add (I hit warnings on my build): ...
4 years, 9 months ago (2016-03-24 19:21:01 UTC) #24
Chris Dalton
https://codereview.chromium.org/1825393002/diff/120001/src/gpu/GrBuffer.h File src/gpu/GrBuffer.h (right): https://codereview.chromium.org/1825393002/diff/120001/src/gpu/GrBuffer.h#newcode27 src/gpu/GrBuffer.h:27: builder[1] = size; On 2016/03/24 19:21:01, jvanverth1 wrote: > ...
4 years, 9 months ago (2016-03-24 21:12:06 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/140001
4 years, 9 months ago (2016-03-24 21:52:53 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot/builds/7378)
4 years, 9 months ago (2016-03-24 21:54:24 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/160001
4 years, 9 months ago (2016-03-25 08:31:11 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac-Clang-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-x86_64-Release-Trybot/builds/1476)
4 years, 9 months ago (2016-03-25 08:33:01 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/180001
4 years, 9 months ago (2016-03-25 08:37:50 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-25 08:49:01 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/180001
4 years, 9 months ago (2016-03-25 08:53:30 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f
4 years, 9 months ago (2016-03-25 08:55:01 UTC) #43
robertphillips
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/1831133004/ by robertphillips@google.com. ...
4 years, 9 months ago (2016-03-25 11:55:26 UTC) #44
robertphillips
In case the bits rot, the Android One, Galaxy S3, Nexus 10, Nexus 5, Nexus ...
4 years, 9 months ago (2016-03-25 13:24:17 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/200001
4 years, 9 months ago (2016-03-25 16:14:43 UTC) #48
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-25 16:29:34 UTC) #50
Chris Dalton
Qualcomm, ARM, and Imagination are green now. This was just a hyperactive assert. I see ...
4 years, 9 months ago (2016-03-25 18:42:41 UTC) #51
jvanverth1
On 2016/03/25 18:42:41, Chris Dalton wrote: > Qualcomm, ARM, and Imagination are green now. This ...
4 years, 9 months ago (2016-03-25 18:54:10 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1825393002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1825393002/200001
4 years, 9 months ago (2016-03-25 19:13:42 UTC) #55
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 19:15:08 UTC) #57
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://skia.googlesource.com/skia/+/397536cabe12a9936659870dd220c869789424ba

Powered by Google App Engine
This is Rietveld 408576698