<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 12.02.2017 um 18:49 schrieb Kai
      Wasserbäch:<br>
    </div>
    <blockquote
      cite="mid:83591981-be74-390e-4b67-cea466fac63f@dev.carbon-project.org"
      type="cite">
      <pre wrap="">Hey Marek,
Marek Olšák wrote on 12.02.2017 15:53:
</pre>
      <blockquote type="cite">
        <pre wrap="">From: Marek Olšák <a class="moz-txt-link-rfc2396E" href="mailto:marek.olsak@amd.com"><marek.olsak@amd.com></a>

This prevents errors:
"EE r600_texture.c:1571 r600_texture_transfer_map - failed to create
 temporary texture to hold untiled copy"

Bugzilla: <a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/show_bug.cgi?id=99542">https://bugs.freedesktop.org/show_bug.cgi?id=99542</a>
---
 src/gallium/state_trackers/vdpau/output.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 8b26f7a..6506280 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -256,20 +256,27 @@ vlVdpOutputSurfacePutBitsNative(VdpOutputSurface surface,
    pipe = vlsurface->device->context;
    if (!pipe)
       return VDP_STATUS_INVALID_HANDLE;
 
    if (!source_data || !source_pitches)
        return VDP_STATUS_INVALID_POINTER;
 
    pipe_mutex_lock(vlsurface->device->mutex);
 
    dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture);
+
+   /* Check for a no-op. (application bug?) */
+   if (!dst_box.width || !dst_box.height) {
+      pipe_mutex_unlock(vlsurface->device->mutex);
+      return VDP_STATUS_OK;
+   }
+
</pre>
      </blockquote>
      <pre wrap="">
since this is marked as an application bug, should there be a "warn once" along
the lines of "application called vlVdpOutputSurfacePutBitsNative() with a
zero-area rectangle, this is most likely a bug"?</pre>
    </blockquote>
    <br>
    Actually I'm not sure if that is an application bug.<br>
    <br>
    Trying to put a box with zero width and hight might not make much
    sense, but the interface doesn't forbids that explicitly.<br>
    <br>
    Anyway we need to catch this case in the state tracker and so the
    patch is Reviewed-by: Christian König
    <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a>.<br>
    <br>
    Regards,<br>
    Christian.<br>
    <br>
    <blockquote
      cite="mid:83591981-be74-390e-4b67-cea466fac63f@dev.carbon-project.org"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">    pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0,
                          PIPE_TRANSFER_WRITE, &dst_box, *source_data,
                          *source_pitches, 0);
    pipe_mutex_unlock(vlsurface->device->mutex);
 
    return VDP_STATUS_OK;
 }
 
 /**
  * Copy image data from application memory in a specific indexed format to
</pre>
      </blockquote>
      <pre wrap="">
In any case, this series is:
  Tested-by: Kai Wasserbäch <a class="moz-txt-link-rfc2396E" href="mailto:kai@dev.carbon-project.org"><kai@dev.carbon-project.org></a>
  Reviewed-by: Kai Wasserbäch <a class="moz-txt-link-rfc2396E" href="mailto:kai@dev.carbon-project.org"><kai@dev.carbon-project.org></a>

Cheers,
Kai

</pre>
      <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>