summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-10-08 15:36:51 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-10-19 08:47:03 -0700
commitfe399f3a69689a78ca4a5fb5a6b76435adcd41e5 (patch)
tree7ce4f5f20efd8a73779c0dd1796935fdd2ab577a /src/glsl/nir/nir.h
parent16619477bc800d32b5bf2f38dd544960cf66c284 (diff)
downloadexternal_mesa3d-fe399f3a69689a78ca4a5fb5a6b76435adcd41e5.zip
external_mesa3d-fe399f3a69689a78ca4a5fb5a6b76435adcd41e5.tar.gz
external_mesa3d-fe399f3a69689a78ca4a5fb5a6b76435adcd41e5.tar.bz2
nir/info: Move the GS info into a stage-specific info union
This way we can have other stage-specific info without consuming too much extra space. While we're at it, we make sure that the geometry info is only set if we're actually a goemetry shader. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index fb8d590..719e6ce 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -1493,13 +1493,15 @@ typedef struct nir_shader_info {
/** Was this shader linked with any transform feedback varyings? */
bool has_transform_feedback_varyings;
- struct {
- /** The maximum number of vertices the geometry shader might write. */
- unsigned vertices_out;
+ union {
+ struct {
+ /** The maximum number of vertices the geometry shader might write. */
+ unsigned vertices_out;
- /** 1 .. MAX_GEOMETRY_SHADER_INVOCATIONS */
- unsigned invocations;
- } gs;
+ /** 1 .. MAX_GEOMETRY_SHADER_INVOCATIONS */
+ unsigned invocations;
+ } gs;
+ };
} nir_shader_info;
typedef struct nir_shader {