<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 14, 2018 at 1:18 AM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sunday, February 11, 2018 6:26:41 PM PST Gustavo Lima Chaves wrote:<br>
> ---<br>
>  src/intel/vulkan/anv_<wbr>extensions.py | 1 +<br>
>  src/intel/vulkan/anv_pipeline.<wbr>c    | 1 +<br>
>  2 files changed, 2 insertions(+)<br>
><br>
> diff --git a/src/intel/vulkan/anv_<wbr>extensions.py b/src/intel/vulkan/anv_<wbr>extensions.py<br>
> index 581921e62a..628778caa6 100644<br>
> --- a/src/intel/vulkan/anv_<wbr>extensions.py<br>
> +++ b/src/intel/vulkan/anv_<wbr>extensions.py<br>
> @@ -86,6 +86,7 @@ EXTENSIONS = [<br>
>      Extension('VK_KHX_multiview',                         1, True),<br>
>      Extension('VK_EXT_debug_<wbr>report',                      8, True),<br>
>      Extension('VK_EXT_external_<wbr>memory_dma_buf',           1, True),<br>
> +    Extension('VK_EXT_shader_<wbr>stencil_export',             1, True),<br></div></div></blockquote><div><br></div><div>You'll need to replace True with "device->info.gen >= 9"<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
>  ]<br>
><br>
>  class VkVersion:<br>
> diff --git a/src/intel/vulkan/anv_<wbr>pipeline.c b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
> index e16a7a1994..a80ce686fd 100644<br>
> --- a/src/intel/vulkan/anv_<wbr>pipeline.c<br>
> +++ b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
> @@ -143,6 +143,7 @@ anv_shader_compile_to_nir(<wbr>struct anv_pipeline *pipeline,<br>
>           .multiview = true,<br>
>           .variable_pointers = true,<br>
>           .storage_16bit = device->instance-><wbr>physicalDevice.info.gen >= 8,<br>
> +         .stencil_export = true,<br>
>        },<br>
>     };<br>
><br>
><br>
<br>
</div></div>Hi Gustavo,<br>
<br>
Intel hardware only gained the ability to write a stencil reference<br>
value from the fragment shader on Skylake (Gen 9).  So, you'll probably<br>
want to make this:<br>
<br>
         .stencil_export = device->instance-><wbr>physicalDevice.info.gen >= 9,<br>
<br>
I don't know if there's something more you'll need to do in order to<br>
avoid advertising the Vulkan extension (VK_EXT_shader_stencil_export)<br>
on earlier generations, too.  I'll defer to Jason on that one.<br>
<br>
--Ken<br>
</blockquote></div><br></div></div>