summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-10-09 15:49:49 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-11-04 10:18:56 -0800
commit5e0edf8efc7623c10db378e5e871673fcff78bb9 (patch)
tree62f1c6b8812d4d3da4b18b60daef35b2f4d6cf63
parente500a95a0b62032905e6208946d2e08626271ab0 (diff)
nir: Store PatchInputsRead and PatchOutputsWritten in nir_shader_info.
These tessellation shader related fields need plumbing through NIR. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp2
-rw-r--r--src/glsl/nir/nir.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index 57aba5be0f..b8cced49d4 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -160,6 +160,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
shader->info.num_images = sh->NumImages;
shader->info.inputs_read = sh->Program->InputsRead;
shader->info.outputs_written = sh->Program->OutputsWritten;
+ shader->info.patch_inputs_read = sh->Program->PatchInputsRead;
+ shader->info.patch_outputs_written = sh->Program->PatchOutputsWritten;
shader->info.system_values_read = sh->Program->SystemValuesRead;
shader->info.uses_texture_gather = sh->Program->UsesGather;
shader->info.uses_clip_distance_out =
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 874a03966b..8c60983679 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -1481,6 +1481,11 @@ typedef struct nir_shader_info {
/* Which system values are actually read */
uint64_t system_values_read;
+ /* Which patch inputs are actually read */
+ uint64_t patch_inputs_read;
+ /* Which patch outputs are actually written */
+ uint64_t patch_outputs_written;
+
/* Whether or not this shader ever uses textureGather() */
bool uses_texture_gather;