<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 4:48 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">SPIR-V maps both gl_SampleMask and gl_SampleMaskIn to the same<br>
builtin (SampleMask). The only way to tell which one we are dealing with<br>
is to check if it is an input or an output.<br>
<br>
Fixes:<br>
dEQP-VK.pipeline.multisample_<wbr>shader_builtin.sample_mask.<wbr>write.*<br>
---<br>
I am still waiting on Jenkins to report results from this patch, but for<br>
some reason it is taking surprisingly long so I figured I'd send it for<br>
review ahead of the results, I don't expect regressions, but I'll verify<br>
there aren't any when I get them in any case.<br>
<br>
src/compiler/spirv/vtn_<wbr>variables.c | 8 ++++++--<br>
1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/spirv/vtn_<wbr>variables.c b/src/compiler/spirv/vtn_<wbr>variables.c<br>
index d55f81e..4d1ec78 100644<br>
--- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
+++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
@@ -975,8 +975,12 @@ vtn_get_builtin_location(<wbr>struct vtn_builder *b,<br>
set_mode_system_value(mode);<br>
break;<br>
case SpvBuiltInSampleMask:<br>
- *location = SYSTEM_VALUE_SAMPLE_MASK_IN; /* XXX out? */<br>
- set_mode_system_value(mode);<br>
+ if (*mode == nir_var_shader_out) {<br>
+ *location = FRAG_RESULT_SAMPLE_MASK;<br>
+ } else {<br>
+ *location = SYSTEM_VALUE_SAMPLE_MASK_IN;<br>
+ set_mode_system_value(mode);<br>
+ }<br>
break;<br>
case SpvBuiltInFragDepth:<br>
*location = FRAG_RESULT_DEPTH;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>