mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-25 02:50:29 +01:00
ir3: do not double threadsize when exceeding branchstack limit
We can't support more than compiler->branchstack_size diverging threads in a wave. Thus, doubling the threadsize is only possible if we don't exceed the branchstack size limit. As of blob version 512.490.0 - it doesn't have this heuristics. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9859>
This commit is contained in:
parent
c073648d80
commit
e7eed45869
1 changed files with 10 additions and 0 deletions
|
|
@ -112,6 +112,16 @@ should_double_threadsize(struct ir3_shader_variant *v,
|
|||
unsigned regs_count)
|
||||
{
|
||||
const struct ir3_compiler *compiler = v->shader->compiler;
|
||||
|
||||
/* We can't support more than compiler->branchstack_size diverging threads
|
||||
* in a wave. Thus, doubling the threadsize is only possible if we don't
|
||||
* exceed the branchstack size limit.
|
||||
*/
|
||||
if (MIN2(v->branchstack, compiler->threadsize_base * 2) >
|
||||
compiler->branchstack_size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (v->type) {
|
||||
case MESA_SHADER_COMPUTE: {
|
||||
unsigned threads_per_wg = v->local_size[0] * v->local_size[1] * v->local_size[2];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue