Mesa (master): gallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 16 00:42:17 UTC 2020


Module: Mesa
Branch: master
Commit: 8f191e0c37356e684fa63db76174fdaee74b6982
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f191e0c37356e684fa63db76174fdaee74b6982

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Fri Apr 10 23:45:41 2020 -0400

gallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>

---

 src/gallium/auxiliary/tgsi/tgsi_strings.c  | 1 +
 src/gallium/docs/source/tgsi.rst           | 7 +++++++
 src/gallium/include/pipe/p_shader_tokens.h | 1 +
 3 files changed, 9 insertions(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index 6b637f1f811..d6e8854a8b2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -163,6 +163,7 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
    "MUL_ZERO_WINS",
    "VS_BLIT_SGPRS_AMD",
    "CS_USER_DATA_COMPONENTS_AMD",
+   "LAYER_VIEWPORT_RELATIVE",
 };
 
 const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index bf2a508dce2..fbf6869f885 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -3804,6 +3804,13 @@ When enabled, the input for TGSI_SEMANTIC_SAMPLEMASK will exclude samples
 that have failed the depth/stencil tests. This is only valid when
 FS_EARLY_DEPTH_STENCIL is also specified.
 
+LAYER_VIEWPORT_RELATIVE
+"""""""""""""""""""""""
+
+When enabled, the TGSI_SEMATNIC_LAYER output value is relative to the
+current viewport. This is especially useful in conjunction with
+TGSI_SEMANTIC_VIEWPORT_MASK.
+
 
 Texture Sampling and Texture Formats
 ------------------------------------
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 04a34f2bc9d..7c5828ca863 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -307,6 +307,7 @@ enum tgsi_property_name {
    TGSI_PROPERTY_MUL_ZERO_WINS,
    TGSI_PROPERTY_VS_BLIT_SGPRS_AMD,
    TGSI_PROPERTY_CS_USER_DATA_COMPONENTS_AMD,
+   TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE,
    TGSI_PROPERTY_COUNT,
 };
 



More information about the mesa-commit mailing list