gallium/winsys/kms: Fix dumb buffer bpp
authorKevin Strasser <kevin.strasser@intel.com>
Thu, 30 May 2019 19:37:07 +0000 (12:37 -0700)
committerKevin Strasser <kevin.strasser@intel.com>
Wed, 12 Jun 2019 18:44:10 +0000 (11:44 -0700)
commitec0a68e50dd3ebfbeee77670d7d09184d0907ead
tree0c8e4f3c8ed98e50d575014040dbeb387df83e56
parent9996ddbb27c9eb39cd234a4abce6c3742572c770
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: 3b176c441b "gallium: Add a dumb drm/kms winsys backed swrast provider"
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c