nir: Store PatchInputsRead and PatchOutputsWritten in nir_shader_info.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Oct 2015 22:49:49 +0000 (15:49 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Nov 2015 09:03:43 +0000 (01:03 -0800)
These tessellation shader related fields need plumbing through NIR.

v2: Use uint32_t instead of uint64_t to match the source type of
    GLbitfield (caught by Iago Toral).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.h

index facb9fa4a7a7e53c5edc0fe8bdd4f9bc3b7143e4..ec6bdc8acb017e9e86299926b0b50c5065a4c197 100644 (file)
@@ -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 =
index 2559ef2a4564d0f5b966b7d3a8b52c9759c4e4b8..13ebbcae564f1a9f899c3dad80244d72b9a439ac 100644 (file)
@@ -1490,6 +1490,11 @@ typedef struct nir_shader_info {
    /* Which system values are actually read */
    uint64_t system_values_read;
 
+   /* Which patch inputs are actually read */
+   uint32_t patch_inputs_read;
+   /* Which patch outputs are actually written */
+   uint32_t patch_outputs_written;
+
    /* Whether or not this shader ever uses textureGather() */
    bool uses_texture_gather;