Mesa (master): tgsi: improve comment on tgsi_util_get_shadow_ref_src_index ()

Brian Paul brianp at kemper.freedesktop.org
Wed Dec 27 04:47:38 UTC 2017


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

Author: Brian Paul <brianp at vmware.com>
Date:   Sun Dec 24 15:37:09 2017 -0700

tgsi: improve comment on tgsi_util_get_shadow_ref_src_index()

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Neha Bhende <bhenden at vmware.com>
Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/auxiliary/tgsi/tgsi_util.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 78a5413b9d..a78172a848 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -506,8 +506,12 @@ tgsi_util_get_texture_coord_dim(enum tgsi_texture_type tgsi_tex)
 
 
 /**
- * Given a TGSI_TEXTURE_x target, return the src register index for the
- * shadow reference coordinate.
+ * Given a TGSI_TEXTURE_x target, return register component where the
+ * shadow reference/distance coordinate is found.  Typically, components
+ * 0 and 1 are the (s,t) texcoords and component 2 or 3 hold the shadow
+ * reference value.  But if we return 4, it means the reference value is
+ * found in the 0th component of the second coordinate argument to the
+ * TEX2 instruction.
  */
 int
 tgsi_util_get_shadow_ref_src_index(enum tgsi_texture_type tgsi_tex)




More information about the mesa-commit mailing list