diff options
author | Timothy Arceri <[email protected]> | 2016-11-22 13:10:18 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-19 17:05:26 +1100 |
commit | 5c93d274231ad36934c5338747ce14b95231031d (patch) | |
tree | cac5930dbde74297ae41d9769d1ec103f8daf2ee /src/compiler/glsl/linker.cpp | |
parent | 4cd709e2bcea479a723b4741de59b448b1c6c48f (diff) |
mesa/glsl/i965: set and use tcs vertices_out directly
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index dea78384a38..7073eac9d91 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1659,15 +1659,15 @@ link_xfb_stride_layout_qualifiers(struct gl_context *ctx, */ static void link_tcs_out_layout_qualifiers(struct gl_shader_program *prog, - struct gl_linked_shader *linked_shader, + struct gl_program *gl_prog, struct gl_shader **shader_list, unsigned num_shaders) { - linked_shader->info.TessCtrl.VerticesOut = 0; - - if (linked_shader->Stage != MESA_SHADER_TESS_CTRL) + if (gl_prog->info.stage != MESA_SHADER_TESS_CTRL) return; + gl_prog->info.tess.tcs_vertices_out = 0; + /* From the GLSL 4.0 spec (chapter 4.3.8.2): * * "All tessellation control shader layout declarations in a program @@ -1682,16 +1682,16 @@ link_tcs_out_layout_qualifiers(struct gl_shader_program *prog, struct gl_shader *shader = shader_list[i]; if (shader->info.TessCtrl.VerticesOut != 0) { - if (linked_shader->info.TessCtrl.VerticesOut != 0 && - linked_shader->info.TessCtrl.VerticesOut != - shader->info.TessCtrl.VerticesOut) { + if (gl_prog->info.tess.tcs_vertices_out != 0 && + gl_prog->info.tess.tcs_vertices_out != + (unsigned) shader->info.TessCtrl.VerticesOut) { linker_error(prog, "tessellation control shader defined with " "conflicting output vertex count (%d and %d)\n", - linked_shader->info.TessCtrl.VerticesOut, + gl_prog->info.tess.tcs_vertices_out, shader->info.TessCtrl.VerticesOut); return; } - linked_shader->info.TessCtrl.VerticesOut = + gl_prog->info.tess.tcs_vertices_out = shader->info.TessCtrl.VerticesOut; } } @@ -1700,7 +1700,7 @@ link_tcs_out_layout_qualifiers(struct gl_shader_program *prog, * since we already know we're in the right type of shader program * for doing it. */ - if (linked_shader->info.TessCtrl.VerticesOut == 0) { + if (gl_prog->info.tess.tcs_vertices_out == 0) { linker_error(prog, "tessellation control shader didn't declare " "vertices out layout qualifier\n"); return; @@ -2218,7 +2218,7 @@ link_intrastage_shaders(void *mem_ctx, clone_ir_list(mem_ctx, linked->ir, main->ir); link_fs_inout_layout_qualifiers(prog, linked, shader_list, num_shaders); - link_tcs_out_layout_qualifiers(prog, linked, shader_list, num_shaders); + link_tcs_out_layout_qualifiers(prog, gl_prog, shader_list, num_shaders); link_tes_in_layout_qualifiers(prog, linked, shader_list, num_shaders); link_gs_inout_layout_qualifiers(prog, linked, shader_list, num_shaders); link_cs_input_layout_qualifiers(prog, linked, shader_list, num_shaders); @@ -2431,7 +2431,7 @@ resize_tes_inputs(struct gl_context *ctx, * known until draw time. */ const int num_vertices = tcs - ? tcs->info.TessCtrl.VerticesOut + ? tcs->Program->info.tess.tcs_vertices_out : ctx->Const.MaxPatchVertices; array_resize_visitor input_resize_visitor(num_vertices, prog, |