[Mesa-dev] [PATCH] gallium/docs: clarify set_sampler_views

Rob Clark robdclark at gmail.com
Tue Mar 12 15:16:47 UTC 2019


This previously was not called out clearly, but based on a survey of the
code, it seems the expected behavior is to release the reference to any
sampler views beyond the new range being bound.

I think radeonsi and freedreno were the only ones not doing this.  Which
could probably temporarily leak a bit of memory by holding on to the
sampler view reference.

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/gallium/docs/source/context.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index f89d9e1005e..199d335f8f4 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -143,6 +143,9 @@ to the array index which is used for sampling.
   to a respective sampler view and releases a reference to the previous
   sampler view.
 
+  Previously bound samplers with index ``>= num_views`` are unbound rather
+  than unmodified.
+
 * ``create_sampler_view`` creates a new sampler view. ``texture`` is associated
   with the sampler view which results in sampler view holding a reference
   to the texture. Format specified in template must be compatible
-- 
2.20.1



More information about the mesa-dev mailing list