Bug 94739 - Mesa 11.1.2 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_unpack_uint_24_8_depth_stencil_row
Summary: Mesa 11.1.2 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_u...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 17.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
: 103966 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-29 12:20 UTC by Christian Rauscher
Modified: 2017-12-07 04:38 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Cemu 1.6.4 with Super Mario Maker - Mesa 17.0.1 (180.30 KB, application/octet-stream)
2017-03-17 16:57 UTC, Luca Weiss
Details
Proposed patch (git am) (2.15 KB, patch)
2017-03-21 07:34 UTC, Kenneth Graunke
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Rauscher 2016-03-29 12:20:28 UTC
Mesa 11.1.2 implementation error: bad format MESA_FORMAT_Z_FLOAT32 in _mesa_unpack_uint_24_8_depth_stencil_row
Comment 1 Emil Velikov 2016-03-29 13:37:34 UTC
Hi Christian, please provide more information about how you got this message. What application did you run, on which hardware ?
Comment 2 Christian Rauscher 2016-03-29 15:54:04 UTC
I use Open Suse Leap 42.1 as OS.
The two graphic card are managed with bumblebee.
The error occurs when I enter the following 
command and run the virtual machine.

vblank_mode=0 primusrun vmware

GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Mesa 11.1.2 implementation error: bad format MESA_FORMAT_Z24_UNORM_X8_UINT in _mesa_unpack_uint_24_8_depth_stencil_row
Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
Comment 3 Christian Rauscher 2016-03-29 15:56:12 UTC
(In reply to Christian Rauscher from comment #2)
> I use Open Suse Leap 42.1 as OS.
> The two graphic cards are managed with bumblebee.
> The error occurs when I enter the following 
> command and run the virtual machine.
> 
> vblank_mode=0 primusrun vmware
> 
> GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will
> not be saved or shared with other applications.
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> Mesa 11.1.2 implementation error: bad format MESA_FORMAT_Z24_UNORM_X8_UINT
> in _mesa_unpack_uint_24_8_depth_stencil_row
> Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
Comment 4 Christian Rauscher 2016-03-29 16:10:01 UTC

*** This bug has been marked as a duplicate of bug 2 ***
Comment 5 Christian Rauscher 2016-03-29 16:58:35 UTC
Software:
KDE-Plasma-Version: 5.5.5
Qt-Version: 5.5.1
OS: openSUSE Leap 42.1

Hardware:
Processor: Intel Core i7-3630QM CPU
Speicher: 32GB DDR3

Graphic-Chips: 
Nvidia Optimus
Nvidia Geforce GT 650M 2GB RAM
Intel HD Graphics 4000
Comment 6 Luca Weiss 2017-03-14 19:31:40 UTC
GL_RENDERER   = Mesa DRI Intel(R) Haswell Mobile 
GL_VERSION    = 3.0 Mesa 17.0.1
GL_VENDOR     = Intel Open Source Technology Center

I get that error when running Cemu 1.7.2c (Wii U emulator) with Wine. At least Mario Kart 8 and Splatoon can produce that issue.
Comment 7 Emil Velikov 2017-03-15 14:05:43 UTC
Seems to be i965 related, so changing component to dri/i965.

Guys, can anyone provide a small test app that reproduces the problem ? Alternatively doing an apitrace [1], for other devs to use, should help.

Note that the file will be too big for Bugzilla, so please xz it and add a link to google drive [other].

[1] https://github.com/apitrace/apitrace
The wiki has various instructions.
Comment 8 Jason Ekstrand 2017-03-17 16:29:16 UTC
Could someone please provide an apitrace that exhibits the issue?  It should be fairly easy to trace something like Cemu.
Comment 9 Luca Weiss 2017-03-17 16:57:43 UTC
Created attachment 130294 [details]
Cemu 1.6.4 with Super Mario Maker - Mesa 17.0.1

Sorry it took "so long". I tried it two days ago but Cemu crashed the whole time because of some weird error I cannot decipher ("Unhandled exception: page fault on read access to 0x00000020 in 64-bit code (0x00000001400d6db8)"). Sidenote: This isn't the newest Cemu version (1.7.2) but an older one (1.6.4) as the newer one crashes now (see above). I changed some things with Nvidia & non-Nvidia since I wrote that comment so maybe that's because some versions crash.
Comment 10 Kenneth Graunke 2017-03-21 07:34:18 UTC
Created attachment 130338 [details] [review]
Proposed patch (git am)

Ouch, we just didn't handle depth-only in the ClearTexture path at all.  This patch fixes the _mesa_problem() - does it work okay?
Comment 11 Kenneth Graunke 2017-04-18 07:31:45 UTC
Luca, Christian, would one of you be able to test the patch I attached?
Comment 12 Luca Weiss 2017-04-18 08:01:25 UTC
@Kenneth: I can just say, that the error in the console is gone but can't confirm anything as the Cemu window is still just black and doesn't display anything.
Comment 13 Mika 2017-06-16 08:22:38 UTC
The error messages dissapeared. 
As cemus starts on my modified mesa version, I'm able to be positive on this.

Here a screenshoot with both i965 and radeonsi 

http://imgur.com/a/isAqP
Comment 14 Mika 2017-06-16 08:30:50 UTC
I forgot to specify that the patch did not garble display, it's the actual behaviour on i965 with haswell or skylake igp on my mesa version.
Comment 15 Mika 2017-06-16 12:17:26 UTC
New picture:
http://imgur.com/a/p7ggm
Comment 16 Kenneth Graunke 2017-12-07 04:37:35 UTC
*** Bug 103966 has been marked as a duplicate of this bug. ***
Comment 17 Kenneth Graunke 2017-12-07 04:38:49 UTC
Fixed in master by:

commit 8705ed13e3114ad994dbd46387576749f54fc7eb
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Mar 21 00:30:06 2017 -0700

    meta: Fix ClearTexture with GL_DEPTH_COMPONENT.
    
    We only handled unpacking for GL_DEPTH_STENCIL formats.
    
    Cemu was hitting _mesa_problem() for an unsupported format in
    _mesa_unpack_float_32_uint_24_8_depth_stencil_row(), because the
    format was depth-only, rather than depth-stencil.
    
    Cc: "13.0 12.0" <mesa-stable@lists.freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94739
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103966
    Reviewed-by: Tapani Pälli <tapani.palli@intel.com>


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.