[Mesa-dev] [PATCH shader-db 3/4] run: don't eliminate inputs and outputs for separate shaders

Ilia Mirkin imirkin at alum.mit.edu
Thu Jun 30 15:06:08 UTC 2016


This doesn't account for programs with multiple stages that are SSO. I
think you just need the "SSO ENABLED" flag in those (which run.c
hopefully supports, but if not, that should be added).

On Thu, Jun 30, 2016 at 11:03 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
>  run.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/run.c b/run.c
> index a2639f7..9986a63 100644
> --- a/run.c
> +++ b/run.c
> @@ -627,6 +627,10 @@ main(int argc, char **argv)
>              if (type == TYPE_CORE || type == TYPE_COMPAT) {
>                  GLuint prog = glCreateProgram();
>
> +                /* Don't eliminate inputs and outputs. */
> +                if (num_shaders == 1)
> +                    glProgramParameteri(prog, GL_PROGRAM_SEPARABLE, GL_TRUE);
> +
>                  for (unsigned i = 0; i < num_shaders; i++) {
>                      GLuint s = glCreateShader(shader[i].type);
>                      glShaderSource(s, 1, &shader[i].text, &shader[i].length);
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list