asahi: be explicit about LOD clamps

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
This commit is contained in:
Alyssa Rosenzweig
2024-10-07 12:16:19 -04:00
parent c8f8e2e19d
commit 2a2889b72e
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -337,7 +337,7 @@
<struct name="Sampler" size="8">
<field name="Minimum LOD" size="10" start="0" type="lod" default="0.0"/>
<field name="Maximum LOD" size="10" start="10" type="lod" default="INFINITY"/>
<field name="Maximum LOD" size="10" start="10" type="lod"/>
<field name="Maximum anisotropy" size="3" start="20" type="uint" default="1" modifier="log2"/>
<field name="Magnify" size="2" start="23" type="Filter"/>
<field name="Minify" size="2" start="25" type="Filter"/>
+2
View File
@@ -54,6 +54,8 @@ agx_pack_txf_sampler(struct agx_sampler_packed *out)
{
agx_pack(out, SAMPLER, cfg) {
/* Allow mipmapping. This is respected by txf, weirdly. */
cfg.minimum_lod = 0.0;
cfg.maximum_lod = INFINITY;
cfg.mip_filter = AGX_MIP_FILTER_NEAREST;
/* Out-of-bounds reads must return 0 */
+2
View File
@@ -3257,6 +3257,8 @@ agx_build_bg_eot(struct agx_batch *batch, bool store, bool partial_render)
agx_pool_alloc_aligned(&batch->pool, AGX_SAMPLER_LENGTH, 64);
agx_pack(sampler.cpu, SAMPLER, cfg) {
cfg.minimum_lod = 0.0f;
cfg.maximum_lod = INFINITY;
cfg.magnify = AGX_FILTER_LINEAR;
cfg.minify = AGX_FILTER_NEAREST;
cfg.mip_filter = AGX_MIP_FILTER_NONE;