diff options
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_fs.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_fs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_fs.c b/src/gallium/auxiliary/draw/draw_fs.c index 1543bd86f17..e3bd25193dc 100644 --- a/src/gallium/auxiliary/draw/draw_fs.c +++ b/src/gallium/auxiliary/draw/draw_fs.c @@ -32,6 +32,7 @@ #include "util/u_prim.h" #include "tgsi/tgsi_parse.h" +#include "nir/nir_to_tgsi_info.h" #include "draw_fs.h" #include "draw_private.h" @@ -47,7 +48,10 @@ draw_create_fragment_shader(struct draw_context *draw, dfs = CALLOC_STRUCT(draw_fragment_shader); if (dfs) { dfs->base = *shader; - tgsi_scan_shader(shader->tokens, &dfs->info); + if (shader->type == PIPE_SHADER_IR_TGSI) + tgsi_scan_shader(shader->tokens, &dfs->info); + else + nir_tgsi_scan_shader(shader->ir.nir, &dfs->info, false); } return dfs; |