tgsi: update property support

This pulls in the latest TGSI properties.

Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Dave Airlie 7 years ago
parent 9f5a36b8a2
commit 0b68941405
  1. 7
      src/gallium/auxiliary/tgsi/tgsi_strings.c
  2. 22
      src/gallium/auxiliary/tgsi/tgsi_text.c
  3. 9
      src/gallium/include/pipe/p_shader_tokens.h

@ -140,6 +140,13 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
"TES_POINT_MODE",
"NUM_CLIPDIST_ENABLED",
"NUM_CULLDIST_ENABLED",
"FS_EARLY_DEPTH_STENCIL",
"FS_POST_DEPTH_COVERAGE",
"NEXT_SHADER",
"CS_FIXED_BLOCK_WIDTH",
"CS_FIXED_BLOCK_HEIGHT",
"CS_FIXED_BLOCK_DEPTH",
"MUL_ZERO_WINS",
};
const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =

@ -1609,6 +1609,22 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
return FALSE;
}
static boolean
parse_property_next_shader( const char **pcur, uint *next_shader )
{
uint i;
for (i = 0; i < ARRAY_SIZE(tgsi_processor_type_names); i++) {
const char *cur = *pcur;
if (str_match_nocase_whole( &cur, tgsi_processor_type_names[i])) {
*next_shader = i;
*pcur = cur;
return TRUE;
}
}
return FALSE;
}
static boolean parse_property( struct translate_ctx *ctx )
{
@ -1663,6 +1679,12 @@ static boolean parse_property( struct translate_ctx *ctx )
return FALSE;
}
break;
case TGSI_PROPERTY_NEXT_SHADER:
if (!parse_property_next_shader(&ctx->cur, &values[0] )) {
report_error( ctx, "Unknown next shader property value." );
return FALSE;
}
break;
case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
default:
if (!parse_uint(&ctx->cur, &values[0] )) {

@ -273,7 +273,14 @@ union tgsi_immediate_data
#define TGSI_PROPERTY_TES_POINT_MODE 14
#define TGSI_PROPERTY_NUM_CLIPDIST_ENABLED 15
#define TGSI_PROPERTY_NUM_CULLDIST_ENABLED 16
#define TGSI_PROPERTY_COUNT 17
#define TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL 17
#define TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE 18
#define TGSI_PROPERTY_NEXT_SHADER 19
#define TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH 20
#define TGSI_PROPERTY_CS_FIXED_BLOCK_HEIGHT 21
#define TGSI_PROPERTY_CS_FIXED_BLOCK_DEPTH 22
#define TGSI_PROPERTY_MUL_ZERO_WINS 23
#define TGSI_PROPERTY_COUNT 24
struct tgsi_property {
unsigned Type : 4; /**< TGSI_TOKEN_TYPE_PROPERTY */

Loading…
Cancel
Save