On Wed, Sep 21, 2016 at 2:38 PM, Nanley Chery <nanleych...@gmail.com> wrote: > Is this to avoid needless computation? Yes it is. > If an app copies such an image, that's likely an app bug right? Yes it is. But I think keeping such simple checks in the driver saves a lot of app debugging time sometime later.
> > On Wed, Sep 21, 2016 at 11:17:08AM -0700, Anuj Phogat wrote: >> Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> >> --- >> src/intel/vulkan/anv_blorp.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c >> index cb61070..de33dce 100644 >> --- a/src/intel/vulkan/anv_blorp.c >> +++ b/src/intel/vulkan/anv_blorp.c >> @@ -273,6 +273,10 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer, >> >> VkExtent3D extent = >> anv_sanitize_image_extent(anv_image->type, >> pRegions[r].imageExtent); >> + >> + if (extent.width == 0 || extent.height == 0) >> + return; >> + > > This seems like something we'd want put in blorp_copy(). That way we'd > also handle CopyImage. Yes, blorp_copy() looks like a better place. > >> if (anv_image->type != VK_IMAGE_TYPE_3D) { >> image.offset.z = pRegions[r].imageSubresource.baseArrayLayer; >> extent.depth = pRegions[r].imageSubresource.layerCount; >> -- >> 2.5.5 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev