<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Run this by our CI earlier today and
      got a few failures :<br>
      <br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      dEQP-VK.image.load_store.buffer.r8g8b8a8_snorm<br>
      dEQP-VK.image.load_store.buffer.r8g8b8a8_unorm<br>
      dEQP-VK.image.format_reinterpret.buffer.r32_uint_r8g8b8a8_snorm<br>
dEQP-VK.image.format_reinterpret.buffer.r8g8b8a8_uint_r8g8b8a8_unorm<br>
dEQP-VK.image.format_reinterpret.buffer.r8g8b8a8_sint_r8g8b8a8_snorm<br>
dEQP-VK.image.format_reinterpret.buffer.r8g8b8a8_sint_r8g8b8a8_unorm<br>
      dEQP-VK.image.format_reinterpret.buffer.r32_sint_r8g8b8a8_unorm<br>
      dEQP-VK.image.format_reinterpret.buffer.r32_sint_r8g8b8a8_snorm<br>
      dEQP-VK.image.format_reinterpret.buffer.r32_uint_r8g8b8a8_unorm<br>
dEQP-VK.image.format_reinterpret.buffer.r8g8b8a8_snorm_r8g8b8a8_unorm<br>
      dEQP-VK.image.store.buffer.r8g8b8a8_unorm<br>
      dEQP-VK.image.store.buffer.r8g8b8a8_snorm<br>
      <br>
      I'm not quite sure why, it seems our backend discards format
      layout qualifiers when we have writeonly set.<br>
      <br>
      -<br>
      Lionel<br>
      <br>
      On 13/02/17 16:10, Jason Ekstrand wrote:<br>
    </div>
    <blockquote
cite="mid:CAOFGe952eAFDZ6BMbhRq9mvL44V_wVQCmnWVALByyHhfiezS=w@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">Reviewed-by: Jason Ekstrand <<a
          moz-do-not-send="true" href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Feb 9, 2017 at 8:06 AM, Alex
          Smith <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:asmith@feralinteractive.com" target="_blank">asmith@feralinteractive.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Allow that
            capability if the driver indicates that it is supported, and<br>
            flag whether images are read-only/write-only in the
            nir_variable (based<br>
            on the NonReadable and NonWritable decorations), which
            drivers may need<br>
            to implement this.<br>
            <br>
            Signed-off-by: Alex Smith <<a moz-do-not-send="true"
              href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
            ---<br>
             src/compiler/spirv/nir_spirv.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
            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
            word_count,<br>
            diff --git a/src/compiler/spirv/spirv_to_<wbr>nir.c
            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
            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
            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
            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 *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, 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>
            <span class="HOEnZb"><font color="#888888">--<br>
                2.7.4<br>
                <br>
                ______________________________<wbr>_________________<br>
                mesa-dev mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
                <a moz-do-not-send="true"
                  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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mesa-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>