util/blitter: add clamping during SINT <-> UINT blits
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 7 Nov 2016 14:55:52 +0000 (15:55 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 16 Nov 2016 09:31:21 +0000 (10:31 +0100)
commit3817a7a1d7434ae5ae069599013cea81cf809aa5
tree3758d474e6c4d8f12e306846abeec92623668c05
parentab5fd10eaa7e9a7cca20f6aa6b01240e8fd62c49
util/blitter: add clamping during SINT <-> UINT blits

Even though glBlitFramebuffer cannot be used for SINT <-> UINT blits, we
still need to handle this type of blit here because it can happen as part
of texture uploads / downloads, e.g. uploading a GL_RGBA8I texture from
GL_UNSIGNED_INT data.

Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/auxiliary/util/u_simple_shaders.h
src/gallium/auxiliary/util/u_tests.c
src/gallium/tests/trivial/quad-tex.c