[Mesa-dev] [PATCH] nir: Store the size of the TCS output patch in nir_shader_info.

Jason Ekstrand jason at jlekstrand.net
Tue Nov 17 15:55:57 PST 2015


Seems reasonable,

Reviewed-by: Jason Ekstrand <jason.ekstrand at inte.com>

On Tue, Nov 17, 2015 at 3:16 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/glsl/nir/glsl_to_nir.cpp | 4 ++++
>  src/glsl/nir/nir.h           | 5 +++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
> index 6d24341..c4b53f3 100644
> --- a/src/glsl/nir/glsl_to_nir.cpp
> +++ b/src/glsl/nir/glsl_to_nir.cpp
> @@ -167,6 +167,10 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
>        shader_prog->TransformFeedback.NumVarying > 0;
>
>     switch (stage) {
> +   case MESA_SHADER_TESS_CTRL:
> +      shader->info.tcs.vertices_out = shader_prog->TessCtrl.VerticesOut;
> +      break;
> +
>     case MESA_SHADER_GEOMETRY:
>        shader->info.gs.vertices_in = shader_prog->Geom.VerticesIn;
>        shader->info.gs.output_primitive = sh->Geom.OutputType;
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index beabcaf..46add22 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -1544,6 +1544,11 @@ typedef struct nir_shader_info {
>        struct {
>           unsigned local_size[3];
>        } cs;
> +
> +      struct {
> +         /** The number of vertices in the TCS output patch. */
> +         unsigned vertices_out;
> +      } tcs;
>     };
>  } nir_shader_info;
>
> --
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list