Mesa (main): tgsi: Add SEPARABLE_PROGRAM property
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 24 12:09:44 UTC 2022
Module: Mesa
Branch: main
Commit: b63403054237c3e408f2662beb52ec65db0aee30
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b63403054237c3e408f2662beb52ec65db0aee30
Author: Italo Nicola <italonicola at collabora.com>
Date: Tue Feb 15 11:09:56 2022 -0300
tgsi: Add SEPARABLE_PROGRAM property
Signed-off-by: Italo Nicola <italonicola at collabora.com>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16308>
---
src/gallium/auxiliary/tgsi/tgsi_strings.c | 1 +
src/gallium/auxiliary/tgsi/tgsi_ureg.c | 3 +++
src/gallium/include/pipe/p_shader_tokens.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index acc88966ee9..11e948c7531 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -165,6 +165,7 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
"CS_USER_DATA_COMPONENTS_AMD",
"LAYER_VIEWPORT_RELATIVE",
"FS_BLEND_EQUATION_ADVANCED",
+ "SEPARABLE_PROGRAM",
};
const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 398d59b957b..d3ba3f0dc26 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -2408,6 +2408,9 @@ ureg_setup_shader_info(struct ureg_program *ureg,
if (info->layer_viewport_relative)
ureg_property(ureg, TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE, 1);
+ if (info->separate_shader)
+ ureg_property(ureg, TGSI_PROPERTY_SEPARABLE_PROGRAM, 1);
+
switch (info->stage) {
case MESA_SHADER_VERTEX:
ureg_setup_clipdist_info(ureg, info);
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 73c9218c1f5..5c3d63c4cb1 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -303,6 +303,7 @@ enum tgsi_property_name {
TGSI_PROPERTY_CS_USER_DATA_COMPONENTS_AMD,
TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE,
TGSI_PROPERTY_FS_BLEND_EQUATION_ADVANCED,
+ TGSI_PROPERTY_SEPARABLE_PROGRAM,
TGSI_PROPERTY_COUNT,
};
More information about the mesa-commit
mailing list