diff options
author | marha <marha@users.sourceforge.net> | 2013-06-18 08:28:35 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-06-18 08:28:35 +0200 |
commit | 230fe896faed312ef22d915e871fb5aee3ecfad0 (patch) | |
tree | 971b0c0899c72496f97970319bfadfae383abbea /mesalib/src/gallium/auxiliary/util/u_simple_shaders.c | |
parent | 180290f941da61bd80284d817e27c01cf789ee53 (diff) | |
parent | b071050b9eda9d5e5185e582dbe9f4adba863ccc (diff) | |
download | vcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.tar.gz vcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.tar.bz2 vcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 libXmu libxcb/xcb-proto mesa mkfontscale pixman xkeyboard-config git update 18 June 2013
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_simple_shaders.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_simple_shaders.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c index c53c2d024..c93d75469 100644 --- a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c @@ -322,11 +322,12 @@ util_make_fragment_tex_shader_writestencil(struct pipe_context *pipe, void * util_make_fragment_passthrough_shader(struct pipe_context *pipe, int input_semantic, - int input_interpolate) + int input_interpolate, + boolean write_all_cbufs) { static const char shader_templ[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" + "%s" "DCL IN[0], %s[0], %s\n" "DCL OUT[0], COLOR[0]\n" @@ -337,7 +338,9 @@ util_make_fragment_passthrough_shader(struct pipe_context *pipe, struct tgsi_token tokens[1000]; struct pipe_shader_state state = {tokens}; - sprintf(text, shader_templ, tgsi_semantic_names[input_semantic], + sprintf(text, shader_templ, + write_all_cbufs ? "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" : "", + tgsi_semantic_names[input_semantic], tgsi_interpolate_names[input_interpolate]); if (!tgsi_text_translate(text, tokens, Elements(tokens))) { @@ -352,6 +355,18 @@ util_make_fragment_passthrough_shader(struct pipe_context *pipe, } +void * +util_make_empty_fragment_shader(struct pipe_context *pipe) +{ + struct ureg_program *ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT); + if (ureg == NULL) + return NULL; + + ureg_END(ureg); + return ureg_create_shader_and_destroy(ureg, pipe); +} + + /** * Make a fragment shader that copies the input color to N output colors. */ |