|
13 | 13 | #include "src/gpu/GrRenderTargetPriv.h"
|
14 | 14 | #include "src/gpu/GrStencilSettings.h"
|
15 | 15 | #include "src/gpu/d3d/GrD3DBuffer.h"
|
| 16 | +#include "src/gpu/d3d/GrD3DCommandSignature.h" |
16 | 17 | #include "src/gpu/d3d/GrD3DGpu.h"
|
17 | 18 | #include "src/gpu/d3d/GrD3DPipelineState.h"
|
18 | 19 | #include "src/gpu/d3d/GrD3DPipelineStateBuilder.h"
|
@@ -259,6 +260,26 @@ void GrD3DOpsRenderPass::onDrawIndexedInstanced(int indexCount, int baseIndex, i
|
259 | 260 | fGpu->stats()->incNumDraws();
|
260 | 261 | }
|
261 | 262 |
|
| 263 | +void GrD3DOpsRenderPass::onDrawIndirect(const GrBuffer* buffer, size_t offset, int drawCount) { |
| 264 | + constexpr unsigned int kSlot = 0; |
| 265 | + sk_sp<GrD3DCommandSignature> cmdSig = fGpu->resourceProvider().findOrCreateCommandSignature( |
| 266 | + GrD3DCommandSignature::ForIndexed::kNo, kSlot); |
| 267 | + fGpu->currentCommandList()->executeIndirect(cmdSig, drawCount, |
| 268 | + static_cast<const GrD3DBuffer*>(buffer), offset); |
| 269 | + fGpu->stats()->incNumDraws(); |
| 270 | +} |
| 271 | + |
| 272 | +void GrD3DOpsRenderPass::onDrawIndexedIndirect(const GrBuffer* buffer, size_t offset, |
| 273 | + int drawCount) { |
| 274 | + constexpr unsigned int kSlot = 0; |
| 275 | + sk_sp<GrD3DCommandSignature> cmdSig = fGpu->resourceProvider().findOrCreateCommandSignature( |
| 276 | + GrD3DCommandSignature::ForIndexed::kYes, kSlot); |
| 277 | + fGpu->currentCommandList()->executeIndirect(cmdSig, drawCount, |
| 278 | + static_cast<const GrD3DBuffer*>(buffer), offset); |
| 279 | + fGpu->stats()->incNumDraws(); |
| 280 | +} |
| 281 | + |
| 282 | + |
262 | 283 | static D3D12_RECT scissor_to_d3d_clear_rect(const GrScissorState& scissor,
|
263 | 284 | const GrSurface* surface,
|
264 | 285 | GrSurfaceOrigin origin) {
|
|
0 commit comments