<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1402</bug_id>
          
          <creation_ts>2019-11-27 23:01:42 +0100</creation_ts>
          <short_desc>Mesa 18.3.6 issues mixing EGL_DEFAULT_DISPLAY and GBM device on EGL_PLATFORM_GBM_KHR</short_desc>
          <delta_ts>2019-11-28 02:07:29 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>embedded</component>
          <version>2.4.0</version>
          <rep_platform>embedded_all</rep_platform>
          <op_sys>linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>1156</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>ANNOTATION</cf_type>
          <cf_scm_refs>d7469d4fcbc6d92a696b90b52a75a233d4a30e5c</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6339</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-11-27 23:01:42 +0100</bug_when>
    <thetext>This issues occurs using eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, ..) on Mesa 18.3.6.

1st Round
------------
First a surfaceless EGL context using an EGL display with EGL_DEFAULT_DISPLAY
was created, which resulted in a proper capabilities readout as well
as produced matching GL ES profile properties.
This is executed in EGLDrawableFactory&apos;s GL profile probing.

2nd Round
----------
Afterwards an EGL display has been used with an actual GBM device,
created via gbm_create_device(..);
Here intention is to use a GBM surface via gbm_surface_create for the EGLSurface.
However, even the resulting EGLConfig elements retrieved to match the 
GBM visualID differed from the 1st Round (see above).
Continued execution uses a GBM surface via gbm_surface_create for the EGLSurface.
The issue disclosed that from here on, GBM used a dumb buffer w/o hardware acceleration.
Subsequent ioctl DRM calls drmModeSetCrtc(..) and drmModePageFlip(..) failed with the system error message &apos;Permission denied&apos;.

Workaround
===========
In the 1st Round using an actual GBM device created via gbm_create_device(..)
instead of using EGL_DEFAULT_DISPLAY works around this issue.

+++

I believe the desired behavior should be to allow EGL_DEFAULT_DISPLAY also within GBM operations, as it worked well in the 1st Round but failed in the 2nd Round using the GBM device.

Type &apos;ANNOTATION&apos; to document this issue being only referenced here, but caused by an external component -&gt; Mesa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6341</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-11-28 02:07:08 +0100</bug_when>
    <thetext>commit d7469d4fcbc6d92a696b90b52a75a233d4a30e5c

Standalone native test attempting to reproduce issue
        
Interestingly, the issue is no more reproducible. Weird.
    
However, it is advised to use a real GBM device handle for EGL display creation
under EGL_PLATFORM_GBM_KHR.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>