diff options
author | Christoph Bumiller <[email protected]> | 2012-02-06 16:29:03 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-02-09 15:01:34 +0100 |
commit | 8b4f7b0672d663273310fffa9490ad996f5b914a (patch) | |
tree | f2ba67e7db09659b5a0062644cf46d297578a29a /src/gallium/auxiliary/draw/draw_context.c | |
parent | 26de5273acf1ebe6730b5e72b55b3bcceba167c6 (diff) |
gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION
Just let the hardware do it if it can and avoid drivers having to
check for the special case on each draw call.
v2: update the draw module
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 3c0b1aa39c9..ad49ce733ac 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -93,11 +93,11 @@ draw_create_context(struct pipe_context *pipe, boolean try_llvm, } #endif + draw->pipe = pipe; + if (!draw_init(draw)) goto err_destroy; - draw->pipe = pipe; - return draw; err_destroy: @@ -168,6 +168,9 @@ boolean draw_init(struct draw_context *draw) if (!draw_gs_init( draw )) return FALSE; + draw->quads_always_flatshade_last = !draw->pipe->screen->get_param( + draw->pipe->screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION); + return TRUE; } |