[Mesa-dev] [RFC 5/6] gallium/winsys/kms: Respect format bpp
Kevin Strasser
kevin.strasser at intel.com
Fri Jan 4 21:56:31 UTC 2019
Needed for allocating buffers with pixel formats wider than 32 bpp.
Signed-off-by: Kevin Strasser <kevin.strasser at intel.com>
---
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index 9564d94..e921a61 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -182,7 +182,7 @@ kms_sw_displaytarget_create(struct sw_winsys *ws,
kms_sw_dt->format = format;
memset(&create_req, 0, sizeof(create_req));
- create_req.bpp = 32;
+ create_req.bpp = util_format_get_blocksizebits(format);
create_req.width = width;
create_req.height = height;
ret = drmIoctl(kms_sw->fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_req);
--
2.7.4
More information about the mesa-dev
mailing list