aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-05 08:05:28 +0100
committermarha <marha@users.sourceforge.net>2011-12-05 08:05:28 +0100
commitfab1dd1d0549bbb52c3598e57aad4f0bfa5e55cf (patch)
treec59c3e084f79bd1f6060f9a5cedb5c48d4da14ee /mesalib/src/mesa/main/drawpix.c
parent5d6e342b3c2d0d3607b184b1472b816228839e3f (diff)
parent528f5bd58a139174170c4130c67dca30193c9057 (diff)
downloadvcxsrv-fab1dd1d0549bbb52c3598e57aad4f0bfa5e55cf.tar.gz
vcxsrv-fab1dd1d0549bbb52c3598e57aad4f0bfa5e55cf.tar.bz2
vcxsrv-fab1dd1d0549bbb52c3598e57aad4f0bfa5e55cf.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/dispatch.c
Diffstat (limited to 'mesalib/src/mesa/main/drawpix.c')
-rw-r--r--mesalib/src/mesa/main/drawpix.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c
index 412cc15af..c9e714b21 100644
--- a/mesalib/src/mesa/main/drawpix.c
+++ b/mesalib/src/mesa/main/drawpix.c
@@ -30,6 +30,7 @@
#include "enums.h"
#include "feedback.h"
#include "framebuffer.h"
+#include "image.h"
#include "mfeatures.h"
#include "pbo.h"
#include "readpix.h"
@@ -76,6 +77,23 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
goto end; /* the error code was recorded */
}
+ /* GL 3.0 introduced a new restriction on glDrawPixels() over what was in
+ * GL_EXT_texture_integer. From section 3.7.4 ("Rasterization of Pixel
+ * Rectangles) on page 151 of the GL 3.0 specification:
+ *
+ * "If format contains integer components, as shown in table 3.6, an
+ * INVALID OPERATION error is generated."
+ *
+ * Since DrawPixels rendering would be merely undefined if not an error (due
+ * to a lack of defined mapping from integer data to gl_Color fragment shader
+ * input), NVIDIA's implementation also just returns this error despite
+ * exposing GL_EXT_texture_integer, just return an error regardless.
+ */
+ if (_mesa_is_integer_format(format)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)");
+ goto end;
+ }
+
if (_mesa_error_check_format_type(ctx, format, type, GL_TRUE)) {
goto end; /* the error code was recorded */
}