tgsi: add properties and system value register
[mesa.git] / src / gallium / auxiliary / tgsi / tgsi_scan.h
index 5cb6efb3439dd04a7fd1816e59d3e356b9e06711..a1e8a4f6bb7c7072c9f9fc636acd099f66177be6 100644 (file)
@@ -33,7 +33,6 @@
 #include "pipe/p_state.h"
 #include "pipe/p_shader_tokens.h"
 
-
 /**
  * Shader summary info
  */
@@ -41,11 +40,11 @@ struct tgsi_shader_info
 {
    uint num_tokens;
 
-   /* XXX eventually remove the corresponding fields from pipe_shader_state: */
    ubyte num_inputs;
    ubyte num_outputs;
    ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
    ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+   ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
    ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
    ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
 
@@ -59,9 +58,16 @@ struct tgsi_shader_info
 
    boolean writes_z;  /**< does fragment shader write Z value? */
    boolean uses_kill;  /**< KIL or KILP instruction used? */
+   boolean uses_fogcoord; /**< fragment shader uses fog coord? */
+   boolean uses_frontfacing; /**< fragment shader uses front/back-face flag? */
+
+   struct {
+      unsigned name;
+      unsigned data[8];
+   } properties[TGSI_PROPERTY_COUNT];
+   uint num_properties;
 };
 
-
 extern void
 tgsi_scan_shader(const struct tgsi_token *tokens,
                  struct tgsi_shader_info *info);