summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_to_nir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 09:15:57 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit9d2b391165e64f3c64021e5a563037e0ccc09d84 (patch)
tree9f1849a81c187cd412762f8ea17567ecb56f3ef5 /src/compiler/glsl/glsl_to_nir.cpp
parentdebed12fdde9766fd9cf99d679207a36a4599a82 (diff)
glsl: add temporary copy_shader_info() function
This function is added here to ease refactoring towards using the new shared shader_info. Once refactoring is complete and values are set directly it will be removed. We call it from _mesa_copy_linked_program_data() rather than glsl_to_nir() so that the values will be set for all drivers. In order to do this some calls need to be moved around so that we make sure to call do_set_program_inouts() before _mesa_copy_linked_program_data() Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 934c9d14f94..096ab4c5e2a 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -152,57 +152,12 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
shader->info->num_abos = shader_prog->NumAtomicBuffers;
shader->info->num_ssbos = sh->NumShaderStorageBlocks;
shader->info->num_images = sh->NumImages;
- shader->info->inputs_read = sh->Program->InputsRead;
- shader->info->double_inputs_read = sh->Program->DoubleInputsRead;
- shader->info->outputs_written = sh->Program->OutputsWritten;
- shader->info->outputs_read = sh->Program->OutputsRead;
- 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 =
sh->Program->ClipDistanceArraySize != 0;
shader->info->separate_shader = shader_prog->SeparateShader;
shader->info->has_transform_feedback_varyings =
shader_prog->TransformFeedback.NumVarying > 0;
- switch (stage) {
- case MESA_SHADER_TESS_CTRL:
- shader->info->tcs.vertices_out = sh->info.TessCtrl.VerticesOut;
- break;
-
- case MESA_SHADER_GEOMETRY:
- shader->info->gs.vertices_in = shader_prog->Geom.VerticesIn;
- shader->info->gs.output_primitive = sh->info.Geom.OutputType;
- shader->info->gs.vertices_out = sh->info.Geom.VerticesOut;
- shader->info->gs.invocations = sh->info.Geom.Invocations;
- shader->info->gs.uses_end_primitive = shader_prog->Geom.UsesEndPrimitive;
- shader->info->gs.uses_streams = shader_prog->Geom.UsesStreams;
- break;
-
- case MESA_SHADER_FRAGMENT: {
- struct gl_fragment_program *fp =
- (struct gl_fragment_program *)sh->Program;
-
- shader->info->fs.uses_discard = fp->UsesKill;
- shader->info->fs.uses_sample_qualifier = fp->IsSample != 0;
- shader->info->fs.early_fragment_tests = sh->info.EarlyFragmentTests;
- shader->info->fs.depth_layout = fp->FragDepthLayout;
- break;
- }
-
- case MESA_SHADER_COMPUTE: {
- struct gl_compute_program *cp = (struct gl_compute_program *)sh->Program;
- shader->info->cs.local_size[0] = cp->LocalSize[0];
- shader->info->cs.local_size[1] = cp->LocalSize[1];
- shader->info->cs.local_size[2] = cp->LocalSize[2];
- break;
- }
-
- default:
- break; /* No stage-specific info */
- }
-
return shader;
}