From: Jordan Justen Date: Wed, 2 Mar 2016 09:09:16 +0000 (-0800) Subject: anv: Save batch to local variable for indirect compute X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da4745104cc02fc0052a2e05e37c69a4dce76eef;p=mesa.git anv: Save batch to local variable for indirect compute Signed-off-by: Jordan Justen --- 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