summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorJózef Kucia <[email protected]>2016-07-19 13:07:24 +0200
committerMarek Olšák <[email protected]>2016-07-20 12:45:31 +0200
commit3cd28fe3de203934f2bab33cce7a91da499c7376 (patch)
tree47b3358eebd90ca4cfb6ad40b79e688d892eecfd /src/mesa/state_tracker/st_extensions.c
parent3c78d89692a533879efa64f778712dfd537bd105 (diff)
gallium: add a cap for VIEWPORT_SUBPIXEL_BITS (v2)
This allows Gallium drivers to advertise the subpixel precision for floating point viewports bounds. v2: - Set ViewportSubpixelBits in st_init_limits. Signed-off-by: Józef Kucia <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d2ecc7fa593..d0e7d3840f5 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -105,6 +105,9 @@ void st_init_limits(struct pipe_screen *screen,
c->MaxViewportHeight =
c->MaxRenderbufferSize = c->MaxTextureRectSize;
+ c->ViewportSubpixelBits =
+ screen->get_param(screen, PIPE_CAP_VIEWPORT_SUBPIXEL_BITS);
+
c->MaxDrawBuffers = c->MaxColorAttachments =
_clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
1, MAX_DRAW_BUFFERS);