mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
rusticl/kernel: properly respect device thread limits per dimension
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
(cherry picked from commit b3e925a21b)
This commit is contained in:
parent
652387c9fb
commit
5df25b68ea
2 changed files with 2 additions and 2 deletions
|
|
@ -924,7 +924,7 @@
|
|||
"description": "rusticl/kernel: properly respect device thread limits per dimension",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -898,7 +898,7 @@ impl Kernel {
|
|||
let total_threads = block.iter().take(work_dim).product::<usize>();
|
||||
if threads != 1 && total_threads < subgroups {
|
||||
for i in 0..work_dim {
|
||||
if grid[i] * total_threads < threads {
|
||||
if grid[i] * total_threads < threads && grid[i] * block[i] <= dim_threads[i] {
|
||||
block[i] *= grid[i];
|
||||
grid[i] = 1;
|
||||
// can only do it once as nothing is cleanly divisible
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue