diff options
author | Fabian Bieler <fabianbieler@fastmail.fm> | 2014-03-05 13:43:17 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2015-07-23 00:59:26 +0200 |
commit | 1009b3311febe3909e82d4b5be38ceecad6afcc1 (patch) | |
tree | c5efbaf2e95c6656617e3b4efd2b3bb8372d53fc /src/glsl/link_varyings.cpp | |
parent | 1036b024d4c8ce2376ac41219dfda01d5a59b3ef (diff) | |
download | external_mesa3d-1009b3311febe3909e82d4b5be38ceecad6afcc1.zip external_mesa3d-1009b3311febe3909e82d4b5be38ceecad6afcc1.tar.gz external_mesa3d-1009b3311febe3909e82d4b5be38ceecad6afcc1.tar.bz2 |
glsl: add the patch in/out qualifier (v2)
v2: Dropped some unrelated reordering in glsl_parser.yy as Ken suggested.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 020842a..c1a8f1b 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -116,6 +116,18 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, return; } + if (input->data.patch != output->data.patch) { + linker_error(prog, + "%s shader output `%s' %s patch qualifier, " + "but %s shader input %s patch qualifier\n", + _mesa_shader_stage_to_string(producer_stage), + output->name, + (output->data.patch) ? "has" : "lacks", + _mesa_shader_stage_to_string(consumer_stage), + (input->data.patch) ? "has" : "lacks"); + return; + } + if (!prog->IsES && input->data.invariant != output->data.invariant) { linker_error(prog, "%s shader output `%s' %s invariant qualifier, " @@ -989,7 +1001,8 @@ varying_matches::compute_packing_class(const ir_variable *var) * * Therefore, the packing class depends only on the interpolation type. */ - unsigned packing_class = var->data.centroid | (var->data.sample << 1); + unsigned packing_class = var->data.centroid | (var->data.sample << 1) | + (var->data.patch << 2); packing_class *= 4; packing_class += var->data.interpolation; return packing_class; |