diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index c1c0a464c7e..ec8683748ea 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -746,7 +746,8 @@ struct pipe_draw_info { enum pipe_prim_type mode:8; /**< the mode of the primitive */ ubyte vertices_per_patch; /**< the number of vertices per patch */ - ubyte index_size; /**< if 0, the draw is not indexed. */ + unsigned index_size:4; /**< if 0, the draw is not indexed. */ + unsigned view_mask:6; /**< mask of multiviews for this draw */ bool primitive_restart:1; bool has_user_indices:1; /**< if true, use index.user_buffer */ bool index_bounds_valid:1; /**< whether min_index and max_index are valid; @@ -754,7 +755,7 @@ struct pipe_draw_info bool increment_draw_id:1; /**< whether drawid increments for direct draws */ bool take_index_buffer_ownership:1; /**< callee inherits caller's refcount (no need to reference indexbuf, but still needs to unreference it) */ - char _pad:3; /**< padding for memcmp */ + char _pad:1; /**< padding for memcmp */ unsigned start_instance; /**< first instance id */ unsigned instance_count; /**< number of instances */ diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 118cbe0a188..d9442f1e070 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -1336,6 +1336,7 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, info.start_instance = baseInstance; info.instance_count = numInstances; info.drawid = 0; + info.view_mask = 0; info.min_index = start; info.max_index = start + count - 1; @@ -1664,6 +1665,7 @@ _mesa_MultiDrawArrays(GLenum mode, const GLint *first, info.start_instance = 0; info.instance_count = 1; info.drawid = 0; + info.view_mask = 0; for (int i = 0; i < primcount; i++) { draw[i].start = first[i]; @@ -1778,6 +1780,7 @@ _mesa_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, info.start_instance = baseInstance; info.instance_count = numInstances; info.drawid = 0; + info.view_mask = 0; info.index_bias = basevertex; info.restart_index = ctx->Array._RestartIndex[index_size_shift]; @@ -2176,6 +2179,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, info.start_instance = 0; info.instance_count = 1; info.drawid = 0; + info.view_mask = 0; info.restart_index = ctx->Array._RestartIndex[index_size_shift]; if (info.has_user_indices) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 36f570e1704..ee7b2ec8517 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -161,6 +161,7 @@ st_draw_vbo(struct gl_context *ctx, info.instance_count = num_instances; info.take_index_buffer_ownership = false; info._pad = 0; + info.view_mask = 0; if (ib) { struct gl_buffer_object *bufobj = ib->obj; diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 3900c1644dd..ff2e754c224 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -127,6 +127,7 @@ st_feedback_draw_vbo(struct gl_context *ctx, info.take_index_buffer_ownership = false; info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices; info.restart_index = 0; + info.view_mask = 0; st_flush_bitmap_cache(st); st_invalidate_readpix_cache(st);