mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 08:50:09 +01:00
etnaviv: validate number of VS outputs against GPU limit
All user defined varyings, the position output and possibly the point size output need to fit into the GPU specific maximum number of VS outputs. Check this limitation. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31032>
This commit is contained in:
parent
21a5370f9c
commit
dcb61d3da5
1 changed files with 12 additions and 0 deletions
|
|
@ -1063,6 +1063,18 @@ etna_compile_check_limits(struct etna_shader_variant *v)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (v->stage == MESA_SHADER_VERTEX) {
|
||||
int num_outputs = v->vs_pointsize_out_reg >= 0 ? 2 : 1;
|
||||
|
||||
num_outputs += v->outfile.num_reg;
|
||||
|
||||
if (num_outputs > specs->max_vs_outputs) {
|
||||
DBG("Number of VS outputs (%zu) exceeds maximum %d",
|
||||
v->outfile.num_reg, specs->max_vs_outputs);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue