vulkan/wsi: include builddir for generated headers
[mesa.git] / src / compiler / shader_info.h
index ab38562d95e943446d1535d784ad8c7b7ced9d24..a67084156dd03d77988180b1deed6e009cce00bc 100644 (file)
 #ifndef SHADER_INFO_H
 #define SHADER_INFO_H
 
+#include "shader_enums.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 typedef struct shader_info {
+   /** The shader stage, such as MESA_SHADER_VERTEX. */
+   gl_shader_stage stage;
+
    const char *name;
 
    /* Descriptive name provided by the client; may be NULL */
@@ -65,8 +70,11 @@ typedef struct shader_info {
    /* Whether or not this shader ever uses textureGather() */
    bool uses_texture_gather;
 
-   /* Whether or not this shader uses the gl_ClipDistance output */
-   bool uses_clip_distance_out;
+   /* The size of the gl_ClipDistance[] array, if declared. */
+   unsigned clip_distance_array_size;
+
+   /* The size of the gl_CullDistance[] array, if declared. */
+   unsigned cull_distance_array_size;
 
    /* Whether or not separate shader objects were used */
    bool separate_shader;
@@ -82,6 +90,9 @@ typedef struct shader_info {
          /** The output primitive type (GL enum value) */
          unsigned output_primitive;
 
+         /** The input primitive type (GL enum value) */
+         unsigned input_primitive;
+
          /** The maximum number of vertices the geometry shader might write. */
          unsigned vertices_out;
 
@@ -109,18 +120,39 @@ typedef struct shader_info {
           */
          bool early_fragment_tests;
 
+         /**
+          * Defined by INTEL_conservative_rasterization.
+          */
+         bool inner_coverage;
+
+         bool post_depth_coverage;
+
          /** gl_FragDepth layout for ARB_conservative_depth. */
          enum gl_frag_depth_layout depth_layout;
       } fs;
 
       struct {
          unsigned local_size[3];
+
+         bool local_size_variable;
+
+         /**
+          * Size of shared variables accessed by the compute shader.
+          */
+         unsigned shared_size;
       } cs;
 
+      /* Applies to both TCS and TES. */
       struct {
          /** The number of vertices in the TCS output patch. */
-         unsigned vertices_out;
-      } tcs;
+         unsigned tcs_vertices_out;
+
+         uint32_t primitive_mode; /* GL_TRIANGLES, GL_QUADS or GL_ISOLINES */
+         enum gl_tess_spacing spacing;
+         /** Is the vertex order counterclockwise? */
+         bool ccw;
+         bool point_mode;
+      } tess;
    };
 } shader_info;