Commit 4569bc6a authored by Mathias Fröhlich's avatar Mathias Fröhlich

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's avatarBrian Paul <brianp@vmware.com>
Reviewed-by: default avatarRoland Scheidegger <sroland@vmware.com>
Signed-off-by: Mathias Fröhlich's avatarMathias Fröhlich <Mathias.Froehlich@web.de>
parent 240af614
......@@ -323,6 +323,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
return 0;
case PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET:
return 2047;
default:
unreachable("bad PIPE_CAP_*");
}
......
......@@ -475,6 +475,8 @@ subpixel precision bias in bits during conservative rasterization.
* ``PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET: Maximum recommend memory size
for all active texture uploads combined. This is a performance hint.
0 means no limit.
* ``PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET``: The maximum supported value for
of pipe_vertex_element::src_offset.
.. _pipe_capf:
......
......@@ -824,6 +824,7 @@ enum pipe_cap
PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS,
PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS,
PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET,
PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET,
};
/**
......
......@@ -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 =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment