Nouveau Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [Bug 109330] GL_ALPHA_BITS set to non-zero with EGL_PLATFORM_GBM_MESA
Date: Mon, 21 Jan 2019 00:30:26 +0000	[thread overview]
Message-ID: <bug-109330-8800-M2jfo4dzso@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-109330-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>


[-- Attachment #1.1: Type: text/plain, Size: 1832 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=109330

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NOTOURBUG

--- Comment #5 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
As per my comments on IRC, I think this is a wlroots bug:
drm_connector_set_mode calls init_drm_plane_surfaces (which in turn creates a
gbm surface) with GBM_FORMAT_XRGB8888. Flipping that to ARGB8888 resolves the
issue.

As per my understanding, the config has to match the surface format, otherwise
you get stuff like this. (At the extreme, imagine one said RGB10A2.)

The more detailed issue is that the winsys fb calls dri2_drm_image_get_buffers
(via the getBuffers loader API call), which in turn uses the surface's format
to create a backing bo. That format is XRGB8888, which becomes
PIPE_FORMAT_BGRX8888_UNORM. The pipe_surface also has this format. However the
GL believes that the format should be MESA_FORMAT_BGRA8888 (since that's what
the config said), and since that matches the glReadPixels format, decides it
can just do a memcpy.

Perhaps the pipe_surface should ignore the resource's format in this case, but
that's not how the current logic flows. In st_framebuffer_validate, it calls
u_surface_default_template which copies the format out of the given resource.
AFAIK having mismatches between surface format and config format is really bad
though, and not really supported. But I'm not a gbm API expert.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3330 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2019-01-21  0:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 13:59 [Bug 109330] New: GL_ALPHA_BITS set to non-zero with EGL_PLATFORM_GBM_MESA bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-109330-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2019-01-13  0:29   ` [Bug 109330] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-13  2:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-13  3:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-13 16:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-21  0:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ [this message]
2019-01-22 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-22 13:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109330-8800-M2jfo4dzso@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon-cc+yj3umiyqdupfqwhejaq@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox