From: Nicolai Hähnle Date: Fri, 2 Dec 2016 20:20:16 +0000 (+0100) Subject: tgsi/scan: collect information about output usagemasks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc34a6f0bd1e1c01ef8eb4f7be2bc8bde859ca1f;p=mesa.git tgsi/scan: collect information about output usagemasks Reviewed-by: Marek Olšák --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 56b422d8e9c..a9aa36be46c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -545,6 +545,7 @@ scan_declaration(struct tgsi_shader_info *info, case TGSI_FILE_OUTPUT: info->output_semantic_name[reg] = (ubyte) semName; info->output_semantic_index[reg] = (ubyte) semIndex; + info->output_usagemask[reg] |= fulldecl->Declaration.UsageMask; info->num_outputs = MAX2(info->num_outputs, reg + 1); if (fulldecl->Declaration.UsageMask & TGSI_WRITEMASK_X) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 0cce0f6babb..4add2f7a7e3 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -54,6 +54,7 @@ struct tgsi_shader_info ubyte input_cylindrical_wrap[PIPE_MAX_SHADER_INPUTS]; ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */ ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS]; + ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS]; ubyte output_streams[PIPE_MAX_SHADER_OUTPUTS]; ubyte num_system_values;