diff options
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 745941d5501..a75fdf17899 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 5549e152ee8..9e8c31282d4 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; |