nir: Move V3D's "the shader was TGSI, ignore FS output types" flag to NIR.
[mesa.git] / src / compiler / shader_info.h
index c3dbe764961085aa3190efc7a9c04c9cca312019..3d87193875148a4b4e8e5a6b7695e2c90ecddd61 100644 (file)
@@ -199,6 +199,25 @@ typedef struct shader_info {
          bool sample_interlock_ordered;
          bool sample_interlock_unordered;
 
+         /**
+          * Flags whether NIR's base types on the FS color outputs should be
+          * ignored.
+          *
+          * GLSL requires that fragment shader output base types match the
+          * render target's base types for the behavior to be defined.  From
+          * the GL 4.6 spec:
+          *
+          *     "If the values written by the fragment shader do not match the
+          *      format(s) of the corresponding color buffer(s), the result is
+          *      undefined."
+          *
+          * However, for NIR shaders translated from TGSI, we don't have the
+          * output types any more, so the driver will need to do whatever
+          * fixups are necessary to handle effectively untyped data being
+          * output from the FS.
+          */
+         bool untyped_color_outputs;
+
          /** gl_FragDepth layout for ARB_conservative_depth. */
          enum gl_frag_depth_layout depth_layout;
       } fs;