diff options
author | Brian Paul <brianp@vmware.com> | 2010-04-19 08:45:20 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-04-19 08:45:20 -0600 |
commit | 8f3bdeaad610d7d5a5c6e73e1e9c721219595754 (patch) | |
tree | 3375ac7eb94edf1914da7faafcedea32a2bd505b /src/gallium/auxiliary/draw/draw_pipe_wide_point.c | |
parent | f7c2d4fee3104008c21078879cbc5720d7bc1be6 (diff) | |
parent | e3a34cc7f6c9f959cdc2af4486e84587fab4d0d7 (diff) |
Merge branch '7.8'
Conflicts:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/drivers/llvmpipe/lp_context.c
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_wide_point.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_wide_point.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c index 6864b4015b..f6edb599a9 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c @@ -52,6 +52,7 @@ */ +#include "pipe/p_context.h" #include "util/u_math.h" #include "util/u_memory.h" #include "pipe/p_defines.h" @@ -216,6 +217,9 @@ static void widepoint_first_point( struct draw_stage *stage, { struct widepoint_stage *wide = widepoint_stage(stage); struct draw_context *draw = stage->draw; + struct pipe_context *pipe = draw->pipe; + const struct pipe_rasterizer_state *rast = draw->rasterizer; + void *r; wide->half_point_size = 0.5f * draw->rasterizer->point_size; wide->xbias = 0.0; @@ -225,6 +229,12 @@ static void widepoint_first_point( struct draw_stage *stage, wide->xbias = 0.125; } + /* Disable triangle culling, stippling, unfilled mode etc. */ + r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade); + draw->suspend_flushing = TRUE; + pipe->bind_rasterizer_state(pipe, r); + draw->suspend_flushing = FALSE; + /* XXX we won't know the real size if it's computed by the vertex shader! */ if ((draw->rasterizer->point_size > draw->pipeline.wide_point_threshold) || (draw->rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)) { @@ -280,9 +290,19 @@ static void widepoint_first_point( struct draw_stage *stage, static void widepoint_flush( struct draw_stage *stage, unsigned flags ) { + struct draw_context *draw = stage->draw; + struct pipe_context *pipe = draw->pipe; + stage->point = widepoint_first_point; stage->next->flush( stage->next, flags ); stage->draw->extra_shader_outputs.slot = 0; + + /* restore original rasterizer state */ + if (draw->rast_handle) { + draw->suspend_flushing = TRUE; + pipe->bind_rasterizer_state(pipe, draw->rast_handle); + draw->suspend_flushing = FALSE; + } } |