@@ -312,7 +312,6 @@ void Rasterizer::DrawIndirect(bool is_indexed, VAddr arg_address, u32 offset, u3
312
312
void Rasterizer::DispatchDirect () {
313
313
RENDERER_TRACE;
314
314
315
- const auto cmdbuf = scheduler.CommandBuffer ();
316
315
const auto & cs_program = liverpool->regs .cs_program ;
317
316
const ComputePipeline* pipeline = pipeline_cache.GetComputePipeline ();
318
317
if (!pipeline) {
@@ -324,6 +323,8 @@ void Rasterizer::DispatchDirect() {
324
323
}
325
324
326
325
scheduler.EndRendering ();
326
+
327
+ const auto cmdbuf = scheduler.CommandBuffer ();
327
328
cmdbuf.bindPipeline (vk::PipelineBindPoint::eCompute, pipeline->Handle ());
328
329
cmdbuf.dispatch (cs_program.dim_x , cs_program.dim_y , cs_program.dim_z );
329
330
@@ -333,7 +334,6 @@ void Rasterizer::DispatchDirect() {
333
334
void Rasterizer::DispatchIndirect (VAddr address, u32 offset, u32 size) {
334
335
RENDERER_TRACE;
335
336
336
- const auto cmdbuf = scheduler.CommandBuffer ();
337
337
const auto & cs_program = liverpool->regs .cs_program ;
338
338
const ComputePipeline* pipeline = pipeline_cache.GetComputePipeline ();
339
339
if (!pipeline) {
@@ -345,8 +345,11 @@ void Rasterizer::DispatchIndirect(VAddr address, u32 offset, u32 size) {
345
345
}
346
346
347
347
scheduler.EndRendering ();
348
- cmdbuf. bindPipeline (vk::PipelineBindPoint::eCompute, pipeline-> Handle ());
348
+
349
349
const auto [buffer, base] = buffer_cache.ObtainBuffer (address + offset, size, false );
350
+
351
+ const auto cmdbuf = scheduler.CommandBuffer ();
352
+ cmdbuf.bindPipeline (vk::PipelineBindPoint::eCompute, pipeline->Handle ());
350
353
cmdbuf.dispatchIndirect (buffer->Handle (), base);
351
354
352
355
ResetBindings ();
0 commit comments