freedreno/a4xx: better workaround for astc+srgb
[mesa.git] / src / gallium / drivers / freedreno / ir3 / ir3_shader.h
index 82cde51e635a50790a358de6dc3396fd9fd656ac..e81e80d328f261fba66a0b1460104b63b33a5fbe 100644 (file)
@@ -105,8 +105,8 @@ struct ir3_shader_key {
         */
        uint16_t fsaturate_s, fsaturate_t, fsaturate_r;
 
-       /* bitmask of samplers which need srgb->linear lowering: */
-       uint16_t vlower_srgb, flower_srgb;
+       /* bitmask of samplers which need astc srgb workaround: */
+       uint16_t vastc_srgb, fastc_srgb;
 };
 
 static inline bool
@@ -225,6 +225,14 @@ struct ir3_shader_variant {
                uint32_t val[4];
        } immediates[64];
 
+       /* for astc srgb workaround, the number/base of additional
+        * alpha tex states we need, and index of original tex states
+        */
+       struct {
+               unsigned base, count;
+               unsigned orig_idx[16];
+       } astc_srgb;
+
        /* shader variants form a linked list: */
        struct ir3_shader_variant *next;