summaryrefslogtreecommitdiffstats
path: root/mesa-8.0.1-fix-16bpp.patch
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2012-04-02 12:27:19 -0400
committerAdam Jackson <ajax@redhat.com>2012-04-02 12:27:19 -0400
commita3ea44be80dab99ec9fa2df865e021bd92a5d35a (patch)
tree8519967c918cbe0554ab506f7e5f6d5246f6b582 /mesa-8.0.1-fix-16bpp.patch
parentafdb6fd2196e9d86359e10e82ba7c2e72950f42b (diff)
downloadmesa-a3ea44be80dab99ec9fa2df865e021bd92a5d35a.tar.gz
mesa-a3ea44be80dab99ec9fa2df865e021bd92a5d35a.tar.xz
mesa-a3ea44be80dab99ec9fa2df865e021bd92a5d35a.zip
mesa-8.0.1-fix-16bpp.patch: Fix 16bpp in llvmpipe
Diffstat (limited to 'mesa-8.0.1-fix-16bpp.patch')
-rw-r--r--mesa-8.0.1-fix-16bpp.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/mesa-8.0.1-fix-16bpp.patch b/mesa-8.0.1-fix-16bpp.patch
new file mode 100644
index 0000000..4e3977b
--- /dev/null
+++ b/mesa-8.0.1-fix-16bpp.patch
@@ -0,0 +1,27 @@
+diff -up Mesa-8.0.1/src/glx/drisw_glx.c.jx Mesa-8.0.1/src/glx/drisw_glx.c
+--- Mesa-8.0.1/src/glx/drisw_glx.c.jx 2012-04-02 10:34:23.000000000 -0400
++++ Mesa-8.0.1/src/glx/drisw_glx.c 2012-04-02 11:44:19.296407735 -0400
+@@ -274,7 +274,9 @@ swrastShmGetImage(__DRIdrawable *read, c
+ do {
+ int i;
+ char *src = ximage->data;
+- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
++ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8);
++ int dst_width = align(ximage->width * bytes_per_pixel,
++ 64 * bytes_per_pixel);
+
+ for (i = 0; i < ximage->height; i++) {
+ memcpy(data, src, ximage->bytes_per_line);
+diff -up Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx Mesa-8.0.1/src/mesa/state_tracker/st_manager.c
+--- Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx 2012-02-14 18:44:00.000000000 -0500
++++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c 2012-04-02 12:02:14.613964417 -0400
+@@ -528,6 +528,9 @@ st_context_teximage(struct st_context_if
+ if (util_format_get_component_bits(internal_format,
+ UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
+ internalFormat = GL_RGBA;
++ else if (util_format_get_component_bits(internal_format,
++ UTIL_FORMAT_COLORSPACE_RGB, 0) == 5)
++ internalFormat = GL_RGB5;
+ else
+ internalFormat = GL_RGB;
+