compiler: Merge shader_info's tcs and tes structs.

Annoyingly, SPIR-V lets you specify all of these fields in either the
TCS or TES, which means that we need to be able to store all of them
for either shader stage.  Putting them in a union won't work.

Combining both is an easy solution, and given that the TCS struct only
had a single field, it's pretty inexpensive.

This patch renames the combined struct to "tess" to indicate that it's
for tessellation in general, not one of the two stages.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Kenneth Graunke
2017-01-09 11:37:21 -08:00
parent 195bf8f027
commit 5edc338162
9 changed files with 37 additions and 36 deletions

View File

@@ -142,18 +142,17 @@ typedef struct shader_info {
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;
struct {
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;
} tes;
} tess;
};
} shader_info;