diff options
author | Timothy Arceri <[email protected]> | 2017-11-01 16:20:36 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-03 08:32:35 +1100 |
commit | 4837ad483254a3b47cca524c7c6f3cc7071565f1 (patch) | |
tree | 954217ba52f54d7e700acd0b0efd2f0709eadb65 /src/mesa/state_tracker/st_program.c | |
parent | 806721429afa090380bf39a4958fe4e21c63816c (diff) |
st/glsl_to_nir: pass gl_shader_program to st_finalize_nir()
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 335d45ba282..25a849bb183 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -562,7 +562,8 @@ st_create_vp_variant(struct st_context *st, vpv->num_inputs++; } - st_finalize_nir(st, &stvp->Base, vpv->tgsi.ir.nir); + st_finalize_nir(st, &stvp->Base, stvp->shader_program, + vpv->tgsi.ir.nir); vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); /* driver takes ownership of IR: */ @@ -1088,7 +1089,7 @@ st_create_fp_variant(struct st_context *st, NIR_PASS_V(tgsi.ir.nir, nir_lower_tex, &options); } - st_finalize_nir(st, &stfp->Base, tgsi.ir.nir); + st_finalize_nir(st, &stfp->Base, stfp->shader_program, tgsi.ir.nir); if (unlikely(key->external.lower_nv12 || key->external.lower_iyuv)) { /* This pass needs to happen *after* nir_lower_sampler */ @@ -1638,7 +1639,8 @@ st_get_basic_variant(struct st_context *st, if (prog->tgsi.type == PIPE_SHADER_IR_NIR) { tgsi.type = PIPE_SHADER_IR_NIR; tgsi.ir.nir = nir_shader_clone(NULL, prog->tgsi.ir.nir); - st_finalize_nir(st, &prog->Base, tgsi.ir.nir); + st_finalize_nir(st, &prog->Base, prog->shader_program, + tgsi.ir.nir); } else tgsi = prog->tgsi; /* fill in new variant */ @@ -1772,7 +1774,7 @@ st_translate_compute_program(struct st_context *st, MESA_SHADER_COMPUTE); /* no compute variants: */ - st_finalize_nir(st, &stcp->Base, nir); + st_finalize_nir(st, &stcp->Base, stcp->shader_program, nir); stcp->tgsi.ir_type = PIPE_SHADER_IR_NIR; stcp->tgsi.prog = nir; |