diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-11-04 18:10:16 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-11-04 23:01:47 +0100 |
commit | d2633af696f2e4ff98f669061e4e222e8643312c (patch) | |
tree | e7c4b33370aeba5f6133fb89e7c0716350f30635 /src/gallium/auxiliary/util/u_blit.c | |
parent | 794c5158b0a0b2978ebae6fdc2747e6febcd42c1 (diff) | |
download | external_mesa3d-d2633af696f2e4ff98f669061e4e222e8643312c.zip external_mesa3d-d2633af696f2e4ff98f669061e4e222e8643312c.tar.gz external_mesa3d-d2633af696f2e4ff98f669061e4e222e8643312c.tar.bz2 |
st/mesa: set geometry shader to NULL when doing internal drawing
The code expects the geometry shader to be NULL.
We don't have geometry shaders now, but it's good to be prepared.
v2: check for support in the cso context
Diffstat (limited to 'src/gallium/auxiliary/util/u_blit.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_blit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index 87530e9..6a4324b 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -531,6 +531,7 @@ util_blit_pixels_writemask(struct blit_state *ctx, cso_save_framebuffer(ctx->cso); cso_save_fragment_shader(ctx->cso); cso_save_vertex_shader(ctx->cso); + cso_save_geometry_shader(ctx->cso); cso_save_clip(ctx->cso); cso_save_vertex_elements(ctx->cso); cso_save_vertex_buffers(ctx->cso); @@ -574,6 +575,7 @@ util_blit_pixels_writemask(struct blit_state *ctx, set_fragment_shader(ctx, writemask); } set_vertex_shader(ctx); + cso_set_geometry_shader_handle(ctx->cso, NULL); /* drawing dest */ memset(&fb, 0, sizeof(fb)); @@ -612,6 +614,7 @@ util_blit_pixels_writemask(struct blit_state *ctx, cso_restore_framebuffer(ctx->cso); cso_restore_fragment_shader(ctx->cso); cso_restore_vertex_shader(ctx->cso); + cso_restore_geometry_shader(ctx->cso); cso_restore_clip(ctx->cso); cso_restore_vertex_elements(ctx->cso); cso_restore_vertex_buffers(ctx->cso); @@ -719,6 +722,7 @@ util_blit_pixels_tex(struct blit_state *ctx, cso_save_framebuffer(ctx->cso); cso_save_fragment_shader(ctx->cso); cso_save_vertex_shader(ctx->cso); + cso_save_geometry_shader(ctx->cso); cso_save_clip(ctx->cso); cso_save_vertex_elements(ctx->cso); cso_save_vertex_buffers(ctx->cso); @@ -754,6 +758,7 @@ util_blit_pixels_tex(struct blit_state *ctx, /* shaders */ set_fragment_shader(ctx, TGSI_WRITEMASK_XYZW); set_vertex_shader(ctx); + cso_set_geometry_shader_handle(ctx->cso, NULL); /* drawing dest */ memset(&fb, 0, sizeof(fb)); @@ -788,6 +793,7 @@ util_blit_pixels_tex(struct blit_state *ctx, cso_restore_framebuffer(ctx->cso); cso_restore_fragment_shader(ctx->cso); cso_restore_vertex_shader(ctx->cso); + cso_restore_geometry_shader(ctx->cso); cso_restore_clip(ctx->cso); cso_restore_vertex_elements(ctx->cso); cso_restore_vertex_buffers(ctx->cso); |