diff options
author | Younes Manton <[email protected]> | 2011-07-20 13:49:56 -0400 |
---|---|---|
committer | Younes Manton <[email protected]> | 2011-07-20 13:52:45 -0400 |
commit | b56daf71d2f63d044d4c53ab49c6f87e02991a28 (patch) | |
tree | ec8a5e4b01854a93f30280885d04549b75137013 /src/gallium/auxiliary/vl/vl_mc.c | |
parent | 8082816e27a0ee376e679c4d81ff8a3f0611ea9e (diff) |
g3dvl: Preserve previously rendered components for MC output.
Fixes xvmc-softpipe MC entrypoint, amongst others.
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_mc.c')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c index bd05205b52d..add367e3ac6 100644 --- a/src/gallium/auxiliary/vl/vl_mc.c +++ b/src/gallium/auxiliary/vl/vl_mc.c @@ -590,7 +590,7 @@ vl_mc_set_surface(struct vl_mc_buffer *buffer, struct pipe_surface *surface) } static void -prepare_pipe_4_rendering(struct vl_mc_buffer *buffer, unsigned mask) +prepare_pipe_4_rendering(struct vl_mc_buffer *buffer, unsigned component, unsigned mask) { struct vl_mc *renderer; @@ -599,7 +599,7 @@ prepare_pipe_4_rendering(struct vl_mc_buffer *buffer, unsigned mask) renderer = buffer->renderer; renderer->pipe->bind_rasterizer_state(renderer->pipe, renderer->rs_state); - if (buffer->surface_cleared) + if (buffer->surface_cleared || component > 0) renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_add[mask]); else renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_clear[mask]); @@ -615,7 +615,7 @@ vl_mc_render_ref(struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref) assert(buffer && ref); - prepare_pipe_4_rendering(buffer, PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B); + prepare_pipe_4_rendering(buffer, 0, PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B); renderer = buffer->renderer; @@ -643,7 +643,7 @@ vl_mc_render_ycbcr(struct vl_mc_buffer *buffer, unsigned component, unsigned num if (num_instances == 0) return; - prepare_pipe_4_rendering(buffer, mask); + prepare_pipe_4_rendering(buffer, component, mask); renderer = buffer->renderer; |