mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
iris/compute: Support indirect compute dispatch
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
b35c8f2182
commit
942bdb2906
1 changed files with 21 additions and 0 deletions
|
|
@ -4413,7 +4413,28 @@ iris_upload_compute_state(struct iris_context *ice,
|
|||
else
|
||||
right_mask = ~0u >> (32 - cs_prog_data->simd_size);
|
||||
|
||||
#define GPGPU_DISPATCHDIMX 0x2500
|
||||
#define GPGPU_DISPATCHDIMY 0x2504
|
||||
#define GPGPU_DISPATCHDIMZ 0x2508
|
||||
|
||||
if (grid->indirect) {
|
||||
struct iris_bo *bo = iris_resource_bo(grid_size_res);
|
||||
iris_emit_cmd(batch, GENX(MI_LOAD_REGISTER_MEM), lrm) {
|
||||
lrm.RegisterAddress = GPGPU_DISPATCHDIMX;
|
||||
lrm.MemoryAddress = ro_bo(bo, grid_size_offset + 0);
|
||||
}
|
||||
iris_emit_cmd(batch, GENX(MI_LOAD_REGISTER_MEM), lrm) {
|
||||
lrm.RegisterAddress = GPGPU_DISPATCHDIMY;
|
||||
lrm.MemoryAddress = ro_bo(bo, grid_size_offset + 4);
|
||||
}
|
||||
iris_emit_cmd(batch, GENX(MI_LOAD_REGISTER_MEM), lrm) {
|
||||
lrm.RegisterAddress = GPGPU_DISPATCHDIMZ;
|
||||
lrm.MemoryAddress = ro_bo(bo, grid_size_offset + 8);
|
||||
}
|
||||
}
|
||||
|
||||
iris_emit_cmd(batch, GENX(GPGPU_WALKER), ggw) {
|
||||
ggw.IndirectParameterEnable = grid->indirect != NULL;
|
||||
ggw.SIMDSize = cs_prog_data->simd_size / 16;
|
||||
ggw.ThreadDepthCounterMaximum = 0;
|
||||
ggw.ThreadHeightCounterMaximum = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue