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 <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
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_*");
}
* ``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:
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,
};
/**
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 =