tgsi/scan: collect information about output usagemasks
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 2 Dec 2016 20:20:16 +0000 (21:20 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 12 Dec 2016 08:04:01 +0000 (09:04 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index 56b422d8e9c201a9ac75fe43775ca2d6d4dca890..a9aa36be46c0a8446a146e7ba4e2e268f349014a 100644 (file)
@@ -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) {
index 0cce0f6babb666c75ddd7fb6007b87c36bc6eb67..4add2f7a7e33fe5929c4b8733d49132e00bdcfdc 100644 (file)
@@ -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;