From 7e1e18aca214a8705270972131a1800c81bc3b4d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 6 Jun 2013 21:40:30 +0100 Subject: sna/video: Fixup formats to select visuals Fixes regression from commit 195a51353c3af7bd253227da5f759f06cea01f73 [2.21.8] Author: Chris Wilson Date: Tue Apr 9 19:13:46 2013 +0100 sna/video: Convert to a pure Xv backend Reported-by: Edward Sheldrake Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65479 Signed-off-by: Chris Wilson --- src/sna/sna_video_textured.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/sna/sna_video_textured.c') diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index 70f1f6e0..96f4f55a 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -38,8 +38,8 @@ static Atom xvBrightness, xvContrast, xvSyncToVblank; -static const XvFormatRec Formats[] = { - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} +static XvFormatRec Formats[] = { + {15}, {16}, {24} }; static const XvAttributeRec Attributes[] = { @@ -367,8 +367,9 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen) adaptor->pEncodings[0].height = sna->render.max_3d_size; adaptor->pEncodings[0].rate.numerator = 1; adaptor->pEncodings[0].rate.denominator = 1; - adaptor->nFormats = ARRAY_SIZE(Formats); adaptor->pFormats = Formats; + adaptor->nFormats = sna_xv_fixup_formats(screen, Formats, + ARRAY_SIZE(Formats)); adaptor->nAttributes = ARRAY_SIZE(Attributes); adaptor->pAttributes = Attributes; adaptor->nImages = ARRAY_SIZE(Images); -- cgit v1.2.3