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

Dylan Baker dylan at pnwbakers.com
Fri May 6 20:40:15 UTC 2016


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160506/74d15e20/attachment-0001.sig>


More information about the Piglit mailing list