dri3: remove bogus condition for creating pixmap
PATCH 1/1 dri3: remove bogus condition for creating pixmap
Not clear what the depth % 8 was trying to protect against, but it was breaking 30bpp visuals with DRI3.
--- src/nouveau_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/nouveau_dri2.c +1 -1
@@ -1076,7 +1076,7 @@ static PixmapPtr nouveau_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 wistruct nouveau_bo *bo =NULL ;struct nouveau_pixmap *nvpix; -if (depth <8 || depth >32 || depth %8 ) +if (depth <8 || depth >32 )return NULL ; pixmap = screen->CreatePixmap (screen,0 ,0 , depth,0 );
Signature · 6 lines
2.13.6 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20171231072329.7452-1-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]
Quoted 2 lines · Ilia Mirkin
Not clear what the depth % 8 was trying to protect against, but it was breaking 30bpp visuals with DRI3.
Erm, actually switching to my test config which doesn't enable dri3 is what "fixed" things. DRI3 is still busted. Ignore this patch until that's properly figured out for 30bpp.
Quoted 20 lines
Signed-off-by Ilia Mirkin <[email protected]>--- src/nouveau_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/nouveau_dri2.c +1
-2@@ -1076,7 +1076,7 @@ static PixmapPtr nouveau_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 wistruct nouveau_bo *bo =NULL ;struct nouveau_pixmap *nvpix; -if (depth <8 || depth >32 || depth %8 ) +if (depth <8 || depth >32 )return NULL ; pixmap = screen->CreatePixmap (screen,0 ,0 , depth,0 ); --
Quoted 2 lines
2.13.6
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 7 lines · Ilia Mirkin
Quoted 2 lines · Ilia Mirkin
Not clear what the depth % 8 was trying to protect against, but it was breaking 30bpp visuals with DRI3.
Erm, actually switching to my test config which doesn't enable dri3 is what "fixed" things. DRI3 is still busted. Ignore this patch until that's properly figured out for 30bpp.
So actually it does seem like DRI3 works fine now. After a lot of tracing, looks like bitsPerPixel will still get set to 32 in this case, so a lot of the code that does like bitsPerPixel / 8 should remain OK. I'm following up with a patch which also ensures that the pixmap->drawable.bitsPerPixel % 8 == 0. Presumably that's what was trying to be checked earlier.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Ilia Mirkin <[email protected]>--- src/nouveau_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/nouveau_dri2.c +0
-0@@ -1076,7 +1076,7 @@ static PixmapPtr nouveau_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 wistruct nouveau_bo *bo =NULL ;struct nouveau_pixmap *nvpix;
Quoted 8 lines
Quoted 8 lines
src/nouveau_dri2.c +1
-2-if (depth <8 || depth >32 || depth %8 ) +if (depth <8 || depth >32 )return NULL ; pixmap = screen->CreatePixmap (screen,0 ,0 , depth,0 ); --2.13.6
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau