mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 23:20:14 +01:00
broadcom/compiler: fix workaround for GFXH-1602
In this scenario drivers are adding a dummy attribute with a size of 1, so we should account for it here. Fixes missing window decorations with GTK4+. Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10853 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28414>
This commit is contained in:
parent
ad647e2c90
commit
9fad2922fb
1 changed files with 15 additions and 2 deletions
|
|
@ -2745,8 +2745,21 @@ ntq_emit_load_input(struct v3d_compile *c, nir_intrinsic_instr *instr)
|
|||
SYSTEM_VALUE_VERTEX_ID)) {
|
||||
index++;
|
||||
}
|
||||
for (int i = 0; i < offset; i++)
|
||||
index += c->vattr_sizes[i];
|
||||
|
||||
for (int i = 0; i < offset; i++) {
|
||||
/* GFXH-1602: if any builtins (vid, iid, etc) are read then
|
||||
* attribute 0 must be active (size > 0). When we hit this,
|
||||
* the driver is expected to program attribute 0 to have a
|
||||
* size of 1, so here we need to add that.
|
||||
*/
|
||||
if (i == 0 && c->vs_key->is_coord &&
|
||||
c->vattr_sizes[i] == 0 && index > 0) {
|
||||
index++;
|
||||
} else {
|
||||
index += c->vattr_sizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
index += nir_intrinsic_component(instr);
|
||||
for (int i = 0; i < instr->num_components; i++) {
|
||||
struct qreg vpm_offset = vir_uniform_ui(c, index++);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue