mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
llvmpipe: fix-up polygon culling/winding
This commit is contained in:
parent
24a3b0d23a
commit
15a2a588d8
1 changed files with 11 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include "util/u_memory.h"
|
||||
#include "lp_context.h"
|
||||
#include "lp_state.h"
|
||||
#include "lp_setup.h"
|
||||
#include "draw/draw_context.h"
|
||||
|
||||
|
||||
|
|
@ -50,6 +51,16 @@ void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
|
|||
|
||||
llvmpipe->rasterizer = (struct pipe_rasterizer_state *)setup;
|
||||
|
||||
/* Note: we can immediately set the triangle state here and
|
||||
* not worry about binning because we handle culling during
|
||||
* triangle setup, not when rasterizing the bins.
|
||||
*/
|
||||
if (llvmpipe->rasterizer) {
|
||||
lp_setup_set_triangle_state( llvmpipe->setup,
|
||||
llvmpipe->rasterizer->cull_mode,
|
||||
llvmpipe->rasterizer->front_winding == PIPE_WINDING_CCW );
|
||||
}
|
||||
|
||||
llvmpipe->dirty |= LP_NEW_RASTERIZER;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue