summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2012-09-13 11:05:18 -0700
committerJordan Justen <jordan.l.justen@intel.com>2012-09-13 11:05:18 -0700
commit8f42fb396aef72a04f689c25e285af7fe70578e0 (patch)
treef393301088027a17be41a7393fbf6cf4f0afdf0f
parentee2f648c714e9ba51f7a6e6dcd3f3904aaacfd81 (diff)
Add Ken's MSAA patches9.0-for-precise
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/17-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch35
-rw-r--r--debian/patches/18-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch53
-rw-r--r--debian/patches/series2
4 files changed, 97 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 6ac2b1cb37..f8f22961b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mesa (9.0~git20120909.7f011e20-0ubuntu5~precise) precise; urgency=low
+
+ [ Jordan Justen ]
+ * Add Ken's MSAA patches
+
+ -- Jordan Justen <jljusten@gmail.com> Thu, 13 Sep 2012 11:04:23 -0700
+
mesa (9.0~git20120909.7f011e20-0ubuntu4~precise) precise; urgency=low
[ Jordan Justen ]
diff --git a/debian/patches/17-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch b/debian/patches/17-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch
new file mode 100644
index 0000000000..6de4a101c8
--- /dev/null
+++ b/debian/patches/17-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch
@@ -0,0 +1,35 @@
+To: <mesa-dev@lists.freedesktop.org>
+Date: Tue, 11 Sep 2012 16:24:04 -0700
+Subject: [Mesa-dev] [PATCH 1/2] mesa: Ignore SRGB when determining
+ compatible resolve formats.
+
+MSAA resolves and other blit-like operations ignore SRGB state anyway,
+so we should be able to safely allow resolves between compatible
+SRGB/linear formats like SRGBA8 and RGBA8888.
+
+Fixes completely black rendering when using multisampling in L4D2.
+
+NOTE: This is a candidate for the 9.0 branch.
+
+Cc: Paul Berry <stereotype441@gmail.com>
+Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
+---
+ src/mesa/main/fbobject.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
+index abc9d83..6d9bf35 100644
+--- a/src/mesa/main/fbobject.c
++++ b/src/mesa/main/fbobject.c
+@@ -2802,7 +2802,8 @@ compatible_resolve_formats(const struct gl_renderbuffer *colorReadRb,
+ {
+ /* The simple case where we know the backing formats are the same.
+ */
+- if (colorReadRb->Format == colorDrawRb->Format) {
++ if (_mesa_get_srgb_format_linear(colorReadRb->Format) ==
++ _mesa_get_srgb_format_linear(colorDrawRb->Format)) {
+ return GL_TRUE;
+ }
+
+--
+1.7.11.4
diff --git a/debian/patches/18-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch b/debian/patches/18-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch
new file mode 100644
index 0000000000..b1b891fddf
--- /dev/null
+++ b/debian/patches/18-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch
@@ -0,0 +1,53 @@
+To: <mesa-dev@lists.freedesktop.org>
+Date: Tue, 11 Sep 2012 16:24:05 -0700
+Subject: [Mesa-dev] [PATCH 2/2] i965/blorp: Add support for blits between
+ SRGB and linear formats.
+
+Fixes colorspace issues in L4D2 when multisampling is enabled (the
+scene was far too dark, but the flashlight area was way too bright).
+
+NOTE: This is a candidate for the 9.0 branch.
+
+Cc: Paul Berry <stereotype441@gmail.com>
+Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
+---
+ src/mesa/drivers/dri/i965/brw_blorp.cpp | 5 +++--
+ src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 7 +++++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
+index 9017e4d..e4451f3 100644
+--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
++++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
+@@ -97,8 +97,9 @@ brw_blorp_surface_info::set(struct brw_context *brw,
+ * target, even if this is the source image. So we can convert to a
+ * surface format using brw->render_target_format.
+ */
+- assert(brw->format_supported_as_render_target[mt->format]);
+- this->brw_surfaceformat = brw->render_target_format[mt->format];
++ gl_format linear_format = _mesa_get_srgb_format_linear(mt->format);
++ assert(brw->format_supported_as_render_target[linear_format]);
++ this->brw_surfaceformat = brw->render_target_format[linear_format];
+ break;
+ }
+ }
+diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+index 1e49ac5..c6c24b1 100644
+--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
++++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+@@ -175,8 +175,11 @@ formats_match(GLbitfield buffer_bit, struct gl_renderbuffer *src_rb,
+ * example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
+ * between those formats.
+ */
+- return find_miptree(buffer_bit, src_rb)->format ==
+- find_miptree(buffer_bit, dst_rb)->format;
++ gl_format src_format = find_miptree(buffer_bit, src_rb)->format;
++ gl_format dst_format = find_miptree(buffer_bit, dst_rb)->format;
++
++ return _mesa_get_srgb_format_linear(src_format) ==
++ _mesa_get_srgb_format_linear(dst_format);
+ }
+
+
+--
+1.7.11.4
diff --git a/debian/patches/series b/debian/patches/series
index d983f91a2e..587b7bb599 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,5 @@
14-fix-osmesa-build.diff
15-fix-llvmpipe-test-linking.diff
16-mesa-msaa--Allow-X-and-Y-flips-in-multisampled-blits.patch
+17-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch
+18-i965_blorp_Add_support_for_blits_between_SRGB_and_linear_formats.patch