summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_screen.c3
-rw-r--r--src/gallium/docs/source/screen.rst2
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c1
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c1
-rw-r--r--src/gallium/include/pipe/p_defines.h1
-rw-r--r--src/mesa/state_tracker/st_extensions.c1
6 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index c41e28820b2..f0290d04cc5 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -254,6 +254,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_NATIVE_FENCE_FD:
return 0;
+ case PIPE_CAP_RASTERIZER_SUBPIXEL_BITS:
+ return 4; /* GLES 2.0 minimum value */
+
case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
return 1;
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 93415a5df1a..cb9d0e2a15a 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -342,6 +342,8 @@ The integer capabilities:
for ``pipe_rasterizer_state::offset_units_unscaled``.
* ``PIPE_CAP_VIEWPORT_SUBPIXEL_BITS``: Number of bits of subpixel precision for
floating point viewport bounds.
+* ``PIPE_CAP_RASTERIZER_SUBPIXEL_BITS``: Number of bits of subpixel precision used
+ by the rasterizer.
* ``PIPE_CAP_MIXED_COLOR_DEPTH_BITS``: Whether there is non-fallback
support for color/depth format combinations that use a different
number of bits. For the purpose of this cap, Z24 is treated as
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index e10704bfc17..c6311bf8c39 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -507,6 +507,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_VIEWPORTS:
return R600_MAX_VIEWPORTS;
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
+ case PIPE_CAP_RASTERIZER_SUBPIXEL_BITS:
return 8;
/* Timer queries, present when the clock frequency is non zero. */
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index d373c1a967d..60f4b07113f 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -286,6 +286,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_VIEWPORTS:
return SI_MAX_VIEWPORTS;
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
+ case PIPE_CAP_RASTERIZER_SUBPIXEL_BITS:
case PIPE_CAP_MAX_RENDER_TARGETS:
return 8;
case PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS:
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index bdd3f4680f6..3cff4d9fda5 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -774,6 +774,7 @@ enum pipe_cap
PIPE_CAP_MAX_WINDOW_RECTANGLES,
PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED,
PIPE_CAP_VIEWPORT_SUBPIXEL_BITS,
+ PIPE_CAP_RASTERIZER_SUBPIXEL_BITS,
PIPE_CAP_MIXED_COLOR_DEPTH_BITS,
PIPE_CAP_TGSI_ARRAY_COMPONENTS,
PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS,
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 244c12595ec..319eef6a729 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -111,6 +111,7 @@ void st_init_limits(struct pipe_screen *screen,
c->MaxRenderbufferSize = c->MaxTextureRectSize;
c->SubPixelBits =
+ screen->get_param(screen, PIPE_CAP_RASTERIZER_SUBPIXEL_BITS);
c->ViewportSubpixelBits =
screen->get_param(screen, PIPE_CAP_VIEWPORT_SUBPIXEL_BITS);