History log of /external/mesa3d/src/mesa/main/readpix.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b683891fdabda6b8dcec655652c0709419d4922c 13-Nov-2012 Eric Anholt <eric@anholt.net> mesa: Fix segfault on reading from a missing color read buffer.

The diff looks funny, but it's moving the integer vs non-integer check
below the _mesa_source_buffer_exists() check that ensures
_ColorReadBuffer is non-null, so we get a GL_INVALID_OPERATION instead
of a segfault. This looks like it had regressed in the
_mesa_error_check_format_and_type() changes, which removed the first of
the two duplicated checks for the source buffer. Fixes segfault in the
new piglit ARB_framebuffer_object/negative-readpixels-no-rb.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45877
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 5c99697f74c68f7e170564d791b95d986a18774a)
/external/mesa3d/src/mesa/main/readpix.c
b7c7e5e45a14ed78eda104ebca25072172730645 27-Jul-2012 Ian Romanick <ian.d.romanick@intel.com> mesa/es: Validate glReadPixels format and type in Mesa code rather than the ES wrapper

v2: Add proper GLES3 filtering.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
6671d0dad300e591ac7c0e5110c6778373d0149a 25-Jun-2012 Jordan Justen <jordan.l.justen@intel.com> mesa ReadPixels: handle signed/unsigned integer clamping

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
7ef270867cb1f3e19067c93449e48987a32730d3 25-Jun-2012 Jordan Justen <jordan.l.justen@intel.com> mesa pack: handle uint and int clamping properly

Rename _mesa_pack_rgba_span_int to _mesa_pack_rgba_span_from_uints.
Add _mesa_pack_rgba_span_from_ints.

These separate routines allow the integer clamping to be handled
properly for signed versus unsigned integers.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
284ad9c3b29a6d6f0bade050ea9e949d67967983 18-Jul-2012 Paul Berry <stereotype441@gmail.com> mesa: Make more consistent use of _mesa_is_{user,winsys}_fbo()

A lot of code was still differentiating between between winsys and
user fbos by testing the fbo's name against zero. This converts
everything in core mesa, the state tracker, and src/mesa/program over
to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/readpix.c
9ad8f431b2a47060bf05517246ab0fa8d249c800 25-Jun-2012 Jordan Justen <jordan.l.justen@intel.com> mesa: add glformats integer type/format detection routines

_mesa_is_integer_format is moved to formats.c and renamed
as _mesa_is_enum_format_integer.

_mesa_is_format_unsigned, _mesa_is_type_integer,
_mesa_is_type_unsigned, and _mesa_is_enum_format_or_type_integer
are added.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
5a827d9a2b5d698fed98a5d62ff0292b48bdd6c7 14-May-2012 Eric Anholt <eric@anholt.net> mesa: Check for framebuffer completeness before looking at the rb.

Otherwise, an incomplete framebuffer could have a NULL
_ColorReadBuffer and we'd deref that.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
a5e95a419e4f6ad93e35a960113d97ae2de27476 17-Apr-2012 Brian Paul <brianp@vmware.com> mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()

Accelerates a few glReadPixels cases for WebGL.
See https://bugs.freedesktop.org/show_bug.cgi?id=48545

v2: Per Jose, use bit twiddling for the swizzle case instead of ubyte
arrays (it's about 44% faster).

Note: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
ad897fff7730298c21289768d9b1b55f3d166ac5 01-Mar-2012 Brian Paul <brianp@vmware.com> mesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code

See the comments for _mesa_rebase_rgba_float() for details.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=46679

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
d9c42097770f173804c7c7c40bf8bc6c4400673b 26-Feb-2012 Neil Roberts <neil@linux.intel.com> mesa: Don't disable fast path for normalized types

Mesa has a fast path for the generic fallback when using glReadPixels
for RGBA data which uses memcpy. However it was really difficult to
hit this case because it would not be used if any transferOps are
enabled. Any type apart from floating point or non-normalized integer
types (so any of the common types) would force enabling clamping so
the fast path could not be used. This patch makes it ignore clamping
when determining whether to use the fast path if the data type of the
buffer is an unsigned normalized type because in that case clamping
will not have any effect anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=46631

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
531eaca41b574071fd1a3c3b51f90082601867ae 20-Feb-2012 Brian Paul <brianp@vmware.com> mesa: stop using MAX_WIDTH in glReadPixels code

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
938671397f6e88b68e77c93d6b440f9602950fbe 07-Feb-2012 Brian Paul <brianp@vmware.com> mesa: remove unused _mesa_error_check_format_type() function

This was only used by glReadPixels and glDrawPixels. Now those
functions do the corresponding error checks.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
b8f7eef4ef84d53d32d08a70dc7daec623cf7eab 07-Feb-2012 Brian Paul <brianp@vmware.com> mesa: stop using _mesa_error_check_format_type() in glReadPixels

Basically the same story as the previous commit. But we were
already calling _mesa_source_buffer_exists() in ReadPixels().
Yeah, we were calling it twice.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
675d44629c4099157404065fe86932186a53334f 07-Feb-2012 Brian Paul <brianp@vmware.com> mesa: remove redundant format/type checks in glReadPixels()

These are done in _mesa_error_check_format_and_type().

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
627b435dfe17698a1c69e9a259838fc6f2e6bd4e 07-Feb-2012 Brian Paul <brianp@vmware.com> mesa: new _mesa_error_check_format_and_type() function

This replaces the _mesa_is_legal_format_and_type() function.

According to the spec, some invalid format/type combinations to
glDrawPixels, ReadPixels and glTexImage should generate
GL_INVALID_ENUM but others should generate GL_INVALID_OPERATION.

With the old function we didn't make that distinction and generated
GL_INVALID_ENUM errors instead of GL_INVALID_OPERATION. The new
function returns one of those errors or GL_NO_ERROR.

This will also let us remove some redundant format/type checks in
follow-on commit.

v2: add more checks for ARB_texture_rgb10_a2ui at the top of
_mesa_error_check_format_and_type() per Ian.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
d250287d53c0dcd936ca632f4d991ffaac6693c2 27-Jan-2012 Brian Paul <brianp@vmware.com> mesa: remove byteswap check in fast_read_rgba_pixels_memcpy()

It's handled by _mesa_format_matches_format_and_type() now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
06aa607ba76d940c48556935259c2a34eac7a8dc 27-Jan-2012 Brian Paul <brianp@vmware.com> mesa: added swapBytes parameter to _mesa_format_matches_format_and_type()

Not actually used yet though.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
343100d1fcd5ee705e8b99cd9ff1259001f15081 27-Jan-2012 Brian Paul <brianp@vmware.com> mesa: remove LSB-first pixel packing check in glReadPixels

GL_UNPACK_LSB_FIRST only applies to bitmap data, not glReadPixels.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
86b7c6707f915b07347070901d602917bc25dd0f 11-Jan-2012 Eric Anholt <eric@anholt.net> mesa: Throw the required error for glReadPixels() from a multisampled FBO.

Fixes piglit EXT_framebuffer_multisample-negative-readpixels.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
/external/mesa3d/src/mesa/main/readpix.c
301fba54452c01673bb9f105fbc3e68a704ad18a 09-Jan-2012 Brian Paul <brianp@vmware.com> mesa: rename _mesa_unpack_int_rgba_row() to _mesa_unpack_uint_rgba_row()

Since it returns uint values, not int.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/readpix.c
bf6aac24c1d77979280068787b5443dd5c049269 06-Dec-2011 Brian Paul <brianp@vmware.com> mesa: use malloc instead of MAX_WIDTH array in glReadPixels()

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/readpix.c
755f0a0a02c5cf3be7e69ad51b411711fcc0bc27 17-Nov-2011 Eric Anholt <eric@anholt.net> mesa: Make formats.c "datatype" values match glGetTexLevelParameter return.

The formats.c code's "datatype" value is "what does this value mean",
i.e. unorm or snorm or float, and is the return value from the
GL_TEXTURE_RED_TYPE class of queries. The depth formats were marked
as GL_UNSIGNED_INT, which is what we use for integer, and not what we
should be returning from the glGetTexLevelParameter.

In texstore, we were inappropriately using it as an argument to
_mesa_unpack_depth_span() that was expecting a value like
GL_UNSIGNED_INT or GL_UNSIGNED_SHORT. Just hardcode
_mesa_unpack_depth_span()'s arguments for now, though it looks like
the consumers of that interface would be happier with using
MESA_FORMAT.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
038a7dfcaaa7a8e5e108e247b2ffd786b3b015a3 18-Nov-2011 Brian Paul <brianp@vmware.com> mesa: handle MapRenderbuffer() failures in glReadPixels

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/readpix.c
72fb25cefbf58d477d99ce2c986a703f1178cf59 19-Nov-2011 Brian Paul <brianp@vmware.com> mesa: make slow_read_rgba_pixels() a void function

The boolean return value was ignored by the caller.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/readpix.c
4b1205d53b26dadba13578cf875feeeaa2018f74 17-Nov-2011 Michel Dänzer <michel.daenzer@amd.com> Revert "read_rgba_pixels: Don't force clamping if the renderbuffer is normalized."

This reverts commit b11c16752a18ef8dfb96d9f0ead6ecb62bde6773.

Breaks at least luminance destination formats.
/external/mesa3d/src/mesa/main/readpix.c
b11c16752a18ef8dfb96d9f0ead6ecb62bde6773 16-Nov-2011 Michel Dänzer <michel.daenzer@amd.com> read_rgba_pixels: Don't force clamping if the renderbuffer is normalized.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
f4c03da3276bee39802236c21a0b5a31f05e2541 16-Nov-2011 Brian Paul <brianp@vmware.com> mesa: initialize stencilMap, Stride if stencilRb==depthRb
/external/mesa3d/src/mesa/main/readpix.c
f6a50c0b1ff620d1b721968144a56452c0bd6d85 16-Nov-2011 Brian Paul <brianp@vmware.com> mesa: don't map depth+stencil buffer twice in glReadPixels()

In slow_read_depth_stencil_pixels_separate() we might have separate
depth and stencil buffers or a combined buffer. In the later case,
don't map the buffer twice. This function is used when the depth
scale/bias pixel transfer values are not the defaults.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=42963

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
d2a23d4ded958ceb480c97a303003ea009d5fd41 12-Nov-2011 Brian Paul <brianp@vmware.com> mesa: move swrast ReadPixels code into core Mesa

The swrast ReadPixels code has no dependencies on swrast since moving
to Map/UnmapRenderbuffer(). We'll be able to remove s_readpix.c and
remove the state tracker's glReadPixels code next.

Acked-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/readpix.c
1165280cbd37dee1e499358633478ab869de21df 01-Jun-2011 Marek Olšák <maraeo@gmail.com> mesa: initial ARB_depth_buffer_float support

Using GL_NONE as DataType of Z32_FLOAT_X24S8, not sure what I should put there.
The spec says the type is n/a.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/readpix.c
6b329b9274b18c50f4177eef7ee087d50ebc1525 26-Apr-2011 Brian Paul <brianp@vmware.com> Squashed commit of the following:

commit 864fe253b04105b7469e5f7b064dc37637b944f8
Author: Brian Paul <brianp@vmware.com>
Date: Thu Apr 21 20:13:07 2011 -0600

mesa: s/exec/disp/ in _mesa_init_histogram_dispatch()

This function isn't normally compiled (FEATURE_histogram).

commit f4bf45e2b94b582cacd19cdca873c5be627e4250
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:58 2011 -0600

mesa: hook up GL_ARB_robustness dispatch functions

...and advertise the extension.

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 2b89e38e5f572dc40cebc06381ae7c5d04386998
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:58 2011 -0600

mesa: regenerated API files for GL_ARB_robustness

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

glapi: add ARB_robustness xml

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: implement GL_ARB_robustness functions

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 938fd71f4c4742f274922d53492a7290ab8d9c9b
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: add context fields for GL_ARB_robustness

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 72075137bc79e65be03dac7e97b6dba93c3a86a4
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: standardize more bounds-checking error messages

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 32a3fc23746db49da903fbc08afa0135af3007d2
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: standardize some bounds-checking error messages

Signed-off-by: Brian Paul <brianp@vmware.com>

commit cecbf1f4d164207de373dec0cadee2e84e1f9656
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: add more bounds-checking support for client memory buffers

Signed-off-by: Brian Paul <brianp@vmware.com>

commit edc895b52383d5bd274422db56adead1d81daf5f
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: add bounds-checking support for client memory buffers

Signed-off-by: Brian Paul <brianp@vmware.com>

commit 3a96ef28a538f158a219b406cd090dee70470c85
Author: nobled <nobled@dreamwidth.org>
Date: Thu Apr 21 07:53:57 2011 -0600

mesa: use is_bufferobj() helper function

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/readpix.c
957552fce0c272b476d89bee374724e8a94a8d8a 19-Mar-2011 Brian Paul <brianp@vmware.com> mesa: 80-column wrapping
/external/mesa3d/src/mesa/main/readpix.c
b70610b9823fc7dc3672735c11be1a75fbb1a2a4 01-Mar-2011 Brian Paul <brianp@vmware.com> mesa: move PBO-related functions into a new file
/external/mesa3d/src/mesa/main/readpix.c
6364d75008b4fa580c1cb47c59ba1cf3e0caa6cd 18-Feb-2011 Brian Paul <brianp@vmware.com> mesa: MESA_VERBOSE logging for glRead/Draw/CopyPixels, glBlitFramebuffer
/external/mesa3d/src/mesa/main/readpix.c
0117da40cd7edd3d165bb28569c289b37eca12b9 06-Jan-2011 Vinson Lee <vlee@vmware.com> mesa: Include mtypes.h in files that use gl_context struct.

Directly include mtypes.h if a file uses a gl_context struct. This
allows future removal of headers that are not strictly necessary but
indirectly include mtypes.h for a file.
/external/mesa3d/src/mesa/main/readpix.c
412b9608838b872bc294569b3ee913343a7e66f6 27-Oct-2010 Brian Paul <brianp@vmware.com> mesa: rename function to _mesa_is_format_integer_color()

Be a bit more clear about its operation.
/external/mesa3d/src/mesa/main/readpix.c
751e10fc0106e929a54d055de7427b3d87a6ffa6 26-Oct-2010 Brian Paul <brianp@vmware.com> mesa: additional glReadPixels error checks for GL_EXT_texture_integer
/external/mesa3d/src/mesa/main/readpix.c
d72bf5e79dfb820309ef28b1f7fe39864d884886 23-Oct-2010 Brian Paul <brianp@vmware.com> mesa: added cases for GL_EXT_texture_integer
/external/mesa3d/src/mesa/main/readpix.c
f9995b30756140724f41daf963fa06167912be7f 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Drop GLcontext typedef and use struct gl_context instead
/external/mesa3d/src/mesa/main/readpix.c
5d1387b2da3626326410804026f8b92f1a121fdc 29-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formats
/external/mesa3d/src/mesa/main/readpix.c
f86d7af4a0003997890edc84158e72c21c11037e 21-Apr-2010 Brian Paul <brianp@vmware.com> mesa: raise GL_INVALID_OPERATION for glReadPixels(GL_COLOR_INDEX)

We no longer support CI-mode color buffers so this is always an error.
/external/mesa3d/src/mesa/main/readpix.c
22a96f305898b5d1aa26809c7156a01686eb9bf0 25-Feb-2010 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove checks of Visual.rgbMode

This must always be true now, so there is no reason to check it. Ever.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/readpix.c
434ec3ada841915a00ffc23f699401eb3e7b37ee 12-Aug-2009 Brian Paul <brianp@vmware.com> mesa: use _mesa_is_bufferobj()
/external/mesa3d/src/mesa/main/readpix.c
7bf6efe78066b33c4ddd278d78ea44cfd12154cc 07-Aug-2009 Brian Paul <brianp@vmware.com> mesa: use _mesa_bufferobj_mapped()
/external/mesa3d/src/mesa/main/readpix.c
2dec62405f9e2e46997046a32211f25ba83d2600 07-Aug-2009 Brian Paul <brianp@vmware.com> mesa: fix some incorrect error checks in _mesa_error_check_format_type()

Plus, simplify the code a bit.
/external/mesa3d/src/mesa/main/readpix.c
7b9bf395433b5fa9d5a95186891a29d49e0b47c0 02-Apr-2009 Brian Paul <brianp@vmware.com> mesa: don't call ctx->Driver.ReadPixels() if width or height is zero
/external/mesa3d/src/mesa/main/readpix.c
28876dd511ec2c9d5f5500499201df2588e8c7f1 09-Jun-2008 Brian Paul <brian.paul@tungstengraphics.com> mesa: refactor: move glReadPixels code into new readpix.c file
/external/mesa3d/src/mesa/main/readpix.c