summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2009-12-12 06:34:29 +0100
committerKeith Whitwell <keithw@vmware.com>2009-12-15 17:59:50 +0000
commitdff4c9ed559ae025d1d8fe7b9d1cea5a973c2225 (patch)
tree510b4c7df0c3f12caa26c80d9db84e90da2595f9 /src/gallium/auxiliary/util/u_blit.c
parent3a15c48ecedb985e2cecaaa9061ff579092069f1 (diff)
util: add new fragment shaders to simple_shaders
New shaders: * Fragment shader which writes depth sampled from a texture * Fragment shader which copies COLOR[0] to multiple render targets Additional improvements: * The fragment 'tex' shaders now take a sampler type (TGSI_TEXTURE_*) so that they can sample from any type of texture, not only from a 2D one.
Diffstat (limited to 'src/gallium/auxiliary/util/u_blit.c')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index abe1de3302..c9050ca864 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -126,7 +126,8 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
}
/* fragment shader */
- ctx->fs[TGSI_WRITEMASK_XYZW] = util_make_fragment_tex_shader(pipe);
+ ctx->fs[TGSI_WRITEMASK_XYZW] =
+ util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_2D);
ctx->vbuf = NULL;
/* init vertex data that doesn't change */
@@ -420,7 +421,9 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_set_sampler_textures(ctx->cso, 1, &tex);
if (ctx->fs[writemask] == NULL)
- ctx->fs[writemask] = util_make_fragment_tex_shader_writemask(pipe, writemask);
+ ctx->fs[writemask] =
+ util_make_fragment_tex_shader_writemask(pipe, TGSI_TEXTURE_2D,
+ writemask);
/* shaders */
cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]);