summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-09-06 16:13:42 +0200
committerMathias Fröhlich <[email protected]>2018-09-10 07:59:31 +0200
commit4569bc6ad084eac392411117ad1fd3bd0706af75 (patch)
tree8aba38dee24807d2d2a00a44d4512103403130e1 /src/mesa/state_tracker
parent240af6149477beb06fdcfc4b0295921448c0fe47 (diff)
gallium: New cap PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET.
Introduce a new capability for the maximum value of pipe_vertex_element::src_offset. Initially just every driver backend returns the value previously set from _mesa_init_constants. So this shall end up in no functional change. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_extensions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 661b2e499fe..798ee60875a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -404,6 +404,12 @@ void st_init_limits(struct pipe_screen *screen,
c->MaxVertexAttribStride
= screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE);
+ /* The value cannot be larger than that since pipe_vertex_buffer::src_offset
+ * is only 16 bits.
+ */
+ temp = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET);
+ c->MaxVertexAttribRelativeOffset = MIN2(0xffff, temp);
+
c->StripTextureBorder = GL_TRUE;
c->GLSLSkipStrictMaxUniformLimitCheck =