Commit 8305c580 authored by Andres Gomez's avatar Andres Gomez

arb_program_interface_query: use out resource to make it active

From the GL_ARB_program_interface_query spec v.20:

  " When a program is linked, the GL builds a list of /active
    resources/ for each interface.  Examples of active resources
    include variables, interface blocks, and subroutines used by
    shader code.  Resources referenced in shader code are considered
    /active/ unless the compiler and linker can conclusively determine
    that they have no observable effect on the results produced by the
    executable code of the program.  For example, variables might be
    considered inactive if they are declared but not used in
    executable code, used only in a clause of an "if" statement that
    would never be executed, used only in functions that are never
    called, or used only in computations of temporary variables having
    no effect on any shader output.  In cases where the compiler or
    linker cannot make a conclusive determination, any resource
    referenced by shader code will be considered active.  The set of
    active resources on for any interface is implementation-dependent
    because it depends on various analysis and optimizations performed
    by the compiler and linker."

Therefore, although the determination of the active resources is
implementation dependent, it is clear that not making any kind of use
in the shader code will, most probably, make the compiler/linker
determine that the resource is inactive.
Signed-off-by: Andres Gomez's avatarAndres Gomez <>
Reviewed-by: Tapani Pälli's avatarTapani Pälli <>
Reviewed-by: Martin Peres's avatarMartin Peres <>
parent 0a218e49
......@@ -347,6 +347,7 @@ static const char tcs_sub[] =
" gl_in[0].gl_Position *"
" tes_input1[gl_InvocationID] = vs_output1[0] + TESS_CONTROL();\n"
" tcs_patch = TESS_CONTROL();\n"
static const char tes_sub[] =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment