[Mesa-dev] [PATCH 3/9] radeonsi: unduplicate VS color export code

Marek Olšák maraeo at gmail.com
Mon Jan 2 20:17:00 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

it's exactly the same as the other ones
---
 src/gallium/drivers/radeonsi/si_shader.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index f18aa82..8dec55c 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2416,41 +2416,34 @@ handle_semantic:
 			layer_value = outputs[i].values[0];
 			semantic_name = TGSI_SEMANTIC_GENERIC;
 			goto handle_semantic;
 		case TGSI_SEMANTIC_VIEWPORT_INDEX:
 			viewport_index_value = outputs[i].values[0];
 			semantic_name = TGSI_SEMANTIC_GENERIC;
 			goto handle_semantic;
 		case TGSI_SEMANTIC_POSITION:
 			target = V_008DFC_SQ_EXP_POS;
 			break;
-		case TGSI_SEMANTIC_COLOR:
-		case TGSI_SEMANTIC_BCOLOR:
-			if (!export_param)
-				continue;
-			target = V_008DFC_SQ_EXP_PARAM + param_count;
-			assert(i < ARRAY_SIZE(shader->info.vs_output_param_offset));
-			shader->info.vs_output_param_offset[i] = param_count;
-			param_count++;
-			break;
 		case TGSI_SEMANTIC_CLIPDIST:
 			if (shader->key.opt.hw_vs.clip_disable) {
 				semantic_name = TGSI_SEMANTIC_GENERIC;
 				goto handle_semantic;
 			}
 			target = V_008DFC_SQ_EXP_POS + 2 + semantic_index;
 			break;
 		case TGSI_SEMANTIC_CLIPVERTEX:
 			if (shader->key.opt.hw_vs.clip_disable)
 				continue;
 			si_llvm_emit_clipvertex(bld_base, pos_args, outputs[i].values);
 			continue;
+		case TGSI_SEMANTIC_COLOR:
+		case TGSI_SEMANTIC_BCOLOR:
 		case TGSI_SEMANTIC_PRIMID:
 		case TGSI_SEMANTIC_FOG:
 		case TGSI_SEMANTIC_TEXCOORD:
 		case TGSI_SEMANTIC_GENERIC:
 			if (!export_param)
 				continue;
 			target = V_008DFC_SQ_EXP_PARAM + param_count;
 			assert(i < ARRAY_SIZE(shader->info.vs_output_param_offset));
 			shader->info.vs_output_param_offset[i] = param_count;
 			param_count++;
-- 
2.7.4



More information about the mesa-dev mailing list