swr: always enable adding start/base vertex to gl_VertexId
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 13 Nov 2016 02:02:20 +0000 (21:02 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 16 Nov 2016 01:26:29 +0000 (20:26 -0500)
Fixes gl-3.2-basevertex-vertexid

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/swr_state.cpp

index c1beeebeda1e2d9349fa38931766746866bafcd4..d64211e0f942664cd935181b13c2df4e8aaf3436 100644 (file)
@@ -455,6 +455,7 @@ swr_create_vertex_elements_state(struct pipe_context *pipe,
    assert(num_elements <= PIPE_MAX_ATTRIBS);
    velems = CALLOC_STRUCT(swr_vertex_element_state);
    if (velems) {
+      velems->fsState.bVertexIDOffsetEnable = true;
       velems->fsState.numAttribs = num_elements;
       for (unsigned i = 0; i < num_elements; i++) {
          // XXX: we should do this keyed on the VS usage info