On Fri, 26 Aug 2011 21:58:12 -0500, Bryan Cain <bryanca...@gmail.com> wrote:
> This fixes all of the piglit regressions in softpipe when native integers are
> enabled.
> ---
>  src/mesa/main/uniforms.c                   |    8 +----
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp |   45 
> ++++++++++++++++++++++++++--
>  2 files changed, 43 insertions(+), 10 deletions(-)
> 
> diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
> index cda840f..0801476 100644
> --- a/src/mesa/main/uniforms.c
> +++ b/src/mesa/main/uniforms.c
> @@ -776,13 +776,7 @@ set_program_uniform(struct gl_context *ctx, struct 
> gl_program *program,
>           /* if the uniform is bool-valued, convert to 1 or 0 */
>           if (isUniformBool) {
>              for (i = 0; i < elems; i++) {
> -               if (basicType == GL_FLOAT)
> -                  uniformVal[i].b = uniformVal[i].f != 0.0f ? 1 : 0;
> -               else
> -                  uniformVal[i].b = uniformVal[i].u ? 1 : 0;
> -               
> -               if (!ctx->Const.NativeIntegers)
> -                  uniformVal[i].f = uniformVal[i].b ? 1.0f : 0.0f;
> +               uniformVal[i].f = uniformVal[i].f != 0.0f ? 1.0f : 0.0f;
>              }
>           }
>        }

I think booleans should be integer 1 as uniforms.  Otherwise I'll need a
RealNativeIntegers flag to get that behavior.

Attachment: pgpeZ8a983JIx.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to