Mesa (master): swr: report a reasonable max lod bias

Ilia Mirkin imirkin at kemper.freedesktop.org
Wed Nov 23 01:29:34 UTC 2016


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

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sat Nov 19 10:10:47 2016 -0500

swr: report a reasonable max lod bias

This is the same value that llvmpipe uses. Since swr uses the same
sampler logic, makes sense for this value to also be the same. Most
applications don't care.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com>

---

 src/gallium/drivers/swr/swr_screen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index f7125ee..194b8f0 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -406,7 +406,7 @@ swr_get_paramf(struct pipe_screen *screen, enum pipe_capf param)
    case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
       return 0.0;
    case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:
-      return 0.0;
+      return 16.0; /* arbitrary */
    case PIPE_CAPF_GUARD_BAND_LEFT:
    case PIPE_CAPF_GUARD_BAND_TOP:
    case PIPE_CAPF_GUARD_BAND_RIGHT:




More information about the mesa-commit mailing list