tgsi: use TGSI_INTERPOLATE_x arguments instead of zeros in ureg code
[mesa.git] / src / gallium / auxiliary / tgsi / tgsi_lowering.h
index 2dd50536a7ecced71617422982dad17a1ee874a5..fd4c38f016e3882d338dfc74e0ba7cbf94e3381e 100644 (file)
  *    Rob Clark <robclark@freedesktop.org>
  */
 
-#ifndef FREEDRENO_LOWERING_H_
-#define FREEDRENO_LOWERING_H_
+#ifndef TGSI_LOWERING_H_
+#define TGSI_LOWERING_H_
 
 #include "pipe/p_shader_tokens.h"
 #include "tgsi/tgsi_scan.h"
 
-struct fd_lowering_config
+struct tgsi_lowering_config
 {
    /* For fragment shaders, generate a shader that emulates two
     * sided color by inserting a BGCOLOR input for each COLOR
@@ -55,8 +55,6 @@ struct fd_lowering_config
     * enable lowering of TGSI_OPCODE_<opc>
     */
    unsigned lower_DST:1;
-   unsigned lower_XPD:1;
-   unsigned lower_SCS:1;
    unsigned lower_LRP:1;
    unsigned lower_FRC:1;
    unsigned lower_POW:1;
@@ -65,9 +63,13 @@ struct fd_lowering_config
    unsigned lower_LOG:1;
    unsigned lower_DP4:1;
    unsigned lower_DP3:1;
-   unsigned lower_DPH:1;
    unsigned lower_DP2:1;
-   unsigned lower_DP2A:1;
+   unsigned lower_FLR:1;
+   unsigned lower_CEIL:1;
+   unsigned lower_TRUNC:1;
+
+   /* bitmask of (1 << TGSI_TEXTURE_type): */
+   unsigned lower_TXP;
 
    /* To emulate certain texture wrap modes, this can be used
     * to saturate the specified tex coord to [0.0, 1.0].  The
@@ -81,8 +83,8 @@ struct fd_lowering_config
 };
 
 const struct tgsi_token *
-fd_transform_lowering(const struct fd_lowering_config *config,
-                      const struct tgsi_token *tokens,
-                      struct tgsi_shader_info *info);
+tgsi_transform_lowering(const struct tgsi_lowering_config *config,
+                        const struct tgsi_token *tokens,
+                        struct tgsi_shader_info *info);
 
 #endif /* FREEDRENO_LOWERING_H_ */