[Mesa-dev] [PATCH 2/2] glsl: clean up and fix bug in varying linking rules
Ilia Mirkin
imirkin at alum.mit.edu
Mon Feb 1 18:23:25 UTC 2016
On Mon, Jan 25, 2016 at 6:56 AM, Timothy Arceri
<timothy.arceri at collabora.com> wrote:
> + /* If the program is made up of only a single stage assign locations if
> + * its a SSO or remove unused inputs for a fragment only program.
> + */
> + if (first == last) {
> + gl_shader *const sh = prog->_LinkedShaders[last];
> +
> + if (prog->SeparateShader) {
> + if (!assign_varying_locations(ctx, mem_ctx, prog,
> + NULL /* producer */,
> + sh /* consumer */,
> + 0 /* num_tfeedback_decls */,
> + NULL /* tfeedback_decls */))
> + goto done;
> + } else {
> + if (first == MESA_SHADER_FRAGMENT)
> + remove_unused_shader_inputs_and_outputs(false, sh,
> + ir_var_shader_in);
> + }
Why do you do this only for fragment programs? Seems like that would
be fine generically, since you have assigned inputs to everything by
now?
-ilia
More information about the mesa-dev
mailing list