Mesa (master): softpipe: set a lower minimum clamp value for texture coordinate border clamp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 18 04:09:46 UTC 2019


Module: Mesa
Branch: master
Commit: 230b99ce2f75afadab475a021c7fb51574878f9f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=230b99ce2f75afadab475a021c7fb51574878f9f

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Mon Jul 15 12:51:06 2019 +0200

softpipe: set a lower minimum clamp value for texture coordinate border clamp

The value of -0.5f is not small enough to produce negative coordinates,
so lower the minimum clamp value to -1.0f. This fixes a number of tests
from
   dEQP-GLES31.functional.texture.border_clamp.*

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/drivers/softpipe/sp_tex_sample.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index a3a047b9502..88636459454 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -318,7 +318,7 @@ static void
 wrap_linear_clamp_to_border(float s, unsigned size, int offset,
                             int *icoord0, int *icoord1, float *w)
 {
-   const float min = -0.5F;
+   const float min = -1.0F;
    const float max = (float)size + 0.5F;
    const float u = CLAMP(s * size + offset, min, max) - 0.5f;
    *icoord0 = util_ifloor(u);




More information about the mesa-commit mailing list