Skip to content

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 agomez@igalia.com

Merge request reports

Loading