<div dir="ltr">On 23 August 2013 14:55, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 08/23/2013 11:50 AM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If brwNewProgram is asked to create a program for an unrecognized<br>
target, don't bother falling back on _mesa_new_program(). That just<br>
hides bugs.<br>
---<br>
src/mesa/drivers/dri/i965/brw_<u></u>program.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<u></u>brw_program.c b/src/mesa/drivers/dri/i965/<u></u>brw_program.c<br>
index c40d506..b683681 100644<br>
--- a/src/mesa/drivers/dri/i965/<u></u>brw_program.c<br>
+++ b/src/mesa/drivers/dri/i965/<u></u>brw_program.c<br>
@@ -114,7 +114,8 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,<br>
}<br>
<br>
default:<br>
- return _mesa_new_program(ctx, target, id);<br>
+ _mesa_problem(ctx, "Unsupported target %d in brwNewProgram()\n", target);<br>
+ return NULL;<br>
}<br>
}<br>
</blockquote>
<br></div></div>
Why not do:<br>
<br>
assert(!"Unsupported target in brwNewProgram()");<br>
return NULL;<br>
<br>
I'd really like it to abort...<br>
<br>
Still, this is better than the old crap, so,<br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>><br>
<br>
</blockquote></div><br></div><div class="gmail_extra">Yeah, you're right. Asserting is better. Thanks!<br></div></div>