Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit abe2375

Browse files
egdanielSkia Commit-Bot
authored andcommitted
Implement inline uploads on d3d.
Change-Id: Ia46404d9d71551a2e51a04b1197d9fe21aa65d07 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298117 Reviewed-by: Jim Van Verth <[email protected]> Commit-Queue: Greg Daniel <[email protected]>
1 parent 0f39699 commit abe2375

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/gpu/d3d/GrD3DOpsRenderPass.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "src/gpu/d3d/GrD3DOpsRenderPass.h"
99

1010
#include "src/gpu/GrContextPriv.h"
11+
#include "src/gpu/GrOpFlushState.h"
1112
#include "src/gpu/GrProgramDesc.h"
1213
#include "src/gpu/GrRenderTargetPriv.h"
1314
#include "src/gpu/GrStencilSettings.h"
@@ -305,3 +306,10 @@ void GrD3DOpsRenderPass::onClearStencilClip(const GrScissorState& scissor, bool
305306
auto d3dStencil = static_cast<GrD3DStencilAttachment*>(sb);
306307
fGpu->currentCommandList()->clearDepthStencilView(d3dStencil, stencilColor, &clearRect);
307308
}
309+
310+
void GrD3DOpsRenderPass::inlineUpload(GrOpFlushState* state, GrDeferredTextureUploadFn& upload) {
311+
// If we ever start using copy command lists for doing uploads, then we'll need to make sure
312+
// we submit our main command list before doing the copy here and then start a new main command
313+
// list.
314+
state->doUpload(upload);
315+
}

src/gpu/d3d/GrD3DOpsRenderPass.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class GrD3DOpsRenderPass : public GrOpsRenderPass {
2222

2323
~GrD3DOpsRenderPass() override;
2424

25-
void inlineUpload(GrOpFlushState* state, GrDeferredTextureUploadFn& upload) override {}
25+
void inlineUpload(GrOpFlushState* state, GrDeferredTextureUploadFn& upload) override;
2626

2727
void onExecuteDrawable(std::unique_ptr<SkDrawable::GpuDrawHandler>) override {}
2828

0 commit comments

Comments
 (0)