[Mesa-dev] [RFC 0/3] V2: Improve GLSL support of GL_ARB_separate_shader_objects

Gregory Hainaut gregory.hainaut at gmail.com
Sat Oct 3 02:31:17 PDT 2015


> In short, SSO allow to match by name but you can't make any hypothesis on the
> previous/next stage. Therefore you must consider all inputs and output as 
> actives.

New version based on Ian's feedbacks.
* Real interstage variables of the program are still optimized
* Both output and input of the program remains active
* An old bug still remains if name and explicit location rendezvous are mixed

Commits decription:
1/ add a not_interstage parameter that will be 1 when variable is either an
   input of output of the program. I didn't know where to put the ir_set_not_interstage_io
   function. Maybe it can be moved in linker.cpp.
2/ Set the interstage parameter based on the shader position in the pipeline 
   program. Potentially can be squased with the previous one.
3/ Don't do deadcode removal of not_interstage variable with the exception
   of the built-in varyings because they don't impact location of others variables

Gregory Hainaut (4):
  glsl IR: add not_interstage attribute to ir_variable
  glsl link: annotate not_interstage attribute of the ir_var after link
    phase
  glsl IR: only allow optimization of interstage variable
  allow compilation on my system

 configure.ac               |  6 ++++--
 src/glsl/ir.h              |  6 ++++++
 src/glsl/ir_optimization.h |  2 ++
 src/glsl/linker.cpp        | 47 ++++++++++++++++++++++++++++++++++++++++++++++
 src/glsl/opt_dead_code.cpp | 37 ++++++++++++++++++++++++++++++++++++
 5 files changed, 96 insertions(+), 2 deletions(-)

-- 
2.1.4



More information about the mesa-dev mailing list