tgsi/scan: don't set GS_INVOCATIONS for all shader stages
authorMarek Olšák <marek.olsak@amd.com>
Wed, 31 Jul 2019 21:15:18 +0000 (17:15 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 12 Aug 2019 18:52:17 +0000 (14:52 -0400)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c

index 3ed8d1a3ed3fd9f4196e321e9672ddb14378afdc..e1247c3da2639e9ed58dda1dedaf4ec45870ee4f 100644 (file)
@@ -851,7 +851,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
       info->file_max[i] = -1;
    for (i = 0; i < ARRAY_SIZE(info->const_file_max); i++)
       info->const_file_max[i] = -1;
-   info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1;
    for (i = 0; i < ARRAY_SIZE(info->sampler_targets); i++)
       info->sampler_targets[i] = TGSI_TEXTURE_UNKNOWN;
 
@@ -872,6 +871,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
    info->processor = procType;
    info->num_tokens = tgsi_num_tokens(parse.Tokens);
 
+   if (procType == PIPE_SHADER_GEOMETRY)
+      info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1;
+
    /**
     ** Loop over incoming program tokens/instructions
     */