[Piglit] [PATCH 1/2] max-samplers: Specify a RGBA color rather than RGB.
Kenneth Graunke
kenneth at whitecape.org
Sat Jan 18 19:54:25 PST 2014
The RGB channels continue to uniquely identify textures; the alpha
channel is always 1.0.
This isn't terribly useful in and of itself, but will allow me to use
the unique color for the border color in the next patch.
Cc: Marek Olšák <maraeo at gmail.com>
Cc: Chris Forbes <chrisf at ijw.co.nz>
Cc: Ian Romanick <idr at freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
tests/texturing/max-samplers.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/texturing/max-samplers.c b/tests/texturing/max-samplers.c
index ccef4a1..c8de624 100644
--- a/tests/texturing/max-samplers.c
+++ b/tests/texturing/max-samplers.c
@@ -87,6 +87,7 @@ get_texture_color(int unit, float out[3])
out[0] = (unit % 16) / 15.0;
out[1] = (unit / 16) / 15.0;
out[2] = 0;
+ out[3] = 1;
}
static void
@@ -140,7 +141,7 @@ draw_rect_core(int ix, int iy, int iw, int ih)
static GLboolean
probe_pixel(int unit, int x, int y)
{
- float expected[3];
+ float expected[4];
get_texture_color(unit, expected);
@@ -201,7 +202,7 @@ static void
set_texture(int unit)
{
GLuint tex;
- float color[3];
+ float color[4];
get_texture_color(unit, color);
--
1.8.5.2
More information about the Piglit
mailing list