[Mesa-dev] [PATCH] mesa, glsl_to_tgsi: fixes for native integers
Bryan Cain
bryancain3 at gmail.com
Sun Aug 28 13:40:35 PDT 2011
On 08/26/2011 09:58 PM, Bryan Cain 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'd like to push this to master (with one typo fix in the glsl_to_tgsi
part of the patch) since no more objections have been raised, but could
someone verify that this core Mesa change is okay?
Bryan
More information about the mesa-dev
mailing list