Bug 46004

Summary: [r300g, bisected] piglit glsl-fs-discard-02 fails
Product: Mesa Reporter: Pavel Ondračka <pavel.ondracka>
Component: Drivers/Gallium/r300Assignee: vincent <vljn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: vljn
Version: gitKeywords: regression
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: RADEON_DEBUG=fp,vp log
Possible fix
RADEON_DEBUG=fp,vp log (piglit pass)
Output remove less aggressive patch

Description Pavel Ondračka 2012-02-13 11:10:17 UTC
Piglit glsl-fs-discard-02 fails with r300g since:

10937e651222501c0e9f4f44e6b842c261e2edfb is the first bad commit
commit 10937e651222501c0e9f4f44e6b842c261e2edfb
Author: Vincent Lejeune <vljn@ovi.com>
Date:   Mon Jan 2 20:17:38 2012 +0100

    glsl_to_tgsi: Use the GLSL compiler's new remove-output-reads pass.
    
    The existing glsl_to_tgsi::remove_output_read pass did not work properly
    when indirect addressing was involved; this commit replaces it with a
    lowering pass that occurs before TGSI code generation.
    
    Fixes varying-array related piglit tests.
    
    Signed-off-by: Vincent Lejeune <vljn@ovi.com>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

GPU: RV530
Mesa: df1cd55ebf362948788c04d2fa7da55c80991605
Kernel: 3.2.3
Libdrm: 2.4.31
Comment 1 vincent 2012-02-13 12:03:38 UTC
Hi,

could you please provide the error output for this test, and the generated opcodes using RADEON_DEBUG=fp,vp envar ?

RADEON_DEBUG /path/to/piglit/bin/glsl-fs-discard-02

Regards,
Vincent
Comment 2 Pavel Ondračka 2012-02-13 12:16:22 UTC
Created attachment 56987 [details]
RADEON_DEBUG=fp,vp log
Comment 3 Tom Stellard 2012-02-13 18:44:05 UTC
Created attachment 57003 [details] [review]
Possible fix

Can you try this patch?  If it doesn't work can you get the debug output (RADEON_DEBUG=fp,vp) from when the test was passing?
Comment 4 Pavel Ondračka 2012-02-14 00:36:35 UTC
Created attachment 57014 [details]
RADEON_DEBUG=fp,vp log (piglit pass)

The patch doesn't help. Attaching a new log with 6d4b35c03619148cde89bc5eedaac3288001edd3 (right before the regression).
Comment 5 Tom Stellard 2012-02-14 19:38:21 UTC
I'm guessing that this is a bug in the vertex shader.  Does running with RADEON_NO_TCL=1 fix it?
Comment 6 Pavel Ondračka 2012-02-15 00:12:15 UTC
(In reply to comment #5)
> I'm guessing that this is a bug in the vertex shader.  Does running with RADEON_NO_TCL=1 fix it?

Yes, the test pass with RADEON_NO_TCL=1 set.
Comment 7 vincent 2012-02-23 00:26:52 UTC
Created attachment 57507 [details] [review]
Output remove less aggressive patch

Can you try this patch ?
Comment 8 Pavel Ondračka 2012-02-23 01:58:47 UTC
(In reply to comment #7)
> Created attachment 57507 [details] [review] [review]
> Output remove less aggressive patch
> 
> Can you try this patch ?

Yes, that fixes it.
Comment 9 Tom Stellard 2012-04-13 19:33:32 UTC
Fixed in git commit b2df031a959f36743527b9abc89913ce4f895de3

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.