st/pbo: do not use GS for NIR preferred shaders
If PBO require to use a GS, this is created with TGSI. For drivers preferring NIR shaders, they need to translate it from TGSI to NIR. But unfortunately TGSI to NIR for GS is not implemented, which makes it crash. So let's use a GS only for drivers preferring TGSI. v3: - Add comment (Iago and Alejandro) Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13409>
This commit is contained in:

committed by
Marge Bot

parent
2000ea7e27
commit
da0cdc84d5
@@ -648,7 +648,13 @@ st_init_pbo_helpers(struct st_context *st)
|
||||
if (screen->get_param(screen, PIPE_CAP_TGSI_INSTANCEID)) {
|
||||
if (screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) {
|
||||
st->pbo.layers = true;
|
||||
} else if (screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES) >= 3) {
|
||||
} else if (screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES) >= 3 &&
|
||||
screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY,
|
||||
PIPE_SHADER_CAP_PREFERRED_IR) != PIPE_SHADER_IR_NIR) {
|
||||
/* As the download GS is created in TGSI, and TGSI to NIR translation
|
||||
* is not implemented for GS, avoid using GS for drivers preferring
|
||||
* NIR shaders.
|
||||
*/
|
||||
st->pbo.layers = true;
|
||||
st->pbo.use_gs = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user