mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 08:08:06 +02:00
nvc0: catch too high GENERIC indices to prevent GRAPH traps
This commit is contained in:
parent
b9c8a98e21
commit
18f3f7b958
1 changed files with 6 additions and 0 deletions
|
|
@ -43,8 +43,14 @@ nvc0_mesa_varying_hack(struct nv50_ir_varying *var)
|
|||
for (c = 0; c < 4; ++c)
|
||||
var->slot[c] = (0x2e0 + c * 0x4) / 4;
|
||||
else
|
||||
if (var->si <= 39)
|
||||
for (c = 0; c < 4; ++c) /* move down user varyings (first has index 8) */
|
||||
var->slot[c] -= 0x80 / 4;
|
||||
else {
|
||||
NOUVEAU_ERR("too many varyings / invalid location: %u !\n", var->si);
|
||||
for (c = 0; c < 4; ++c)
|
||||
var->slot[c] = (0x270 + c * 0x4) / 4; /* catch invalid indices */
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue