Bug 77414 - [Bisected]Piglit spec/ARB_framebuffer_object/fbo-blit-stretch fails
Summary: [Bisected]Piglit spec/ARB_framebuffer_object/fbo-blit-stretch fails
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 03:20 UTC by lu hua
Modified: 2014-04-18 06:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2014-04-14 03:20:59 UTC
System Environment:
--------------------------
Platform: Ivybridge
Libdrm:		(master)libdrm-2.4.53
Mesa:		(master)aeb03f8aea2ee542c78f444c49647ecea92bced7
Xserver:	(master)xorg-server-1.15.99.902-2-g3028ae6c9aa37168e249e0d847b29f8e3efb05b2
Xf86_video_intel:(master)2.99.911-73-g9ae82134ad14085e80d93592e155978a5056f44a
Libva:		(staging)960352aaf1e11891a533ce2c98b16edde24d6851
Libva_intel_driver:(staging)4a3f17ae44bae58daf65dcc706332b28a6d478ac
Kernel:	(drm-intel-nightly)ly_parents/2014_04_13/drm-intel-nightly/e

Bug detailed description:
-----------------------------
It fails on all platforms with Mesa master branch and works well on 10.1 branch.

Bisect shows:61e264f4fcdba3623781a0a339426672f0d431e4 is the first bad commit.
commit 61e264f4fcdba3623781a0a339426672f0d431e4
Author:     Chris Forbes <chrisf@ijw.co.nz>
AuthorDate: Mon Mar 10 21:36:22 2014 +1300
Commit:     Chris Forbes <chrisf@ijw.co.nz>
CommitDate: Thu Apr 10 18:27:40 2014 +1200

    mesa: Prefer non-swizzled formats for most sized internalformats

    These formats can be cast to others (with different component types or
    sizes) via ARB_texture_view or ARB_shader_image_load_store. We want
    them to be laid out consistently so that we can just reinterpret the
    memory with a different format.

    In V1, this was done conditionally on a 'prefer_no_swizzle' flag which
    was set in TexStorage/TextureView paths, but we need the same behavior
    for ARB_shader_image_load_store (which also works with images created
    via TexImage, so we don't want it to be conditional.

    Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Acked-by: Eric Anholt <eric@anholt.net>

output:
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(36, 34) nearest
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(36, 34) linear
45x79 (30, 44)-(13, 33) => 200x150 (36, 34)-(19, 23) flip_src_x flip_src_y flip_dst_x flip_dst_y nearest
45x79 (30, 44)-(13, 33) => 200x150 (36, 34)-(19, 23) flip_src_x flip_src_y flip_dst_x flip_dst_y linear
45x79 (30, 33)-(13, 44) => 200x150 (19, 34)-(36, 23) flip_src_x flip_dst_y nearest
45x79 (30, 33)-(13, 44) => 200x150 (19, 34)-(36, 23) flip_src_x flip_dst_y linear
45x79 (13, 44)-(30, 33) => 200x150 (36, 23)-(19, 34) flip_src_y flip_dst_x nearest
45x79 (13, 44)-(30, 33) => 200x150 (36, 23)-(19, 34) flip_src_y flip_dst_x linear
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(87, 67) stretch_x stretch_y nearest
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(87, 67) stretch_x stretch_y linear
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(87, 67) stretch_x stretch_y nearest
45x79 (13, 33)-(30, 44) => 200x150 (19, 23)-(87, 67) stretch_x stretch_y linear
45x79 (13, 33)-(14, 34) => 200x150 (19, 23)-(26, 30) stretch_x stretch_y nearest
45x79 (13, 33)-(14, 34) => 200x150 (19, 23)-(26, 30) stretch_x stretch_y linear
45x79 (13, 33)-(30, 44) => 200x150 (-8, -5)-(9, 6) clamp_dst_x clamp_dst_y nearest
45x79 (13, 33)-(30, 44) => 200x150 (-8, -5)-(9, 6) clamp_dst_x clamp_dst_y linear
45x79 (13, 33)-(30, 44) => 200x150 (192, 145)-(209, 156) clamp_dst_x clamp_dst_y nearest
45x79 (13, 33)-(30, 44) => 200x150 (192, 145)-(209, 156) clamp_dst_x clamp_dst_y linear
45x79 (-8, -5)-(9, 6) => 200x150 (19, 23)-(36, 34) clamp_src_x clamp_src_y nearest
Probe at (19,23)
  Expected: 0.500000 0.500000 0.500000
  Observed: 1.000000 0.000000 0.000000
45x79 (-8, -5)-(9, 6) => 200x150 (19, 23)-(36, 34) clamp_src_x clamp_src_y linear
Probe at (19,23)
  Expected: 0.500000 0.500000 0.500000
  Observed: 1.000000 0.000000 0.000000
45x79 (37, 74)-(54, 85) => 200x150 (19, 23)-(36, 34) clamp_src_x clamp_src_y nearest
Probe at (27,23)
  Expected: 0.500000 0.500000 0.500000
  Observed: 1.000000 1.000000 1.000000
45x79 (37, 74)-(54, 85) => 200x150 (19, 23)-(36, 34) clamp_src_x clamp_src_y linear
Probe at (27,23)
  Expected: 0.500000 0.500000 0.500000
  Observed: 1.000000 1.000000 1.000000
45x79 (0, 0)-(45, 79) => 200x150 (0, 0)-(200, 150) stretch_x stretch_y nearest
45x79 (0, 0)-(45, 79) => 200x150 (0, 0)-(200, 150) stretch_x stretch_y linear
PIGLIT: {'result': 'fail' }


Reproduce steps:
---------------------------- 
1. xinit
2. ./bin/fbo-blit-stretch -auto
Comment 1 Chris Forbes 2014-04-14 07:34:56 UTC
Sorry, I should have caught this earlier.

We're falling off the blorp path due to the R8G8B8A8 -> B8G8R8A8 conversion.
The meta path then fails to clip the blit rectangle, and so we get broken results.

I think this should be fixed in meta rather than enabling another format conversion special case in blorp.
Comment 2 Chris Forbes 2014-04-14 08:47:05 UTC
Patch for this is now on the list:

http://patchwork.freedesktop.org/patch/24210/
Comment 3 lu hua 2014-04-16 06:26:39 UTC
(In reply to comment #2)
> Patch for this is now on the list:
> 
> http://patchwork.freedesktop.org/patch/24210/

Fixed by this patch.
Comment 4 Chris Forbes 2014-04-16 06:40:32 UTC
Patch superceded by V3:


http://patchwork.freedesktop.org/patch/24311/
Comment 5 Chris Forbes 2014-04-17 06:16:34 UTC
Fix for this is now in master.
Comment 6 lu hua 2014-04-18 06:13:32 UTC
Verified.Fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.