In the patch below, I'd suggest replacing the exit() with something less
drastic. Maybe propogate up a GL error, or issue a warning.
-Brian
Markus Amsler wrote:
> Fixes Bug 15447
> ---
> src/mesa/drivers/dri/r300/r300_vertprog.c | 30
> +++++++++++++++-------------
> 1 files changed, 16 insertions(+), 14 deletions(-)
>
>
> ------------------------------------------------------------------------
>
> diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c
> b/src/mesa/drivers/dri/r300/r300_vertprog.c
> index e91d968..dfb748b 100644
> --- a/src/mesa/drivers/dri/r300/r300_vertprog.c
> +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
> @@ -1428,20 +1428,6 @@ void r300SelectVertexShader(r300ContextPtr r300)
> vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current;
> InputsRead = ctx->FragmentProgram._Current->Base.InputsRead;
>
> - wpos_idx = -1;
> - if (InputsRead & FRAG_BIT_WPOS) {
> - for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
> - if (!(InputsRead & (FRAG_BIT_TEX0 << i)))
> - break;
> -
> - if (i == ctx->Const.MaxTextureUnits) {
> - fprintf(stderr, "\tno free texcoord found\n");
> - _mesa_exit(-1);
> - }
> -
> - InputsRead |= (FRAG_BIT_TEX0 << i);
> - wpos_idx = i;
> - }
> wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
> wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
>
> @@ -1461,6 +1447,22 @@ void r300SelectVertexShader(r300ContextPtr r300)
> }
> }
>
> + wpos_idx = -1;
> + if (InputsRead & FRAG_BIT_WPOS) {
> + for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
> + if (!(InputsRead & (FRAG_BIT_TEX0 << i)))
> + break;
> +
> + if (i == ctx->Const.MaxTextureUnits) {
> + fprintf(stderr, "\tno free texcoord found\n");
> + _mesa_exit(-1);
> + }
> +
> + InputsRead |= (FRAG_BIT_TEX0 << i);
> + wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
> + wpos_idx = i;
> + }
> +
> if (vpc->mesa_program.IsPositionInvariant) {
> /* we wan't position don't we ? */
> wanted_key.InputsRead |= (1 << VERT_ATTRIB_POS);
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mesa3d-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev