Bug 96517

Summary: [llvmpipe] piglit arb_uniform_buffer_object-rendering-dsa regression
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: prefect_
Version: gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2016-06-13 23:31:14 UTC
mesa: 4825264f75c83576f251290547f121f066b46a70 (master 12.1.0-devel)


$ ./bin/arb_uniform_buffer_object-rendering-dsa -auto
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 16
UBO ub_pos_size: index = 1, size = 16
UBO ub_color: index = 2, size = 32
UBO ub_rot: index = 0, size = 16
Probe color at (120,40)
  Expected: 0.000000 1.000000 0.000000 0.250000
  Observed: 1.000000 0.000000 0.000000 0.501961
Probe color at (40,120)
  Expected: 0.000000 0.000000 1.000000 0.200000
  Observed: 1.000000 0.000000 0.000000 0.501961
Probe color at (120,120)
  Expected: 1.000000 1.000000 1.000000 1.000000
  Observed: 1.000000 0.000000 0.000000 0.501961
PIGLIT: {"result": "fail" }


6e6fd911da8a1d9cd62fe0a8a4cc0fb7bdccfe02 is the first bad commit
commit 6e6fd911da8a1d9cd62fe0a8a4cc0fb7bdccfe02
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Sat Jun 4 13:26:46 2016 -0400

    st/mesa: use buffer usage history to set dirty flags for revalidation
    
    We were previously unconditionally doing this for arrays and ubo's, and
    ignoring texture/storage/atomic buffers. Instead use the usage history
    to determine which atoms need to be revalidated.
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
    Cc: "12.0" <mesa-stable@lists.freedesktop.org>

:040000 040000 8376e8592f88901d5100ed9cea8ee9d38162bbca 09bc7466f259ab6c0094f1368660f6b9ef25c481 M	src
bisect run success
Comment 1 Ilia Mirkin 2016-06-13 23:33:08 UTC
This is a llvmpipe bug, see discussion starting with

https://lists.freedesktop.org/archives/mesa-dev/2016-June/119829.html
Comment 2 Roland Scheidegger 2016-06-13 23:44:11 UTC
(In reply to Ilia Mirkin from comment #1)
> This is a llvmpipe bug, see discussion starting with
> 
> https://lists.freedesktop.org/archives/mesa-dev/2016-June/119829.html

Well technically it's not a llvmpipe bug since the state tracker violates the bind flag contract. Albeit that might be hair splitting since the state tracker never did and other state trackers have to cope with it too.
In any case, a fix (more a workaround) is proposed here:
https://lists.freedesktop.org/archives/mesa-dev/2016-June/120299.html
Comment 3 Roland Scheidegger 2016-06-13 23:44:45 UTC
(In reply to Roland Scheidegger from comment #2)
> tracker never did and other state trackers have to cope with it too.
Sorry, that should have been drivers here.
Comment 4 Ilia Mirkin 2016-06-13 23:53:10 UTC
\(In reply to Roland Scheidegger from comment #2)
> (In reply to Ilia Mirkin from comment #1)
> > This is a llvmpipe bug, see discussion starting with
> > 
> > https://lists.freedesktop.org/archives/mesa-dev/2016-June/119829.html
> 
> Well technically it's not a llvmpipe bug since the state tracker violates
> the bind flag contract. Albeit that might be hair splitting since the state

Right, all the other driver backends cope with the reality that pipe_resource->bind is only there to lull the backend author into a false sense of comfort, while llvmpipe drank the blue pill :)

In any case, my change is not wrong, it merely stopped dirtying constbufs when they weren't dirty. There were plenty of ways to hit this issue without my change. In this case, dirtying array buffers (with piglit_draw_rect) caused the constbufs to also be marked dirty, which happened to work out in this case.
Comment 5 Roland Scheidegger 2016-06-14 20:15:25 UTC
Fixed by f4184d5450c12e107d3e41ae29e5927c75543259.

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.