summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-01-09 09:25:56 +0100
committerMarek Olšák <[email protected]>2011-02-14 21:50:07 +0100
commitd5062fb3a315c46d77d5c954a3e3c14be1907d33 (patch)
tree8cac3fad112fd32e6f37c1ae75b2e726d224e1f9 /src/gallium/auxiliary/util/u_blit.c
parentcfaf217135d8a8e903b3fbf380f18170df018f0c (diff)
gallium: always save and restore vertex buffers using cso_cache
Diffstat (limited to 'src/gallium/auxiliary/util/u_blit.c')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index c11f7d383db..f07ae2a84d5 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -480,6 +480,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_save_vertex_shader(ctx->cso);
cso_save_clip(ctx->cso);
cso_save_vertex_elements(ctx->cso);
+ cso_save_vertex_buffers(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
@@ -554,7 +555,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe, ctx->vbuf, offset,
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
2); /* attribs/vert */
@@ -571,6 +572,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_restore_vertex_shader(ctx->cso);
cso_restore_clip(ctx->cso);
cso_restore_vertex_elements(ctx->cso);
+ cso_restore_vertex_buffers(ctx->cso);
pipe_sampler_view_reference(&sampler_view, NULL);
}
@@ -672,6 +674,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_save_vertex_shader(ctx->cso);
cso_save_clip(ctx->cso);
cso_save_vertex_elements(ctx->cso);
+ cso_save_vertex_buffers(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
@@ -722,7 +725,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
s0, t0, s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe,
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso,
ctx->vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
@@ -740,4 +743,5 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_restore_vertex_shader(ctx->cso);
cso_restore_clip(ctx->cso);
cso_restore_vertex_elements(ctx->cso);
+ cso_restore_vertex_buffers(ctx->cso);
}