• Kenneth Graunke's avatar
    run: Add separate shader objects support. · aa14141c
    Kenneth Graunke authored
    With this patch, if a .shader_test file contains
    
        [require]
        ...
        SSO ENABLED
    
    then we'll use glCreateShaderProgramv to create each shader, so that
    they're compiled as separate shader objects.  This prevents the linker
    from removing unused inputs and outputs.  Drivers may also choose to lay
    out interfaces of SSO programs differently, resulting in different code.
    
    v2:
    - Actually initialize use_separate_shader_objects
    - Fix memcmp length parameter (thanks to Matt)
    
    v3:
    - Search for "SSO ENABLED" instead of "GL_ARB_separate_shader_objects",
      to match what Timothy did in shader_runner.
    - Use GL_PROGRAM_SEPARABLE (suggested by Tapani).  This allows
      multi-stage SSO programs to optimize internal interfaces, while
      still making the end-stages separable.
    
    v4:
    - Go back to glCreateShaderProgramv.  Timothy pointed out that Piglit's
      shader_runner compiles each shader separately, and wouldn't optimize
      interfaces between programs.  I want to preserve the same semantics
      between both .shader_test file processors.  Today, it looks like
      multi-stage SSO programs are pretty uncommon (typically every stage
      is separable), so we'll punt on solving that until later.
    Acked-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
    Acked-by: default avatarTimothy Arceri <timothy.arceri@collabora.com>
    aa14141c
Name
Last commit
Last update
licenses Loading commit data...
shaders Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
README Loading commit data...
check_dependencies.pl Loading commit data...
fd-report.py Loading commit data...
nv-report.py Loading commit data...
report.py Loading commit data...
run.c Loading commit data...
run.py Loading commit data...
si-report.py Loading commit data...