msaa: Generate proper error for operations prohibited on MSAA buffers.
authorPaul Berry <stereotype441@gmail.com>
Mon, 16 Jul 2012 18:25:50 +0000 (11:25 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 17 Jul 2012 21:40:01 +0000 (14:40 -0700)
commite9b908b014be57cd2d3f0432adf16ac5b9631325
tree19914f0880654bd4245ff78b8cd202cf2866001a
parentc4d2a14d6e98dae29a9a04da122521e25eaf7986
msaa: Generate proper error for operations prohibited on MSAA buffers.

From the GL 3.0 spec, section 4.3.3, in the documentation for
CopyPixels():

    "An INVALID_OPERATION error will be generated if the object bound
    to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value
    of SAMPLE_BUFFERS is greater than zero."

The same applies to CopyTexImage...() and CopyTexSubImage...()
functions, since they are defined in terms of CopyPixels().

Previously we were generating an INVALID_FRAMEBUFFER_OPERATION error
in these cases.

Fixes piglit tests
"EXT_framebuffer_multisample/negative-{copypixels,copyteximage}".

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/drawpix.c
src/mesa/main/teximage.c