<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 13/11/17 22:07, Jason Ekstrand
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOFGe95MnB-_DvvSrXKddnvDLsjhtMdy4Zn0pJzhNjXUYk5fSw@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Mon, Nov 13, 2017 at 1:30 PM,
            Nanley Chery <span dir="ltr"><<a
                href="mailto:nanleychery@gmail.com" target="_blank"
                moz-do-not-send="true">nanleychery@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon,
              Nov 13, 2017 at 08:12:41AM -0800, Jason Ekstrand wrote:<br>
              > Found by inspection<br>
              ><br>
              <br>
              Good catch.<br>
              <span class=""><br>
                > Cc: <a
                  href="mailto:mesa-stable@lists.freedesktop.org"
                  moz-do-not-send="true">mesa-stable@lists.freedesktop.<wbr>org</a><br>
                > ---<br>
                >  src/intel/vulkan/genX_cmd_<wbr>buffer.c | 9
                ++++++---<br>
                >  1 file changed, 6 insertions(+), 3 deletions(-)<br>
                ><br>
                > diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c
                b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
                > index fbb5706..2564976 100644<br>
                > --- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
                > +++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
                > @@ -557,12 +557,13 @@ init_fast_clear_state_entry(<wbr>struct
                anv_cmd_buffer *cmd_buffer,<br>
                >     /* Other combinations of auxiliary buffers and
                platforms require specific<br>
                >      * values in the clear value dword(s).<br>
                >      */<br>
                > +   struct anv_address addr =<br>
                > +      get_fast_clear_state_address(<wbr>cmd_buffer->device,
                image, aspect, level,<br>
                > +                                 
                 FAST_CLEAR_STATE_FIELD_CLEAR_<wbr>COLOR);<br>
                >     unsigned i = 0;<br>
                >     for (; i <
                cmd_buffer->device->isl_dev.<wbr>ss.clear_value_size;
                i += 4) {<br>
                >        anv_batch_emit(&cmd_buffer-><wbr>batch,
                GENX(MI_STORE_DATA_IMM), sdi) {<br>
                > -         sdi.Address =<br>
                > -            get_fast_clear_state_address(<wbr>cmd_buffer->device,
                image, aspect, level,<br>
                > -                                       
                 FAST_CLEAR_STATE_FIELD_CLEAR_<wbr>COLOR);<br>
                > +         sdi.Address = addr;<br>
                <br>
              </span>The loop increments the variable i by 4 with every
              iteration. How about<br>
              the following instead:<br>
                          sdi.Address = addr + i;<br>
            </blockquote>
            <div><br>
            </div>
            <div>I really wish we could do that but it's a struct.  I
              could do</div>
            <div><br>
            </div>
            <div>sdi.Address = addr;</div>
            <div>sdi.Address.offset += i;</div>
            <div><br>
            </div>
            <div>--Jason<br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              -Nanley<br>
              <span class=""><br>
                ><br>
                >           if (GEN_GEN >= 9) {<br>
                >              /* MCS buffers on SKL+ can only have
                1/0 clear colors. */<br>
                > @@ -586,6 +587,8 @@ init_fast_clear_state_entry(<wbr>struct
                anv_cmd_buffer *cmd_buffer,<br>
                >              sdi.ImmediateData = 0;<br>
                >           }<br>
                >        }<br>
                > +<br>
                > +      addr += 4;<br>
              </span></blockquote>
            <div><br>
            </div>
            <div>Aparently, I didn't compile-test this because I need a
              .offset here. :/<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Heh, I was confused too :)<br>
    With that fixed :<br>
    <br>
    Reviewed-by: Lionel Landwerlin <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a><br>
    <br>
    <blockquote type="cite"
cite="mid:CAOFGe95MnB-_DvvSrXKddnvDLsjhtMdy4Zn0pJzhNjXUYk5fSw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
                class="">
                >     }<br>
                >  }<br>
                ><br>
                > --<br>
                > 2.5.0.400.gff86faf<br>
                ><br>
              </span>> ______________________________<wbr>_________________<br>
              > mesa-dev mailing list<br>
              > <a href="mailto:mesa-dev@lists.freedesktop.org"
                moz-do-not-send="true">mesa-dev@lists.freedesktop.org</a><br>
              > <a
                href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev"
                rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </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>