[Mesa-dev] [PATCH 01/19] gallium: add tessellation shader types
Marek Olšák
maraeo at gmail.com
Sun May 10 09:14:15 PDT 2015
On Sun, May 3, 2015 at 12:19 PM, Glenn Kennard <glenn.kennard at gmail.com> wrote:
> On Sat, 02 May 2015 22:16:25 +0200, Ilia Mirkin <imirkin at alum.mit.edu>
> wrote:
>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>> src/gallium/auxiliary/tgsi/tgsi_info.c | 4 ++++
>> src/gallium/auxiliary/tgsi/tgsi_strings.c | 4 +++-
>> src/gallium/auxiliary/tgsi/tgsi_strings.h | 2 +-
>> src/gallium/include/pipe/p_defines.h | 6 ++++--
>> src/gallium/include/pipe/p_shader_tokens.h | 4 +++-
>> 5 files changed, 15 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c
>> b/src/gallium/auxiliary/tgsi/tgsi_info.c
>> index 3cab86e..eb447cb 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_info.c
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
>> @@ -302,6 +302,10 @@ tgsi_get_processor_name( uint processor )
>> return "fragment shader";
>> case TGSI_PROCESSOR_GEOMETRY:
>> return "geometry shader";
>> + case TGSI_PROCESSOR_TESSCTRL:
>> + return "tessellation control shader";
>> + case TGSI_PROCESSOR_TESSEVAL:
>> + return "tessellation evaluation shader";
>> default:
>> return "unknown shader type!";
>> }
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c
>> b/src/gallium/auxiliary/tgsi/tgsi_strings.c
>> index 9b727cf..e712f30 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
>> @@ -32,11 +32,13 @@
>> #include "tgsi_strings.h"
>> -const char *tgsi_processor_type_names[4] =
>> +const char *tgsi_processor_type_names[6] =
>
>
> Don't forget to update the declaration in tgsi_strings.h
>
>> {
>> "FRAG",
>> "VERT",
>> "GEOM",
>> + "TESSC",
>> + "TESSE",
>
>
> A bit silly to shorten these when the dumps dedicate an entire line for
> printing the name.
>
>> "COMP"
>> };
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.h
>> b/src/gallium/auxiliary/tgsi/tgsi_strings.h
>> index 90014a2..71e7437 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_strings.h
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.h
>> @@ -38,7 +38,7 @@ extern "C" {
>> #endif
>> -extern const char *tgsi_processor_type_names[4];
>> +extern const char *tgsi_processor_type_names[6];
>> extern const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT];
>> diff --git a/src/gallium/include/pipe/p_defines.h
>> b/src/gallium/include/pipe/p_defines.h
>> index 67f48e4..48c182f 100644
>> --- a/src/gallium/include/pipe/p_defines.h
>> +++ b/src/gallium/include/pipe/p_defines.h
>> @@ -404,8 +404,10 @@ enum pipe_flush_flags
>> #define PIPE_SHADER_VERTEX 0
>> #define PIPE_SHADER_FRAGMENT 1
>> #define PIPE_SHADER_GEOMETRY 2
>> -#define PIPE_SHADER_COMPUTE 3
>> -#define PIPE_SHADER_TYPES 4
>> +#define PIPE_SHADER_TESSCTRL 3
>> +#define PIPE_SHADER_TESSEVAL 4
>
>
> Most of the gallium names are typed out without contractions, ie
> PIPE_SHADER_TESSELLATION_CONTROL/EVALUATION
I'd like the names to be the same as Mesa core.
Marek
More information about the mesa-dev
mailing list