mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 23:00:11 +01:00
radeonsi: fix an off-by-one error in the bounds check for max_vertices
The spec actually says that calling EmitStreamVertex is undefined when you exceed max_vertices. But we do need to avoid trampling over memory outside the GSVS ring. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
7655bccce8
commit
88509518b0
1 changed files with 1 additions and 1 deletions
|
|
@ -5281,7 +5281,7 @@ static void si_llvm_emit_vertex(
|
|||
* further memory loads and may allow LLVM to skip to the end
|
||||
* altogether.
|
||||
*/
|
||||
can_emit = LLVMBuildICmp(gallivm->builder, LLVMIntULE, gs_next_vertex,
|
||||
can_emit = LLVMBuildICmp(gallivm->builder, LLVMIntULT, gs_next_vertex,
|
||||
lp_build_const_int32(gallivm,
|
||||
shader->selector->gs_max_out_vertices), "");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue