diff options
author | Chris Forbes <chrisf@ijw.co.nz> | 2013-11-29 21:26:10 +1300 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2013-12-07 17:14:58 +1300 |
commit | 51c5fc85e11858b11cf2a3c89ff8052fbc67faab (patch) | |
tree | cdeccbdd94495f94a7977488c908932615d10a9d /src/glsl/link_varyings.cpp | |
parent | 51aa15aca2bf5764b8cd62bbf2329eda40f7a859 (diff) | |
download | external_mesa3d-51c5fc85e11858b11cf2a3c89ff8052fbc67faab.zip external_mesa3d-51c5fc85e11858b11cf2a3c89ff8052fbc67faab.tar.gz external_mesa3d-51c5fc85e11858b11cf2a3c89ff8052fbc67faab.tar.bz2 |
glsl: Add ir support for `sample` qualifier; adjust compiler and linker
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index be36b5f..d2a4fc8 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -105,6 +105,18 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, return; } + if (input->sample != output->sample) { + linker_error(prog, + "%s shader output `%s' %s sample qualifier, " + "but %s shader input %s sample qualifier\n", + _mesa_glsl_shader_target_name(producer_type), + output->name, + (output->sample) ? "has" : "lacks", + _mesa_glsl_shader_target_name(consumer_type), + (input->sample) ? "has" : "lacks"); + return; + } + if (input->invariant != output->invariant) { linker_error(prog, "%s shader output `%s' %s invariant qualifier, " @@ -753,10 +765,12 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var) * requirement by changing the interpolation type to flat here. */ producer_var->centroid = false; + producer_var->sample = false; producer_var->interpolation = INTERP_QUALIFIER_FLAT; if (consumer_var) { consumer_var->centroid = false; + consumer_var->sample = false; consumer_var->interpolation = INTERP_QUALIFIER_FLAT; } } |