<?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>1390</bug_id>
          
          <creation_ts>2019-09-05 05:23:46 +0200</creation_ts>
          <short_desc>GLPixelBuffer.GLPixelAttributes::convert(GL, int, boolean) failed on unsupported GL data format/type</short_desc>
          <delta_ts>2019-09-05 05:39:36 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>opengl</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>817</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>90760ac8eebe7431ac7392e4ebf3f9009e63cd72</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6307</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-09-05 05:23:46 +0200</bug_when>
    <thetext>GLPixelBuffer.GLPixelAttributes::convert(GL, int, boolean) failed on unsupported GL data format/type

On Mesa/AMD for GLPBuffer chosen GLCaps used rgba 10/10/10/2
and the GLContext set default values:
GL_IMPLEMENTATION_COLOR_READ_FORMAT: 0x1908 GL_RGBA
GL_IMPLEMENTATION_COLOR_READ_TYPE: 0x8368 GL_UNSIGNED_INT_2_10_10_10_REV

GLPixelBuffer.GLPixelAttributes::getPixelFormat(int format, int type)
currently does not handle the type GL_UNSIGNED_INT_2_10_10_10_REV
and hence returned a null PixelFormat.

Therefor the ctor GLPixelAttributes failed and threw the exception:
&quot;Caught GLException: Could not find PixelFormat for format and/or type:
 PixelAttributes[fmt 0x1908, type 0x8368, null]&quot;

Solution is to have the GLContext default values pre-validated in the convert(..) method and to use default GL_RGBA and GL_UNSIGNED_BYTE fallback values if not supported. This is most important to be future proof.

Later we may shall add these 32bit coding 2+10+10+10 and its reverse.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6308</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2019-09-05 05:39:36 +0200</bug_when>
    <thetext>commit 90760ac8eebe7431ac7392e4ebf3f9009e63cd72</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>