<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 Sun, Feb 11, 2018 at 6:26 PM, Gustavo Lima Chaves <span dir="ltr"><<a href="mailto:gustavo.lima.chaves@intel.com" target="_blank">gustavo.lima.chaves@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 src/compiler/shader_info.h         | 1 +<br>
 src/compiler/spirv/spirv_to_<wbr>nir.c  | 4 ++++<br>
 src/compiler/spirv/vtn_<wbr>variables.c | 4 ++++<br>
 3 files changed, 9 insertions(+)<br>
<br>
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h<br>
index f6dedb8d62..0480af5be7 100644<br>
--- a/src/compiler/shader_info.h<br>
+++ b/src/compiler/shader_info.h<br>
@@ -43,6 +43,7 @@ struct spirv_supported_capabilities {<br>
    bool multiview;<br>
    bool variable_pointers;<br>
    bool storage_16bit;<br>
+   bool stencil_export;<br>
 };<br>
<br>
 typedef struct shader_info {<br>
diff --git a/src/compiler/spirv/spirv_to_<wbr>nir.c b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
index c6df764682..e00dcafa12 100644<br>
--- a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
+++ b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
@@ -3196,6 +3196,10 @@ vtn_handle_preamble_<wbr>instruction(struct vtn_builder *b, SpvOp opcode,<br>
          spv_check_supported(variable_<wbr>pointers, cap);<br>
          break;<br>
<br>
+      case SpvCapabilityStencilExportEXT:<br>
+         spv_check_supported(stencil_<wbr>export, cap);<br>
+         break;<br>
+<br>
       case SpvCapabilityStorageUniformBuf<wbr>ferBlock16:<br>
       case SpvCapabilityStorageUniform16:<br>
       case SpvCapabilityStoragePushConsta<wbr>nt16:<br>
diff --git a/src/compiler/spirv/vtn_<wbr>variables.c b/src/compiler/spirv/vtn_<wbr>variables.c<br>
index ead68b4784..36976798e9 100644<br>
--- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
+++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
@@ -1294,6 +1294,10 @@ vtn_get_builtin_location(<wbr>struct vtn_builder *b,<br>
       *location = SYSTEM_VALUE_VIEW_INDEX;<br>
       set_mode_system_value(b, mode);<br>
       break;<br>
+   case SpvBuiltInFragStencilRefEXT:<br>
+      *location = FRAG_RESULT_STENCIL;<br>
+      vtn_assert(*mode == nir_var_shader_out);<br>
+      break;<br>
    default:<br>
       vtn_fail("unsupported builtin");<br>
    }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.3<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>