mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 19:08:03 +03:00
hasvk: Skip zero-sized compute dispatches on gen7.
GPGPU_WALKER has no encoding for a zero group count, so passing one
through walks the full dimension and the command never retires, hanging
rcs0 (GPU HANG ecode 7:1:8ff8ffff, EIR and PGTBL_ER both clear). A zero
dispatch is legal and defined as a no-op, so drop it at record time.
through walks the full dimension and the command never retires, hanging
rcs0 (GPU HANG ecode 7:1:8ff8ffff, EIR and PGTBL_ER both clear). A zero
dispatch is legal and defined as a no-op, so drop it at record time.
Gen9+ uses COMPUTE_WALKER and handles this in hardware, which is why
upstream anv carries no equivalent guard.
Fixes dEQP-VK.compute.pipeline.basic.empty_workgroup_{all,x,y,z} and
empty_shader, which previously aborted the run and could take the whole
machine down. compute.pipeline.* now 20285 cases, 0 fail.
This commit is contained in:
1 file changed
+12
@@ -4811,6 +4811,18 @@ void genX(CmdDispatchBase)(
|
|||||||
if (cmd_buffer->state.conditional_render_enabled)
|
if (cmd_buffer->state.conditional_render_enabled)
|
||||||
genX(cmd_emit_conditional_render_predicate)(cmd_buffer);
|
genX(cmd_emit_conditional_render_predicate)(cmd_buffer);
|
||||||
|
|
||||||
|
/* A dispatch with a zero group count is legal and defined to do nothing.
|
||||||
|
* GPGPU_WALKER has no encoding for "no groups at all" though, so passing
|
||||||
|
* zero through walks the full dimension and the command never retires:
|
||||||
|
* dEQP-VK.compute.pipeline.basic.empty_workgroup_* hangs rcs0 every time
|
||||||
|
* (GPU HANG ecode 7:1:8ff8ffff). Gen9+ uses COMPUTE_WALKER and handles
|
||||||
|
* this in hardware, which is why upstream anv carries no such guard.
|
||||||
|
*/
|
||||||
|
if (groupCountX == 0 || groupCountY == 0 || groupCountZ == 0) {
|
||||||
|
trace_intel_end_compute(&cmd_buffer->trace, 0, 0, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
emit_cs_walker(cmd_buffer, pipeline, false, prog_data, groupCountX,
|
emit_cs_walker(cmd_buffer, pipeline, false, prog_data, groupCountX,
|
||||||
groupCountY, groupCountZ);
|
groupCountY, groupCountZ);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user