diff options
author | Ilia Mirkin <[email protected]> | 2014-03-30 18:21:50 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-04-26 11:52:52 -0400 |
commit | c5d822dad902b19f06c9be3c6863a51e1881ec5b (patch) | |
tree | 4d2f07f9cb6f0aad08c594759b2a631bdda54b8e /src/mesa/state_tracker/st_program.c | |
parent | 88d8d88d8c151ca1e8ec3af0caba16a4e34ca281 (diff) |
mesa/st: add support for ARB_sample_shading
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 2f0ec32f554..f9887a2c440 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -682,6 +682,7 @@ st_translate_fragment_program(struct st_context *st, /* 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: @@ -689,17 +690,21 @@ st_translate_fragment_program(struct st_context *st, 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)); - fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR; - fs_output_semantic_index[fs_num_outputs] = numColors; - outputMapping[attr] = fs_num_outputs; - numColors++; + write_all = GL_TRUE; + break; + case FRAG_RESULT_SAMPLE_MASK: + semantic = TGSI_SEMANTIC_SAMPLEMASK; 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++; } } |