diff options
author | Eric Anholt <[email protected]> | 2014-10-10 14:17:15 +0200 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-10-10 15:49:22 +0200 |
commit | d09509da2aa5ff709c48bdc4163a2c57811c70ab (patch) | |
tree | 3bdeeeeda0d651036af40fbaaeaafb765ec64edf /src/gallium/drivers/vc4/vc4_draw.c | |
parent | c6f50c4086a96c3a8d84522ed7ee5c75a8b0868c (diff) |
vc4: Don't look up the compiled shaders unless state has changed.
Improves simulated norast performance on a little benchmark by 38.0965%
+/- 3.27534% (n=11).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index bc08da3734c..1a0c0dc6552 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -99,6 +99,11 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) struct vc4_vertex_stateobj *vtx = vc4->vtx; struct vc4_vertexbuf_stateobj *vertexbuf = &vc4->vertexbuf; + if (vc4->prim_mode != info->mode) { + vc4->prim_mode = info->mode; + vc4->dirty |= VC4_DIRTY_PRIM_MODE; + } + vc4_start_draw(vc4); vc4_update_compiled_shaders(vc4, info->mode); |