On Tue, Jan 24, 2017 at 4:48 AM, Iago Toral Quiroga <ito...@igalia.com> wrote: > SPIR-V maps both gl_SampleMask and gl_SampleMaskIn to the same > builtin (SampleMask). The only way to tell which one we are dealing with > is to check if it is an input or an output. > > Fixes: > dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.write.* > --- > I am still waiting on Jenkins to report results from this patch, but for > some reason it is taking surprisingly long so I figured I'd send it for > review ahead of the results, I don't expect regressions, but I'll verify > there aren't any when I get them in any case. > > src/compiler/spirv/vtn_variables.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/compiler/spirv/vtn_variables.c > b/src/compiler/spirv/vtn_variables.c > index d55f81e..4d1ec78 100644 > --- a/src/compiler/spirv/vtn_variables.c > +++ b/src/compiler/spirv/vtn_variables.c > @@ -975,8 +975,12 @@ vtn_get_builtin_location(struct vtn_builder *b, > set_mode_system_value(mode); > break; > case SpvBuiltInSampleMask: > - *location = SYSTEM_VALUE_SAMPLE_MASK_IN; /* XXX out? */ > - set_mode_system_value(mode); > + if (*mode == nir_var_shader_out) { > + *location = FRAG_RESULT_SAMPLE_MASK; > + } else { > + *location = SYSTEM_VALUE_SAMPLE_MASK_IN; > + set_mode_system_value(mode); > + } > break; > case SpvBuiltInFragDepth: > *location = FRAG_RESULT_DEPTH; > -- > 2.7.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev