Bug 868 - Reduce amount of garbage generated in Debug pipeline wrappers
Summary: Reduce amount of garbage generated in Debug pipeline wrappers
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-10-23 18:10 CEST by Harvey Harrison
Modified: 2013-10-25 01:50 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
c1bb679c5d6d36e91c146d5e075e093bc83a07f1 cf0d18c7b82801f41f6fe30f5d09b6a0a9546893 7fd9174afe73ae2a61af9a6d101afb7f21bb608b fa865a86033f64309b777dec7f557376f7f0eb46 0e79445985e23f0ff8c600137052cc446af421be
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harvey Harrison 2013-10-23 18:10:11 CEST
Currently, the debug pipeline wrappers look like:

wrapper() {
  checkContext();
  downstreamGL4bc.wrappedFunction(arg0,arg1,arg2...);
  String txt = new String("a large debug string + all args")
  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, "%s(<int> 0x%X, <int> 0x%X, <int> 0x%X)",
                 "glShaderOp1EXT", arg0, arg1, arg2);
  }
}