aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-12-18 10:36:55 +1000
committerDave Airlie <[email protected]>2010-12-24 07:19:58 +1000
commit07498075b5de14955958da44a90eb7ee203218a1 (patch)
tree1de746ad8c9f1bbf5139925fcc51f8386305c694 /src
parent2f4860f2ab7a7d4a1a1f6e69ee074e22a58c754f (diff)
mesa/st: set the color write cbuf property for fragColor writes
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_program.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index cfdc96b9dbe..e9e05acf41c 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -444,6 +444,7 @@ st_translate_fragment_program(struct st_context *st,
enum pipe_error error;
const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
struct ureg_program *ureg;
+ GLboolean write_all = GL_FALSE;
ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];
ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
@@ -568,6 +569,8 @@ st_translate_fragment_program(struct st_context *st,
/* handled above */
assert(0);
break;
+ case FRAG_RESULT_COLOR:
+ write_all = GL_TRUE; /* fallthrough */
default:
assert(attr == FRAG_RESULT_COLOR ||
(FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
@@ -592,6 +595,8 @@ st_translate_fragment_program(struct st_context *st,
_mesa_print_program_parameters(st->ctx, &stfp->Base.Base);
debug_printf("\n");
}
+ if (write_all == GL_TRUE)
+ ureg_property_fs_color0_writes_all_cbufs(ureg, 1);
error = st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_FRAGMENT,