Commit ec0a68e5 authored by Kevin Strasser's avatar Kevin Strasser
Browse files

gallium/winsys/kms: Fix dumb buffer bpp

The bpp in the dumb buffer creation request is hardcoded to 32, which is an
incorrect assumption as the caller is free to pick any pipe format. Use the
bpp supplied to us through util_format_get_blocksizebits().

Fixes: 3b176c44

 "gallium: Add a dumb drm/kms winsys backed swrast provider"
Signed-off-by: Kevin Strasser's avatarKevin Strasser <>
Reviewed-by: Adam Jackson's avatarAdam Jackson <>
Reviewed-by: default avatarMarek Olšák <>
Reviewed-by: Emil Velikov's avatarEmil Velikov <>
Reviewed-by: Eric Engestrom's avatarEric Engestrom <>
parent 9996ddbb
Pipeline #42185 passed with stages
in 12 minutes and 53 seconds
......@@ -183,7 +183,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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment