diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-03-27 20:32:52 +0200 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-03-27 20:56:36 +0200 |
commit | f4e561ce127cf484d7c76c29b8cd026c9ad5cebc (patch) | |
tree | 38b94af9ee5a6242acdcfcd9d7584a97ad97ad8d /src/gallium | |
parent | 02ee7c29502966dffa44243bfc8c20c15907b880 (diff) | |
download | external_mesa3d-f4e561ce127cf484d7c76c29b8cd026c9ad5cebc.zip external_mesa3d-f4e561ce127cf484d7c76c29b8cd026c9ad5cebc.tar.gz external_mesa3d-f4e561ce127cf484d7c76c29b8cd026c9ad5cebc.tar.bz2 |
drisw: make stride issue profound
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/dri/sw/drisw.c | 10 | ||||
-rw-r--r-- | src/gallium/winsys/sw/dri/dri_sw_winsys.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 745941d..a75fdf1 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -38,16 +38,16 @@ * * drisw_api: * - * Define drisw_api similarly to dri_api and use it to call the loader. This is - * predicated on support for calling the loader from the winsys, which has to - * grow for DRI2 as well. + * Define drisw_api similarly to dri1_api and use it to call the loader. This + * is predicated on support for calling the loader from the winsys, which has + * to grow for DRI2 as well. * - * xshm: + * xshm / texture_from_pixmap / EGLImage: * * Allow the loaders to use the XSHM extension. It probably requires callbacks * for createImage/destroyImage similar to DRI2 getBuffers. Probably not worth * it, given the scope of DRISW, unless it falls naturally from properly - * solving the above two issues. + * solving the other issues. */ #include "util/u_memory.h" diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index 5549e15..9e8c312 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -63,11 +63,11 @@ xm_is_displaytarget_format_supported( struct sw_winsys *ws, } static INLINE int -bytes_per_line(unsigned stride, unsigned mul) +bytes_per_line(unsigned pitch_bits, unsigned mul) { unsigned mask = mul - 1; - return ((stride * 8 + mask) & ~mask) / 8; + return ((pitch_bits + mask) & ~mask) / 8; } /* pipe_screen::texture_create DISPLAY_TARGET / SCANOUT / SHARED */ @@ -88,7 +88,7 @@ xm_displaytarget_create(struct sw_winsys *winsys, format_stride = util_format_get_stride(format, width); xm_stride = align(format_stride, alignment); - loader_stride = bytes_per_line(format_stride, 32); + loader_stride = bytes_per_line(format_stride * 8, 32); nblocksy = util_format_get_nblocksy(format, height); size = xm_stride * nblocksy; |