[Mesa-dev] [PATCH 5/5] tgsi/ureg: enable creating tessellation shaders with ureg_create_shader
Ilia Mirkin
imirkin at alum.mit.edu
Sun May 24 08:37:20 PDT 2015
Series is: Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Sun, May 24, 2015 at 5:47 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/gallium/auxiliary/tgsi/tgsi_ureg.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> index 7a8bf54..037d31a 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
> @@ -1667,10 +1667,20 @@ void *ureg_create_shader( struct ureg_program *ureg,
> else
> memset(&state.stream_output, 0, sizeof(state.stream_output));
>
> - if (ureg->processor == TGSI_PROCESSOR_VERTEX)
> - return pipe->create_vs_state( pipe, &state );
> - else
> - return pipe->create_fs_state( pipe, &state );
> + switch (ureg->processor) {
> + case TGSI_PROCESSOR_VERTEX:
> + return pipe->create_vs_state(pipe, &state);
> + case TGSI_PROCESSOR_TESS_CTRL:
> + return pipe->create_tcs_state(pipe, &state);
> + case TGSI_PROCESSOR_TESS_EVAL:
> + return pipe->create_tes_state(pipe, &state);
> + case TGSI_PROCESSOR_GEOMETRY:
> + return pipe->create_gs_state(pipe, &state);
> + case TGSI_PROCESSOR_FRAGMENT:
> + return pipe->create_fs_state(pipe, &state);
> + default:
> + return NULL;
> + }
> }
>
>
> --
> 2.1.0
>
> _______________________________________________
> 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