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

Issue 2143333002: Add resource provider flag to avoid client-side buffers (Closed)

Created:
4 years, 5 months ago by csmartdalton
Modified:
4 years, 5 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

Add resource provider flag to avoid client-side buffers On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Committed: https://skia.googlesource.com/skia/+/485a12003ab48b54965d6f7172f3183358919d8e

Patch Set 1 #

Patch Set 2 : Add resource provider flag to avoid client-side buffers #

Total comments: 4

Patch Set 3 : Add resource provider flag to avoid client-side buffers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -161 lines) Patch
M gyp/gpu.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M include/gpu/GrBuffer.h View 1 2 2 chunks +30 lines, -37 lines 0 comments Download
M include/gpu/GrCaps.h View 2 chunks +2 lines, -0 lines 0 comments Download
A src/gpu/GrBuffer.cpp View 1 chunk +72 lines, -0 lines 0 comments Download
M src/gpu/GrCaps.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/GrGpu.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrResourceProvider.h View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M src/gpu/GrResourceProvider.cpp View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLBuffer.h View 3 chunks +1 line, -5 lines 0 comments Download
M src/gpu/gl/GrGLBuffer.cpp View 10 chunks +33 lines, -71 lines 0 comments Download
M src/gpu/gl/GrGLCaps.cpp View 4 chunks +12 lines, -15 lines 0 comments Download
M src/gpu/gl/GrGLGpu.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 5 chunks +12 lines, -10 lines 0 comments Download
M src/gpu/gl/GrGLVertexArray.h View 3 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/gl/GrGLVertexArray.cpp View 2 chunks +9 lines, -3 lines 0 comments Download
M src/gpu/instanced/GLInstancedRendering.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/instanced/GLInstancedRendering.cpp View 1 2 2 chunks +9 lines, -6 lines 0 comments Download
M src/gpu/instanced/InstancedRendering.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/vk/GrVkGpuCommandBuffer.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/vk/GrVkIndexBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/vk/GrVkTransferBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/vk/GrVkVertexBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
csmartdalton
Adding Greg for any Vulkan concerns
4 years, 5 months ago (2016-07-13 04:33:28 UTC) #3
egdaniel
adding Jim as he is more connected with the buffer world in Vulkan
4 years, 5 months ago (2016-07-13 12:46:03 UTC) #5
bsalomon
https://codereview.chromium.org/2143333002/diff/20001/src/gpu/GrResourceProvider.h File src/gpu/GrResourceProvider.h (right): https://codereview.chromium.org/2143333002/diff/20001/src/gpu/GrResourceProvider.h#newcode108 src/gpu/GrResourceProvider.h:108: kRequireVBO_Flag = 0x2, Can we give this a less ...
4 years, 5 months ago (2016-07-13 14:34:17 UTC) #6
jvanverth1
LGTM + nit https://codereview.chromium.org/2143333002/diff/20001/include/gpu/GrBuffer.h File include/gpu/GrBuffer.h (right): https://codereview.chromium.org/2143333002/diff/20001/include/gpu/GrBuffer.h#newcode36 include/gpu/GrBuffer.h:36: bool isCPUBacked() const { return fCPUData; ...
4 years, 5 months ago (2016-07-13 14:59:42 UTC) #7
csmartdalton
https://codereview.chromium.org/2143333002/diff/20001/include/gpu/GrBuffer.h File include/gpu/GrBuffer.h (right): https://codereview.chromium.org/2143333002/diff/20001/include/gpu/GrBuffer.h#newcode36 include/gpu/GrBuffer.h:36: bool isCPUBacked() const { return fCPUData; } On 2016/07/13 ...
4 years, 5 months ago (2016-07-13 16:39:03 UTC) #8
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/2143333002/40001
4 years, 5 months ago (2016-07-13 16:39:15 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/485a12003ab48b54965d6f7172f3183358919d8e
4 years, 5 months ago (2016-07-13 17:16:36 UTC) #13
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 17:16:38 UTC) #14
Message was sent while issue was closed.
CQ bit was unchecked.

Powered by Google App Engine
This is Rietveld 408576698