freedreno/a3xx: add support to emulate GL_CLAMP
[mesa.git] / src / gallium / drivers / freedreno / ir3 / ir3_shader.h
index ea8616491768442c97790ea87d49b99acb4f2844..04a737ef19de5e80beb2162a4898f6d42d30fa48 100644 (file)
@@ -52,8 +52,23 @@ static inline uint16_t sem2idx(ir3_semantic sem)
 /* Configuration key used to identify a shader variant.. different
  * shader variants can be used to implement features not supported
  * in hw (two sided color), binning-pass vertex shader, etc.
+ *
+ * TODO since shader key is starting to get larger (than 32bit)
+ * we probably should pass it around by ptr rather than value more
+ * of the places.. but watch out in ir3_shader_variant() where the
+ * key gets normalized, we need to make a copy there.
  */
 struct ir3_shader_key {
+       /* bitmask of sampler which needs coords clamped for vertex
+        * shader:
+        */
+       unsigned vsaturate_s, vsaturate_t, vsaturate_r;
+
+       /* bitmask of sampler which needs coords clamped for frag
+        * shader:
+        */
+       unsigned fsaturate_s, fsaturate_t, fsaturate_r;
+
        /*
         * Vertex shader variant parameters:
         */