diff options
author | Nicolai Hähnle <[email protected]> | 2017-09-21 16:50:08 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-09-29 11:43:09 +0200 |
commit | 7dfa891f32316b17ae6f21dceb1b00845d34524a (patch) | |
tree | 9bc6db4bcd4ac031c6a3f849454b0cd4f48eb7c8 /src/gallium/drivers | |
parent | a6ea4c1b9354ff5505ec637b080a7d6b63519bf1 (diff) |
radeonsi/gfx9: fix geometry shaders without output vertices
Not that those are super common or useful, but hey! Fun corner cases
of the API...
Fixes dEQP-GLES31.functional.geometry_shading.emit.*
Cc: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 788631c9863..889cd8e7246 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -644,9 +644,11 @@ static void gfx9_get_gs_info(struct si_shader_selector *es, /* MAX_PRIMS_PER_SUBGROUP = gs_prims * max_vert_out * gs_invocations. * Make sure we don't go over the maximum value. */ - max_gs_prims = MIN2(max_gs_prims, - max_out_prims / - (gs->gs_max_out_vertices * gs_num_invocations)); + if (gs->gs_max_out_vertices > 0) { + max_gs_prims = MIN2(max_gs_prims, + max_out_prims / + (gs->gs_max_out_vertices * gs_num_invocations)); + } assert(max_gs_prims > 0); /* If the primitive has adjacency, halve the number of vertices |