[Piglit] [PATCH 03/37] glean/tfragprog1: port ADD tests to shader_runner

Pohjolainen, Topi topi.pohjolainen at intel.com
Thu May 19 19:36:08 UTC 2016


On Fri, May 06, 2016 at 01:40:15PM -0700, Dylan Baker wrote:
> Quoting Pohjolainen, Topi (2016-05-04 10:25:31)
> [sni[
> > Okay, I don't how I mis-read the original tests so badly - CLAMP01 is the part
> > that defines the expected value. Anyway, if we want ADD_SAT to kick in, we need
> > to change the input so that the result > 1.
> > You have tried to define the inputs in such a way that yields all green in
> > succees case. This is how most tests are setup. However, there are also tests
> > that use other combinations and it might be justified here - otherwise we have
> > just easy values of zero in all other channels other than green. If we
> > wanted to keep strictly to the original, we would write:
> > 
> > fragment program]
> > ARBfp1.0
> > PARAM p = program.local[0];
> > TEMP s;
> > ADD s, p, p;
> > ADD_SAT result.color, p, s;
> > END
> > 
> > [test]
> > clear color 0.5 0.5 0.5 0.5
> > clear
> > 
> > parameter local_fp 0 (0.5, 0.25, 1.0, 0.5)
> > draw rect -1 -1 2 2
> > probe all rgba 1.0 0.75 1.0 1.0
> > 
> > 
> > ------------
> > Original had:
> > 
> > #define PARAM1 { 0.5, 0.25, 1.0, 0.5 }
> > static const GLfloat Param1[4] = PARAM1;
> 
> Right, but that's not strictly true either because the original defines
> a value for result.color. I have a v2 of this patch I'll send that
> covers the "x < -1", "-1 < x < 0", "1 > x > 0", and the "x > 1" case.

The original was:

               "ADD with saturation",
                "!!ARBfp1.0\n"
                "PARAM p = program.local[1]; \n"
                "TEMP t; \n"
                "ADD t, p, p; \n"
                "ADD_SAT result.color, t, p; \n"
                "END \n",
                { CLAMP01(Param1[0] + Param1[0] + Param1[0]),
                  CLAMP01(Param1[1] + Param1[1] + Param1[1]),
                  CLAMP01(Param1[2] + Param1[2] + Param1[2]),
                  CLAMP01(Param1[3] + Param1[3] + Param1[3]),
                },
                DONT_CARE_Z

to me the one I defined looks pretty identical. What do you mean by
"the original defines a value for result.color"?


More information about the Piglit mailing list