[Mesa-dev] [PATCH] st/glsl_to_nir: don't generate nir twice for gs
This was left out of c980a3aa3133 --- src/mesa/state_tracker/st_program.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 97b2e1234b..dc81a17289 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1424,29 +1424,23 @@ st_translate_program_common(struct st_context *st, /** * Translate a geometry program to create a new variant. */ bool st_translate_geometry_program(struct st_context *st, struct st_common_program *stgp) { 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 compiler 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) return false; ureg_property(ureg, TGSI_PROPERTY_GS_INPUT_PRIM, stgp->Base.info.gs.input_primitive); ureg_property(ureg, TGSI_PROPERTY_GS_OUTPUT_PRIM, stgp->Base.info.gs.output_primitive); ureg_property(ureg, TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES, -- 2.14.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/glsl_to_nir: don't generate nir twice for gs
Quoting Timothy Arceri (2017-11-15 16:16:10) > This was left out of c980a3aa3133 > --- > src/mesa/state_tracker/st_program.c | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/src/mesa/state_tracker/st_program.c > b/src/mesa/state_tracker/st_program.c > index 97b2e1234b..dc81a17289 100644 > --- a/src/mesa/state_tracker/st_program.c > +++ b/src/mesa/state_tracker/st_program.c > @@ -1424,29 +1424,23 @@ st_translate_program_common(struct st_context *st, > > /** > * Translate a geometry program to create a new variant. > */ > bool > st_translate_geometry_program(struct st_context *st, >struct st_common_program *stgp) > { > 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 compiler to NIR so just return */ compiled > + if (stgp->shader_program) >return true; > - } > > ureg = ureg_create_with_screen(PIPE_SHADER_GEOMETRY, st->pipe->screen); > if (ureg == NULL) >return false; > > ureg_property(ureg, TGSI_PROPERTY_GS_INPUT_PRIM, > stgp->Base.info.gs.input_primitive); > ureg_property(ureg, TGSI_PROPERTY_GS_OUTPUT_PRIM, > stgp->Base.info.gs.output_primitive); > ureg_property(ureg, TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES, > -- > 2.14.3 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/glsl_to_nir: don't generate nir twice for gs
With the typo fixed: Reviewed-by: Marek Olšák Marek On Thu, Nov 16, 2017 at 1:16 AM, Timothy Arceri wrote: > This was left out of c980a3aa3133 > --- > src/mesa/state_tracker/st_program.c | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/src/mesa/state_tracker/st_program.c > b/src/mesa/state_tracker/st_program.c > index 97b2e1234b..dc81a17289 100644 > --- a/src/mesa/state_tracker/st_program.c > +++ b/src/mesa/state_tracker/st_program.c > @@ -1424,29 +1424,23 @@ st_translate_program_common(struct st_context *st, > > /** > * Translate a geometry program to create a new variant. > */ > bool > st_translate_geometry_program(struct st_context *st, >struct st_common_program *stgp) > { > 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 compiler 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) >return false; > > ureg_property(ureg, TGSI_PROPERTY_GS_INPUT_PRIM, > stgp->Base.info.gs.input_primitive); > ureg_property(ureg, TGSI_PROPERTY_GS_OUTPUT_PRIM, > stgp->Base.info.gs.output_primitive); > ureg_property(ureg, TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES, > -- > 2.14.3 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev