This is the minimum value for GLES2, and 0 certainly wouldn't be valid.
Fixes dEQP-GLES2.functional.state_query.integers.subpixel_bits_getfloat
and friends.
---
 src/gallium/auxiliary/util/u_screen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_screen.c 
b/src/gallium/auxiliary/util/u_screen.c
index d19d604e0c51..3ac2f15a5356 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -246,7 +246,11 @@ u_pipe_screen_get_param_defaults(struct pipe_screen 
*pscreen,
    case PIPE_CAP_TGSI_VOTE:
    case PIPE_CAP_MAX_WINDOW_RECTANGLES: /* Enables EXT_window_rectangles */
    case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
+      return 0;
+
    case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
+      return 4; /* GLES 2.0 minimum maximum value. */
+
    case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
    case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
    case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
-- 
2.18.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to