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

util/primconvert: add function for setting flatshade_first



this is the value that needs to be set, not the actual rasterizer state

original function preserved to avoid driver changes
Acked-by: Rob Clark's avatarRob Clark <robdclark@chromium.org>
Part-of: <mesa/mesa!10964>
parent ca513163
......@@ -88,12 +88,18 @@ void
util_primconvert_save_rasterizer_state(struct primconvert_context *pc,
const struct pipe_rasterizer_state
*rast)
{
util_primconvert_save_flatshade_first(pc, rast->flatshade_first);
}
void
util_primconvert_save_flatshade_first(struct primconvert_context *pc, bool flatshade_first)
{
/* if we actually translated the provoking vertex for the buffer,
* we would actually need to save/restore rasterizer state. As
* it is, we just need to make note of the pv.
*/
pc->api_pv = rast->flatshade_first ? PV_FIRST : PV_LAST;
pc->api_pv = flatshade_first ? PV_FIRST : PV_LAST;
}
void
......
......@@ -49,6 +49,8 @@ void util_primconvert_destroy(struct primconvert_context *pc);
void util_primconvert_save_rasterizer_state(struct primconvert_context *pc,
const struct pipe_rasterizer_state
*rast);
void
util_primconvert_save_flatshade_first(struct primconvert_context *pc, bool flatshade_first);
void util_primconvert_draw_vbo(struct primconvert_context *pc,
const struct pipe_draw_info *info,
unsigned drawid_offset,
......
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