intel/common: Consider 0 threads while setting TG

In ray tracing dispatch, we have dispatch.threads set to 0 since we
calculate the local_size_x/y/z based on the launch sizes.

This change takes 0 threads into an account and returh the TG size 8 in
such scenarios. Before this change, we were setting TG size to 2.

Fixes: 0c4e1c9efc ("intel/common: Add helper for compute thread group dispatch size")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38229>
(cherry picked from commit 16f66ffe55)
This commit is contained in:
Sagar Ghuge 2025-11-03 15:07:43 -08:00 committed by Eric Engestrom
parent c67dba9f9f
commit ffbf10eb44
2 changed files with 2 additions and 2 deletions

View file

@ -574,7 +574,7 @@
"description": "intel/common: Consider 0 threads while setting TG",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0c4e1c9efcf4c1730e73d6aade2232d596ad8dcf",
"notes": null

View file

@ -227,7 +227,7 @@ intel_compute_threads_group_dispatch_size(uint32_t hw_threads_in_wg)
* compute overdispatch disabled set to 1, then we need to use TG Size 1.
*/
switch (hw_threads_in_wg) {
case 1 ... 16:
case 0 ... 16:
return 0;
case 17 ... 32:
return 1;