aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-29 20:46:21 +0200
committermarha <marha@users.sourceforge.net>2014-05-29 20:46:21 +0200
commit816a5430313e07083c5325f0a430126a2e10ec41 (patch)
tree82e47992f52149b83238690062e0c56202cb2ebb /mesalib/src/mesa/state_tracker
parentc2dfa0e8c98b06e050c530d704d75a7e4edad02e (diff)
downloadvcxsrv-816a5430313e07083c5325f0a430126a2e10ec41.tar.gz
vcxsrv-816a5430313e07083c5325f0a430126a2e10ec41.tar.bz2
vcxsrv-816a5430313e07083c5325f0a430126a2e10ec41.zip
mesa xkeyboard-config git update 29 Mar 2014
xkeyboard-config commit bc3ac1b0d152e929b3532a541596cf9fe286bb9e mesa commit dfd117b8570a69a429e660c069997e78b181ab6d
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index f9887a2c4..26eb9786d 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -679,32 +679,36 @@ st_translate_fragment_program(struct st_context *st,
outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
}
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)) {
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_SAMPLEMASK;
+ fs_output_semantic_index[fs_num_outputs] = 0;
+ outputMapping[FRAG_RESULT_SAMPLE_MASK] = fs_num_outputs;
+ fs_num_outputs++;
+ outputsWritten &= ~(1 << FRAG_RESULT_SAMPLE_MASK);
+ }
+
/* handle remaining outputs (color) */
for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
if (outputsWritten & BITFIELD64_BIT(attr)) {
- int semantic = TGSI_SEMANTIC_COLOR;
switch (attr) {
case FRAG_RESULT_DEPTH:
case FRAG_RESULT_STENCIL:
+ case FRAG_RESULT_SAMPLE_MASK:
/* handled above */
assert(0);
break;
case FRAG_RESULT_COLOR:
- write_all = GL_TRUE;
- break;
- case FRAG_RESULT_SAMPLE_MASK:
- semantic = TGSI_SEMANTIC_SAMPLEMASK;
+ write_all = GL_TRUE; /* fallthrough */
+ default:
+ assert(attr == FRAG_RESULT_COLOR ||
+ (FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
+ fs_output_semantic_index[fs_num_outputs] = numColors;
+ outputMapping[attr] = fs_num_outputs;
+ numColors++;
break;
}
- assert(attr == FRAG_RESULT_COLOR ||
- attr == FRAG_RESULT_SAMPLE_MASK ||
- (FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
- fs_output_semantic_name[fs_num_outputs] = semantic;
- fs_output_semantic_index[fs_num_outputs] = numColors;
- outputMapping[attr] = fs_num_outputs;
- numColors++;
-
fs_num_outputs++;
}
}