[Mesa-dev] [PATCH] gallium: Set the default GL_SUBPIXEL_BITS to 4.

Roland Scheidegger sroland at vmware.com
Wed Sep 5 23:26:37 UTC 2018


I really think it makes no sense to hack some more around this.

GLES (even 3.2) doesn't even support non-integer viewports.
As I mentioned before, it's incorrect to report more than 0 bits for
viewport subpixels if a driver only supports integer viewports.
To fix this for real really 2 caps would be needed, one for subpixel
bits (which can have a default of 4), and one for viewport subpixel bits
(which should be default 0), so the state tracker doesn't use the same
setting for both queries.

Roland


Am 05.09.2018 um 16:56 schrieb Eric Anholt:
> 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:
> 



More information about the mesa-dev mailing list