diff options
author | Timothy Arceri <[email protected]> | 2017-11-16 11:16:10 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-21 15:57:39 +1100 |
commit | 04a9558497eabe6369b01ef45d1e25015e9286ba (patch) | |
tree | 89a9f72d81e60768b968754a537fca0dfacca9ab /src/mesa/state_tracker | |
parent | b5957cee920cd7a62e4e726538dbbe44c12e33ab (diff) |
st/glsl_to_nir: don't generate nir twice for gs
This was left out of c980a3aa3133
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 97b2e1234b1..5c0a58104fc 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1431,15 +1431,9 @@ st_translate_geometry_program(struct st_context *st, { struct ureg_program *ureg; - if (stgp->shader_program) { - nir_shader *nir = st_glsl_to_nir(st, &stgp->Base, stgp->shader_program, - MESA_SHADER_GEOMETRY); - - stgp->tgsi.type = PIPE_SHADER_IR_NIR; - stgp->tgsi.ir.nir = nir; - + /* We have already compiled to NIR so just return */ + if (stgp->shader_program) return true; - } ureg = ureg_create_with_screen(PIPE_SHADER_GEOMETRY, st->pipe->screen); if (ureg == NULL) |