mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
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:
parent
2000ea7e27
commit
da0cdc84d5
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue