diff options
author | Marek Olšák <[email protected]> | 2009-12-12 06:34:29 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-12-15 17:59:50 +0000 |
commit | dff4c9ed559ae025d1d8fe7b9d1cea5a973c2225 (patch) | |
tree | 510b4c7df0c3f12caa26c80d9db84e90da2595f9 /src/gallium/auxiliary/util/u_blit.c | |
parent | 3a15c48ecedb985e2cecaaa9061ff579092069f1 (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.c | 7 |
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 abe1de3302b..c9050ca864c 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]); |