diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-03-27 21:35:25 +0200 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-03-27 21:35:25 +0200 |
commit | 3bfa23317c6b1b52ec637a03a0b623228ffc95ef (patch) | |
tree | 2429a7669b3ef6b12084f03ef0c89c462790aa38 | |
parent | f4e561ce127cf484d7c76c29b8cd026c9ad5cebc (diff) |
drisw: add comment to libGL about stride
-rw-r--r-- | src/gallium/winsys/sw/dri/dri_sw_winsys.c | 1 | ||||
-rw-r--r-- | src/glx/drisw_glx.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index 9e8c31282d..ee8ec91bc5 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -62,6 +62,7 @@ xm_is_displaytarget_format_supported( struct sw_winsys *ws, return TRUE; } +/* see bytes_per_line in libGL */ static INLINE int bytes_per_line(unsigned pitch_bits, unsigned mul) { diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index ca85ae3a31..5a47e4a097 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -90,7 +90,7 @@ XCreateDrawable(__GLXDRIdrawablePrivate * pdp, ZPixmap, 0, /* format, offset */ NULL, /* data */ 0, 0, /* width, height */ - 8, /* bitmap_pad */ + 32, /* bitmap_pad */ 0); /* bytes_per_line */ return True; @@ -188,6 +188,14 @@ swrastGetImage2(__DRIdrawable * read, ximage->data = NULL; } +/** + * Renderbuffer pitch alignment (in bits). + * + * This should be chosen by the driver and the loader (libGL, xserver/glx) + * should use the driver provided pitch. I had a comment that the xserver + * requires padding images to 32 bits. Is this a hard requirement or can it use + * the driver pitch without extra copies ? XXX + */ static inline int bytes_per_line(unsigned pitch_bits, unsigned mul) { diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index e8df26f3d0..8b68281fab 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -206,6 +206,7 @@ swrast_delete_renderbuffer(struct gl_renderbuffer *rb) free(rb); } +/* see bytes_per_line in libGL */ static INLINE int bytes_per_line(unsigned pitch_bits, unsigned mul) { |