Bug 96505 - [IVBGT1] piglit.spec.arb_compute_shader.linker.bug-93840 regression
Summary: [IVBGT1] piglit.spec.arb_compute_shader.linker.bug-93840 regression
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-13 04:46 UTC by Mark Janes
Modified: 2018-04-23 13:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Janes 2016-06-13 04:46:30 UTC
This test began asserting with mesa 1db37ebecf5af55215ace3801f8dbb8b10c5305e
i965: Assert that the scratch spaces are in range.

I don't know that anything actually guarantees this, but if we exceed
the limits, we may end up overflowing and trashing random buffers that
happen to be nearby in the VMA space, leading to rendering corruption,
hangs, or worse.

We should really fix this properly.  However, the pitfall has existed
for ages, so for now we should at least detect it.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


shader_runner: /home/jenkins/workspace/Leeroy/repos/mesa/src/mesa/drivers/dri/i965/brw_fs.cpp:6005: void fs_visitor::allocate_registers(bool): Assertion `prog_data->total_scratch < 12 * 1024' failed.

IVBGT1 is not tested for developer branches in CI, so there was no way to catch this pre-commit.
Comment 1 Kenneth Graunke 2016-06-13 06:35:42 UTC
Curro did mention that this would break.  Apparently Ivybridge GT2 only requires SIMD16 for this test to work, while both GT1 and Baytrail require SIMD32, which spills more.

Before this commit we would probably do something totally broken; I would imagine the test would be intermittent.  (Maybe we were getting lucky...)

We should probably implement the real solution.
Comment 2 Mark Janes 2016-06-13 15:13:10 UTC
Should this test be fixed before the series is applied to 12.0?  It passed reliably for the CI.
Comment 3 Kenneth Graunke 2016-06-13 16:11:09 UTC
We could also just skip backporting this patch to 12.0.
Comment 4 Mark Janes 2016-06-22 15:47:07 UTC
As per Ken, the bisected commit adds assertions to detect a pre-existing issue.  As such, it will not affect release builds and cannot be a regression.

A fix has been sent to the list and can be backported after 12.0.
Comment 5 Matt Turner 2016-11-02 01:41:24 UTC
(In reply to Mark Janes from comment #4)
> As per Ken, the bisected commit adds assertions to detect a pre-existing
> issue.  As such, it will not affect release builds and cannot be a
> regression.
> 
> A fix has been sent to the list and can be backported after 12.0.

I have no idea what patch that was (please include its name or URL). Was this bug actually solved? I don't see any references to this bug in git log.
Comment 6 Kenneth Graunke 2016-11-02 02:14:12 UTC
(In reply to Matt Turner from comment #5)
> (In reply to Mark Janes from comment #4)
> > As per Ken, the bisected commit adds assertions to detect a pre-existing
> > issue.  As such, it will not affect release builds and cannot be a
> > regression.
> > 
> > A fix has been sent to the list and can be backported after 12.0.
> 
> I have no idea what patch that was (please include its name or URL). Was
> this bug actually solved? I don't see any references to this bug in git log.

It's this patch:
https://lists.freedesktop.org/archives/mesa-stable/2016-June/004601.html

also see v1 thread:
https://lists.freedesktop.org/archives/mesa-stable/2016-June/004569.html

IIRC I got some review feedback and dropped the ball.  Feel free to pick it up.
Comment 7 Vladimir Los 2018-04-03 12:40:29 UTC
Mark, Is this actual for nowdays?
Comment 8 Vladimir Los 2018-04-03 14:55:19 UTC
$ /home/wlad/Work/piglit/piglit/bin/shader_runner /home/wlad/Work/piglit/piglit/tests/spec/arb_compute_shader/linker/bug-93840.shader_test -auto -fbo 
PIGLIT: {"result": "pass" } 


$ inxi -CGS
System:    Host: wlad-dbg-pc Kernel: 4.14.30-1-MANJARO x86_64 bits: 64 Desktop: Cinnamon 3.6.6 
           Distro: Manjaro Linux 17.1.7 Hakoila 
CPU:       Topology: Quad Core model: Intel Core i5-3470 type: MCP L2 cache: 6144 KB 
           Speed: 1597 MHz min/max: 1600/3600 MHz Core speeds (MHz): 1: 1605 2: 1597 3: 1597 4: 1597 
Graphics:  Card-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller driver: i915 v: kernel 
           Display Server: N/A driver: intel unloaded: fbdev,modesetting,vesa tty: 212x54


$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.2
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL core profile version string: 4.2 (Core Profile) Mesa 17.3.7
OpenGL core profile shading language version string: 4.20
OpenGL version string: 3.0 Mesa 17.3.7
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.3.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00


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.