arb_blend_func_extended: remove explicit 100 x 100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gl-3.0: remove explit 100 x 100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gl-2.0: remove explicit 100 x 100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
clipflat: glean clipFlat test ported to piglit

v2: use piglit_report_subtest_result().

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
glean/clipflat: remove (replaced by new piglit test)

Reviewed-by: Eric Anholt <eric@anholt.net>
glean/maskedclear: remove (replaced by new piglit test)

Reviewed-by: Eric Anholt <eric@anholt.net>
ext_transform_feedback: remove explicit 100x100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
ext_texture_integer: remove explicit 100x100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
arb_shader_objects: remove explicit 100x100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
ext_packed_float: remove explicit 100x100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glsl-1.30: remove explicit 100x100 window size

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
fbo-blending-formats: Enable testing for channels with 0 bits of data.

The existing code is intentionally disabling testing for channels with
1 bit of data, (since the ambiguity in rounding makes it infeasible to
test). But the disabling of testing for 0-bit channels was
unintentional collateral damage.

In particular, for RGB-only formats it's important to test that
results always provide a value of 1.0 for alpha.

So we change the condition to disable tests only when the number of
bits is equal to 1, (as opposed to less then 2). We also just fudge in
a tolerance value corresponding to 8 bits for channels with 0 bits of
storage. (The tolerance probably doesn't matter at all here since we
should really only be doing exact comparisons of values of 0.0 or
1.0).

Reviewed-by: Marek Olšák <maraeo@gmail.com>
fbo-blending-formats: Test DST_ALPHA blending when destination has no alpha

It may sound silly to test the blending of DST_ALPHA when the
destination has no alpha channel, but in fact this is a not uncommon
source of errors in implementations.

Some implementations will implement a non-alpha format with an
internal buffer that actually does have bits for the alpha
channel. These implementations must then ensure that these alpha bits
never leak out, and must have additional code to smash alpha to 1.0
for things like ReadPixels, TexImage, and DST_ALPHA blending.

So, fix the test to not avoid this important testing.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
fbo-blending-formats: Fix expected color values for DST_ALPHA blending

In the case where there are 0 bits of destination alpha, we need to
compute different expected results for the color when rendering with
DST_ALPHA. The results are initialized with calculations that blend
src and destination color such as:

	res4[X] = dst4[X]*(1-dst4[ALPHA]) + src4[X]*dst4[ALPHA]

But when there is no destination alpha channel, instead of the blend
factor dst4[ALPHA] in the above, the result should be computed with
this value replaced with 1.0. In other words, the correct calculation
for the expected result color becomes:

	res4[X] = src4[X]

Reviewed-by: Marek Olšák <maraeo@gmail.com>
fbo-blending-formats: Fixup expected Luminance value for DST_ALPHA blending

When a format is used with LUMINANCE and no ALPHA, our computation of
the expected result should use an implicit destination alpha value of
1.0 rather than the alpha value of the rendered color.
fbo-alphatest-formats: Skip testing for ALPHA-only formats

The test uses an RGB probe to determine whether a pixel was rendered
or not. By definition, an RGB proble will always return values of 0
whether or not the pixel was rendered. So the results are meaningless
for an alpha-only format.
glsl-fs-user-varying-ff: Don't probe an undefined value.

It's undefined.  You don't get to expect that it's anything in
particular, particularly not green which is a very common undefined
value.

Reviewed-by: Carl Worth <cworth@cworth.org>
texture-integer-glsl130: fix random failures with wrong expected alpha values

The logic failed whenever the random number was 0 for formats which
don't have an alpha channel. In this case all of expected/bias/value
were 0 but the actual correct read back value is 1.0 (default value
for alpha channel sampling for integer textures is 1 just like it is
1.0 for ordinary texture formats).

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

Edited-by: Carl Worth <cworth@cworth.org>

Use integer literals, not floating-point to assign to integer
array. Add a comment describing the tweak of values for texture
formats without some channels.
glsl-es-3.00: Generate tests for builtin packing functions (v3)

Generate the following test files:
  {const,vs,fs}-{pack,unpack}{Snorm,Unorm,Half}2x16.shader_test

The tests are generated by a new Python script,
gen_builtin_packing_tests.py, and placed into directory
spec/glsl-es-3.00/execution/built-in-functions.

v2: Add reduced_input_table. This allows us to generate a smaller set of
    inputs for packHalf2x16 in order to avoid Linux's oom-killer.
v3: - Fix comment typo. [for mattst88]
    - Add more test inputs for packHalf2x16. [for paul]

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
texwrap: Fix out-of-bounds read.

Fixes out-of-bounds read defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>