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

Author: Rhys Perry <[email protected]>
Date:   Tue Nov  7 15:59:39 2023 +0000

ac/gpu_info: update conformant_trunc_coord comment

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25911>

---

 src/amd/common/ac_gpu_info.h | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h
index 80ef7ac1e7a..2303c06be21 100644
--- a/src/amd/common/ac_gpu_info.h
+++ b/src/amd/common/ac_gpu_info.h
@@ -121,14 +121,20 @@ struct radeon_info {
    /* conformant_trunc_coord is equal to TA_CNTL2.TRUNCATE_COORD_MODE, which 
exists since gfx11.
     *
     * If TA_CNTL2.TRUNCATE_COORD_MODE == 0, coordinate truncation is the same 
as gfx10 and older.
-    * If TA_CNTL2.TRUNCATE_COORD_MODE == 1, coordinate truncation is adjusted 
to be conformant
-    * if you also set TRUNC_COORD.
     *
-    * Behavior:
-    *    truncate_coord_xy = TRUNC_COORD &&
-    *                        ((xy_filter == Point && !gather) || 
!TA_CNTL2.TRUNCATE_COORD_MODE);
-    *    truncate_coord_z = TRUNC_COORD && (z_filter == Point || 
!TA_CNTL2.TRUNCATE_COORD_MODE);
-    *    truncate_coord_layer = TRUNC_COORD && !TA_CNTL2.TRUNCATE_COORD_MODE;
+    * If TA_CNTL2.TRUNCATE_COORD_MODE == 1, coordinate truncation is adjusted 
to be D3D9/GL/Vulkan
+    * conformant if you also set TRUNC_COORD. Coordinate truncation uses 
D3D10+ behaviour if
+    * TRUNC_COORD is unset.
+    *
+    * Behavior if TA_CNTL2.TRUNCATE_COORD_MODE == 1:
+    *    truncate_coord_xy = TRUNC_COORD && (xy_filter == Point && !gather);
+    *    truncate_coord_z = TRUNC_COORD && (z_filter == Point);
+    *    truncate_coord_layer = false;
+    *
+    * Behavior if TA_CNTL2.TRUNCATE_COORD_MODE == 0:
+    *    truncate_coord_xy = TRUNC_COORD;
+    *    truncate_coord_z = TRUNC_COORD;
+    *    truncate_coord_layer = TRUNC_COORD;
     *
     * AnisoPoint is treated as Point.
     */

Reply via email to