diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-07-25 12:41:16 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2016-07-25 16:48:31 -0700 |
commit | d74b3c25796a7d43c69111082c787d821da18a7e (patch) | |
tree | 6a4044dace663c1e4db8218d2206ab081531704f | |
parent | 6635bf4534864b6dcdbc5e13ff850551a80932dc (diff) |
run: Mark shaders with only one stage as separable.sso
There are a couple cases where a single shader might happen:
- compute shaders
(only one stage, no inputs and outputs; separable shouldn't matter)
- vertex shaders with transform feedback
(we want to retain outputs, but transform feedback varyings are
specified via the API, not the shader - setting SSO fixes this)
- old shader_test files captured before we started adding "SSO ENABLED".
In any case, it seems harmless or beneficial to enable SSO for all
.shader_test files containing a single shader.
-rw-r--r-- | run.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -633,6 +633,12 @@ main(int argc, char **argv) } ctx_is_core = type == TYPE_CORE; + /* If there's only one shader, mark it separable so inputs + * and outputs aren't eliminated. + */ + if (num_shaders == 1) + use_separate_shader_objects = true; + if (type == TYPE_CORE || type == TYPE_COMPAT) { GLuint prog = glCreateProgram(); |