<?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>868</bug_id>
          
          <creation_ts>2013-10-23 18:10:11 +0200</creation_ts>
          <short_desc>Reduce amount of garbage generated in Debug pipeline wrappers</short_desc>
          <delta_ts>2013-10-25 01:50:05 +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>core</component>
          <version>2</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>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harvey Harrison">harvey.harrison</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>c1bb679c5d6d36e91c146d5e075e093bc83a07f1
cf0d18c7b82801f41f6fe30f5d09b6a0a9546893
7fd9174afe73ae2a61af9a6d101afb7f21bb608b
fa865a86033f64309b777dec7f557376f7f0eb46
0e79445985e23f0ff8c600137052cc446af421be</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3169</commentid>
    <comment_count>0</comment_count>
    <who name="Harvey Harrison">harvey.harrison</who>
    <bug_when>2013-10-23 18:10:11 +0200</bug_when>
    <thetext>Currently, the debug pipeline wrappers look like:

wrapper() {
  checkContext();
  downstreamGL4bc.wrappedFunction(arg0,arg1,arg2...);
  String txt = new String(&quot;a large debug string + all args&quot;)
  checkGLError(txt);
}

Change to a format based string, and add a check-only fucntion
to allow an allocation-free fastpath for the success cases:

wrapper() {
  checkContext();
  downstreamGL4bc.glShaderOp1EXT(arg0,arg1,arg2);
  int err = checkGLError();
  if (err != GL_NO_ERROR) {
    writeGLError(err, &quot;%s(&lt;int&gt; 0x%X, &lt;int&gt; 0x%X, &lt;int&gt; 0x%X)&quot;,
                 &quot;glShaderOp1EXT&quot;, arg0, arg1, arg2);
  }
}</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>