diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_program.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/ir2.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c index 84b54cf56b7..cba87f01afc 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_program.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.c @@ -102,7 +102,7 @@ fd2_fp_state_create(struct pipe_context *pctx, (nir_lower_io_options)0); } else { assert(cso->type == PIPE_SHADER_IR_TGSI); - so->nir = ir2_tgsi_to_nir(cso->tokens); + so->nir = ir2_tgsi_to_nir(cso->tokens, pctx->screen); } if (ir2_optimize_nir(so->nir, true)) @@ -142,7 +142,7 @@ fd2_vp_state_create(struct pipe_context *pctx, (nir_lower_io_options)0); } else { assert(cso->type == PIPE_SHADER_IR_TGSI); - so->nir = ir2_tgsi_to_nir(cso->tokens); + so->nir = ir2_tgsi_to_nir(cso->tokens, pctx->screen); } if (ir2_optimize_nir(so->nir, true)) diff --git a/src/gallium/drivers/freedreno/a2xx/ir2.h b/src/gallium/drivers/freedreno/a2xx/ir2.h index f381fdfff16..706dc943a73 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir2.h +++ b/src/gallium/drivers/freedreno/a2xx/ir2.h @@ -28,6 +28,7 @@ #define IR2_H_ #include "compiler/nir/nir.h" +#include "pipe/p_context.h" struct ir2_fetch_info { /* dword offset of the fetch instruction */ @@ -85,7 +86,8 @@ struct tgsi_token; void ir2_compile(struct fd2_shader_stateobj *so, unsigned variant, struct fd2_shader_stateobj *fp); -struct nir_shader *ir2_tgsi_to_nir(const struct tgsi_token *tokens); +struct nir_shader *ir2_tgsi_to_nir(const struct tgsi_token *tokens, + struct pipe_screen *screen); const nir_shader_compiler_options *ir2_get_compiler_options(void); diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c index 5d92f86befc..ee27b8835a2 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c +++ b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c @@ -43,8 +43,11 @@ static const nir_shader_compiler_options options = { }; struct nir_shader * -ir2_tgsi_to_nir(const struct tgsi_token *tokens) +ir2_tgsi_to_nir(const struct tgsi_token *tokens, + struct pipe_screen *screen) { + /* TODO: pass screen to tgsi_to_nir when it needs that. */ + (void) screen; return tgsi_to_nir(tokens, &options); } |