-
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 <imirkin@alum.mit.edu> Acked-by: Timothy Arceri <timothy.arceri@collabora.com>
aa14141c