summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_cmd_buffer.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-03-02 01:09:16 -0800
committerJason Ekstrand <[email protected]>2016-03-02 12:03:05 -0800
commitda4745104cc02fc0052a2e05e37c69a4dce76eef (patch)
tree5d70e8cca07d7bf47712b5a654919d1aee521a88 /src/intel/vulkan/genX_cmd_buffer.c
parentb0867ca4b26aa6b3e30af8d6050b94d283636cbc (diff)
anv: Save batch to local variable for indirect compute
Signed-off-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index c00c6d0decc..dbb72b44ee2 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -507,6 +507,7 @@ void genX(CmdDispatchIndirect)(
struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data;
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
+ struct anv_batch *batch = &cmd_buffer->batch;
if (prog_data->uses_num_work_groups) {
cmd_buffer->state.num_workgroups_offset = bo_offset;
@@ -515,11 +516,11 @@ void genX(CmdDispatchIndirect)(
genX(cmd_buffer_flush_compute_state)(cmd_buffer);
- emit_lrm(&cmd_buffer->batch, GPGPU_DISPATCHDIMX, bo, bo_offset);
- emit_lrm(&cmd_buffer->batch, GPGPU_DISPATCHDIMY, bo, bo_offset + 4);
- emit_lrm(&cmd_buffer->batch, GPGPU_DISPATCHDIMZ, bo, bo_offset + 8);
+ emit_lrm(batch, GPGPU_DISPATCHDIMX, bo, bo_offset);
+ emit_lrm(batch, GPGPU_DISPATCHDIMY, bo, bo_offset + 4);
+ emit_lrm(batch, GPGPU_DISPATCHDIMZ, bo, bo_offset + 8);
- anv_batch_emit(&cmd_buffer->batch, GENX(GPGPU_WALKER),
+ anv_batch_emit(batch, GENX(GPGPU_WALKER),
.IndirectParameterEnable = true,
.SIMDSize = prog_data->simd_size / 16,
.ThreadDepthCounterMaximum = 0,
@@ -528,7 +529,7 @@ void genX(CmdDispatchIndirect)(
.RightExecutionMask = pipeline->cs_right_mask,
.BottomExecutionMask = 0xffffffff);
- anv_batch_emit(&cmd_buffer->batch, GENX(MEDIA_STATE_FLUSH));
+ anv_batch_emit(batch, GENX(MEDIA_STATE_FLUSH));
}
void