tgsi: improve comment on tgsi_util_get_shadow_ref_src_index()
authorBrian Paul <brianp@vmware.com>
Sun, 24 Dec 2017 22:37:09 +0000 (15:37 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 27 Dec 2017 04:44:33 +0000 (21:44 -0700)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_util.c

index 78a5413b9d710188eaecf2ea1d358f81f84d00ce..a78172a8486b06858047a9c40137b22898ea1d1f 100644 (file)
@@ -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)