diff options
author | Jordan Justen <jljusten@gmail.com> | 2012-09-10 15:27:51 -0700 |
---|---|---|
committer | Jordan Justen <jljusten@gmail.com> | 2012-09-10 15:43:22 -0700 |
commit | e85764cf0dd03d54078eb1fc22d629f5820bcb76 (patch) | |
tree | 363bd8694645a3aa6f60dc48ef610927a36bb31b | |
parent | f4f2803f5a38ec1ff6fc52e8331bf04cf2021017 (diff) |
Add Paul's MSAA patchubuntu-precise
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch | 54 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 62 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index e3c6acd9f6..b4ee166a01 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mesa (9.1~git20120910.e81ee67b-5) precise; urgency=low + + [ Jordan Justen ] + * Add Paul's MSAA patch + + -- Jordan Justen <jljusten@gmail.com> Mon, 10 Sep 2012 15:42:40 -0700 + mesa (9.1~git20120910.e81ee67b-4) precise; urgency=low [ Jordan Justen ] diff --git a/debian/patches/16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch b/debian/patches/16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch new file mode 100644 index 0000000000..c810a9ebe0 --- /dev/null +++ b/debian/patches/16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch @@ -0,0 +1,54 @@ +To: mesa-dev@lists.freedesktop.org +Date: Wed, 5 Sep 2012 16:22:56 -0700 +Subject: [Mesa-dev] [PATCH] mesa/msaa: Allow X and Y flips in multisampled + blits. + +From the GL 4.3 spec, section 18.3.1 "Blitting Pixel Rectangles": + + If SAMPLE_BUFFERS for either the read framebuffer or draw + framebuffer is greater than zero, no copy is performed and an + INVALID_OPERATION error is generated if the dimensions of the + source and destination rectangles provided to BlitFramebuffer are + not identical, or if the formats of the read and draw framebuffers + are not identical. + +It is not clear from the spec whether "dimensions" should mean both +sign and magnitude, or just magnitude. + +Previously, Mesa interpreted "dimensions" as meaning both sign and +magnitude, so any multisampled blit that attempted to flip the image +in the X and/or Y direction would fail. + +However, Y flips are likely to be commonplace in OpenGL applications +that have been ported from DirectX applications, as a result of the +fact that DirectX and OpenGL differ in their orientation of the Y +axis. Furthermore, at least one commercial driver (nVidia) permits Y +filps, and L4D2 relies on them being permitted. So it seems prudent +for Mesa to permit them. + +This patch changes Mesa to allow both X and Y flips, since there is no +language in the spec to indicate that X and Y flips should be treated +differently. + +NOTE: This is a candidate for stable release branches. +--- + src/mesa/main/fbobject.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c +index 59a5ec3..abc9d83 100644 +--- a/src/mesa/main/fbobject.c ++++ b/src/mesa/main/fbobject.c +@@ -2979,8 +2979,8 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + /* extra checks for multisample copies... */ + if (readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) { + /* src and dest region sizes must be the same */ +- if (srcX1 - srcX0 != dstX1 - dstX0 || +- srcY1 - srcY0 != dstY1 - dstY0) { ++ if (abs(srcX1 - srcX0) != abs(dstX1 - dstX0) || ++ abs(srcY1 - srcY0) != abs(dstY1 - dstY0)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBlitFramebufferEXT(bad src/dst multisample region sizes)"); + return; +-- +1.7.7.6 diff --git a/debian/patches/series b/debian/patches/series index 0d68a36094..d983f91a2e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ 13-llvm-config-pick-a-version.diff 14-fix-osmesa-build.diff 15-fix-llvmpipe-test-linking.diff +16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch |