[virglrenderer-devel] [PATCH 02/19] tgsi: update property support
Dave Airlie
airlied at gmail.com
Fri Jun 8 05:14:06 UTC 2018
From: Dave Airlie <airlied at redhat.com>
This pulls in the latest TGSI properties.
---
src/gallium/auxiliary/tgsi/tgsi_strings.c | 7 +++++++
src/gallium/auxiliary/tgsi/tgsi_text.c | 22 ++++++++++++++++++++++
src/gallium/include/pipe/p_shader_tokens.h | 9 ++++++++-
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index b1995c0..af040cf 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -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] =
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index c1b1916..d42fe5d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1601,6 +1601,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 )
{
@@ -1655,6 +1671,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] )) {
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 0ff543e..a24105b 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -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 */
--
2.14.3
More information about the virglrenderer-devel
mailing list