Re: [Mesa-dev] [PATCH] i965: Don't try to fall back when creating unrecognized program targets.
On 23 August 2013 14:55, Kenneth Graunke wrote: > On 08/23/2013 11:50 AM, Paul Berry wrote: > >> If brwNewProgram is asked to create a program for an unrecognized >> target, don't bother falling back on _mesa_new_program(). That just >> hides bugs. >> --- >> src/mesa/drivers/dri/i965/brw_**program.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/dri/i965/**brw_program.c >> b/src/mesa/drivers/dri/i965/**brw_program.c >> index c40d506..b683681 100644 >> --- a/src/mesa/drivers/dri/i965/**brw_program.c >> +++ b/src/mesa/drivers/dri/i965/**brw_program.c >> @@ -114,7 +114,8 @@ static struct gl_program *brwNewProgram( struct >> gl_context *ctx, >> } >> >> default: >> - return _mesa_new_program(ctx, target, id); >> + _mesa_problem(ctx, "Unsupported target %d in brwNewProgram()\n", >> target); >> + return NULL; >> } >> } >> > > Why not do: > > assert(!"Unsupported target in brwNewProgram()"); > return NULL; > > I'd really like it to abort... > > Still, this is better than the old crap, so, > Reviewed-by: Kenneth Graunke > > Yeah, you're right. Asserting is better. Thanks! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965: Don't try to fall back when creating unrecognized program targets.
On 08/23/2013 11:50 AM, Paul Berry wrote: If brwNewProgram is asked to create a program for an unrecognized target, don't bother falling back on _mesa_new_program(). That just hides bugs. --- src/mesa/drivers/dri/i965/brw_program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Me too! Reviewed-by: Chad Versace ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965: Don't try to fall back when creating unrecognized program targets.
On 08/23/2013 11:50 AM, Paul Berry wrote: If brwNewProgram is asked to create a program for an unrecognized target, don't bother falling back on _mesa_new_program(). That just hides bugs. --- src/mesa/drivers/dri/i965/brw_program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index c40d506..b683681 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -114,7 +114,8 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx, } default: - return _mesa_new_program(ctx, target, id); + _mesa_problem(ctx, "Unsupported target %d in brwNewProgram()\n", target); + return NULL; } } Why not do: assert(!"Unsupported target in brwNewProgram()"); return NULL; I'd really like it to abort... Still, this is better than the old crap, so, Reviewed-by: Kenneth Graunke ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965: Don't try to fall back when creating unrecognized program targets.
On Fri, Aug 23, 2013 at 11:50 AM, Paul Berry wrote: > If brwNewProgram is asked to create a program for an unrecognized > target, don't bother falling back on _mesa_new_program(). That just > hides bugs. > --- > src/mesa/drivers/dri/i965/brw_program.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_program.c > b/src/mesa/drivers/dri/i965/brw_program.c > index c40d506..b683681 100644 > --- a/src/mesa/drivers/dri/i965/brw_program.c > +++ b/src/mesa/drivers/dri/i965/brw_program.c > @@ -114,7 +114,8 @@ static struct gl_program *brwNewProgram( struct > gl_context *ctx, > } > > default: > - return _mesa_new_program(ctx, target, id); > + _mesa_problem(ctx, "Unsupported target %d in brwNewProgram()\n", > target); > + return NULL; > } > } > > -- > 1.8.3.4 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965: Don't try to fall back when creating unrecognized program targets.
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev