Commit f679ba56 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot
Browse files

util/vbuf: add flatshade_first to vbuf context and api

Reviewed-by: default avatarMarek Olšák <>
Part-of: <mesa/mesa!10964>
parent 24324553
......@@ -152,6 +152,8 @@ struct u_vbuf {
struct translate_cache *translate_cache;
struct cso_cache cso_cache;
bool flatshade_first;
/* This is what was set in set_vertex_buffers.
* May contain user buffers. */
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
......@@ -379,6 +381,11 @@ void u_vbuf_set_vertex_elements(struct u_vbuf *mgr,
mgr->ve = u_vbuf_set_vertex_elements_internal(mgr, velems);
void u_vbuf_set_flatshade_first(struct u_vbuf *mgr, bool flatshade_first)
mgr->flatshade_first = flatshade_first;
void u_vbuf_unset_vertex_elements(struct u_vbuf *mgr)
mgr->ve = NULL;
......@@ -71,6 +71,7 @@ u_vbuf_create(struct pipe_context *pipe, struct u_vbuf_caps *caps);
void u_vbuf_destroy(struct u_vbuf *mgr);
/* State and draw functions. */
void u_vbuf_set_flatshade_first(struct u_vbuf *mgr, bool flatshade_first);
void u_vbuf_set_vertex_elements(struct u_vbuf *mgr,
const struct cso_velems_state *velems);
void u_vbuf_unset_vertex_elements(struct u_vbuf *mgr);
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