<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 February 2017 at 08:45, Iago Toral <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Mon, 2017-02-13 at 16:29 +0000, Lionel Landwerlin wrote:<br>
> Run this by our CI earlier today and got a few failures :<br>
><br>
> dEQP-VK.image.load_store.<wbr>buffer.r8g8b8a8_snorm<br>
> dEQP-VK.image.load_store.<wbr>buffer.r8g8b8a8_unorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r32_uint_<wbr>r8g8b8a8_snorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r8g8b8a8_<wbr>uint_r8g8b8a8_unorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r8g8b8a8_<wbr>sint_r8g8b8a8_snorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r8g8b8a8_<wbr>sint_r8g8b8a8_unorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r32_sint_<wbr>r8g8b8a8_unorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r32_sint_<wbr>r8g8b8a8_snorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r32_uint_<wbr>r8g8b8a8_unorm<br>
> dEQP-VK.image.format_<wbr>reinterpret.buffer.r8g8b8a8_<wbr>snorm_r8g8b8a8_unorm<br>
> dEQP-VK.image.store.buffer.<wbr>r8g8b8a8_unorm<br>
> dEQP-VK.image.store.buffer.<wbr>r8g8b8a8_snorm<br>
><br>
> I'm not quite sure why, it seems our backend discards format layout<br>
> qualifiers when we have writeonly set.<br>
<br>
</span>For what is worth, I see a lot more regressions from image.load_store<br>
tests with this patch. Some of these get fixed with the second patch,<br>
but even then I see all of dEQP-VK.image.load_store.*.<wbr>r32g32b32a32.*<br>
regressing (with Lionel's comment to patch 2 fixed)<br></blockquote><br>These are all fixed by applying Jason's patch "anv/apply_pipeline_layout: Set image.write_only to false" [1] before this one. I've just tested locally and see no failures with both that patch and this one applied. I'll include that patch when I resend the series.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Alex<br><br>[1] <a href="https://lists.freedesktop.org/archives/mesa-dev/2017-February/144167.html">https://lists.freedesktop.org/archives/mesa-dev/2017-February/144167.html</a><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888"><br>
Iago<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
> -<br>
> Lionel<br>
><br>
> On 13/02/17 16:10, Jason Ekstrand wrote:<br>
> > Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> ><br>
> > On Thu, Feb 9, 2017 at 8:06 AM, Alex Smith <asmith@feralinteractive<br>
> > .com> wrote:<br>
> > > Allow that capability if the driver indicates that it is<br>
> > > supported, and<br>
> > > flag whether images are read-only/write-only in the nir_variable<br>
> > > (based<br>
> > > on the NonReadable and NonWritable decorations), which drivers<br>
> > > may need<br>
> > > to implement this.<br>
> > ><br>
> > > Signed-off-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
> > > ---<br>
> > >  src/compiler/spirv/nir_spirv.<wbr>h     | 1 +<br>
> > >  src/compiler/spirv/spirv_to_<wbr>nir.c  | 5 ++++-<br>
> > >  src/compiler/spirv/vtn_<wbr>variables.c | 5 ++++-<br>
> > >  3 files changed, 9 insertions(+), 2 deletions(-)<br>
> > ><br>
> > > diff --git a/src/compiler/spirv/nir_<wbr>spirv.h<br>
> > > b/src/compiler/spirv/nir_<wbr>spirv.h<br>
> > > index e0ebc62..e43e9b5 100644<br>
> > > --- a/src/compiler/spirv/nir_<wbr>spirv.h<br>
> > > +++ b/src/compiler/spirv/nir_<wbr>spirv.h<br>
> > > @@ -49,6 +49,7 @@ struct nir_spirv_supported_extensions {<br>
> > >     bool image_ms_array;<br>
> > >     bool tessellation;<br>
> > >     bool draw_parameters;<br>
> > > +   bool image_write_without_format;<br>
> > >  };<br>
> > ><br>
> > >  nir_function *spirv_to_nir(const uint32_t *words, size_t<br>
> > > word_count,<br>
> > > diff --git a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
> > > b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
> > > index 416e12a..3f77ddf 100644<br>
> > > --- a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
> > > +++ b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
> > > @@ -2666,7 +2666,6 @@ vtn_handle_preamble_<wbr>instruction(struct<br>
> > > vtn_builder *b, SpvOp opcode,<br>
> > >        case SpvCapabilityMinLod:<br>
> > >        case SpvCapabilityTransformFeedback<wbr>:<br>
> > >        case SpvCapabilityStorageImageReadW<wbr>ithoutFormat:<br>
> > > -      case SpvCapabilityStorageImageWrite<wbr>WithoutFormat:<br>
> > >           vtn_warn("Unsupported SPIR-V capability: %s",<br>
> > >                    spirv_capability_to_string(<wbr>cap));<br>
> > >           break;<br>
> > > @@ -2702,6 +2701,10 @@ vtn_handle_preamble_<wbr>instruction(struct<br>
> > > vtn_builder *b, SpvOp opcode,<br>
> > >           spv_check_supported(draw_<wbr>parameters, cap);<br>
> > >           break;<br>
> > ><br>
> > > +      case SpvCapabilityStorageImageWrite<wbr>WithoutFormat:<br>
> > > +         spv_check_supported(image_<wbr>write_without_format, cap);<br>
> > > +         break;<br>
> > > +<br>
> > >        default:<br>
> > >           unreachable("Unhandled capability");<br>
> > >        }<br>
> > > diff --git a/src/compiler/spirv/vtn_<wbr>variables.c<br>
> > > b/src/compiler/spirv/vtn_<wbr>variables.c<br>
> > > index 098cfb5..d7d882e 100644<br>
> > > --- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
> > > +++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
> > > @@ -1054,8 +1054,12 @@ apply_var_decoration(struct vtn_builder<br>
> > > *b, nir_variable *nir_var,<br>
> > >        assert(nir_var->constant_<wbr>initializer != NULL);<br>
> > >        nir_var->data.read_only = true;<br>
> > >        break;<br>
> > > +   case SpvDecorationNonReadable:<br>
> > > +      nir_var->data.image.write_only = true;<br>
> > > +      break;<br>
> > >     case SpvDecorationNonWritable:<br>
> > >        nir_var->data.read_only = true;<br>
> > > +      nir_var->data.image.read_only = true;<br>
> > >        break;<br>
> > >     case SpvDecorationComponent:<br>
> > >        nir_var->data.location_frac = dec->literals[0];<br>
> > > @@ -1107,7 +1111,6 @@ apply_var_decoration(struct vtn_builder *b,<br>
> > > nir_variable *nir_var,<br>
> > >     case SpvDecorationAliased:<br>
> > >     case SpvDecorationVolatile:<br>
> > >     case SpvDecorationCoherent:<br>
> > > -   case SpvDecorationNonReadable:<br>
> > >     case SpvDecorationUniform:<br>
> > >     case SpvDecorationStream:<br>
> > >     case SpvDecorationOffset:<br>
> > > --<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>
> > ><br>
> ><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>
> ______________________________<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>
</div></div></blockquote></div><br></div></div>