Mesa (main): freedreno/a6xx: Name texture descriptor bit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 21 21:24:18 UTC 2022


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Tue Jan 18 18:46:49 2022 +0100

freedreno/a6xx: Name texture descriptor bit

This appears to do the same thing as CLAMPENABLE on a3xx. That is, it
clamps the result to [0, 1] for unorm formats and [-1, 1] for snorm
formats *after* filtering. In particular it's now more easily observable
with cubic filtering, because cubic filtering can produce values outside
the original range. Presumably this only matters with linear filtering
due to rounding errors when computing the weighted average.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14613>

---

 src/freedreno/registers/adreno/a6xx.xml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/registers/adreno/a6xx.xml b/src/freedreno/registers/adreno/a6xx.xml
index 567eb46385c..c9e1b77d43c 100644
--- a/src/freedreno/registers/adreno/a6xx.xml
+++ b/src/freedreno/registers/adreno/a6xx.xml
@@ -3753,8 +3753,13 @@ to upconvert to 32b float internally?
 		<bitfield name="LOD_BIAS" low="19" high="31" type="fixed" radix="8"/><!-- no idea how many bits for real -->
 	</reg32>
 	<reg32 offset="1" name="1">
-		<!-- bit 0 always set with vulkan? -->
-		<bitfield name="UNK0" pos="0" type="boolean"/>
+		<bitfield name="CLAMPENABLE" pos="0" type="boolean">
+			<doc>
+				clamp result to [0, 1] if the format is unorm or
+				[-1, 1] if the format is snorm, *after*
+				filtering. Has no effect for other formats.
+			</doc>
+		</bitfield>
 		<bitfield name="COMPARE_FUNC" low="1" high="3" type="adreno_compare_func"/>
 		<bitfield name="CUBEMAPSEAMLESSFILTOFF" pos="4" type="boolean"/>
 		<bitfield name="UNNORM_COORDS" pos="5" type="boolean"/>



More information about the mesa-commit mailing list