Rpcs3: Black screen: Unhandled GL format: 0x8058

Created on 23 May 2019  路  11Comments  路  Source: RPCS3/rpcs3

Game: Any in the compatible list
Emulator: rpcs3 0.0.6-8155
Firmware: 4.84
Renderer: OpenGL
Tested settings: Default, any other
Operating System: Manjaro Linux Stable
Graphics Card: Radeon HD5870
Driver: Mesa 19.0.4

The emulator throws:
F {RSX [0x0000000]} RSX: St13runtime_error thrown: Unhandled GL format 0x8058
(in file ../rpcs3/Emu/RSX/GL/GLHelpers.h:1651)

Apitrace shows that the error is:
Mesa: User error: GL_INVALID_VALUE in glTexStorage2D(width, height or depth < 1)

Due to the emulator making an invalid call:
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 0, 0);

Where the spec says:
GL_INVALID_VALUE is generated if width, height or levels are less than 1.

Report with trace at Mesa is:
https://bugs.freedesktop.org/show_bug.cgi?id=110724

All 11 comments

Uhm, how is that happening for all games? It would have brought down rpcs3 completely by now since vulkan would also crash with that set of inputs.

Simple answer: width is failing to be retrieved for this specific system only.

Cannot be system wide. More likely you triggered this with a specific corrupted ELF. If its specific to your system, obviously there isn't anything we can do about that.

Tried with two different unrelated games: same result.

I mean your code fails under specific system circumstances.

When setting GLGSRender.cpp: gl::texture, buffer_width is < 1 for some reason.

The bug is at one of these:
GLGSRender.cpp: display_buffers[buffer].width < 1
GLGSRender.cpp: rsx::apply_resolution_scale < 1

Most likely answer: the emulator is failing to retrieve info about either the buffers or the resolution.

Either because of not taking into account a specific less common configuration, or because the serving code is buggy.

Could this be the chain of causes?

GLHelpers.h: Unhandled GL format: 0x8058
GLHelpers.h: glTexStorage2D: width < 1
GLHelpers.h: texture: width < 1
GLGSRender.cpp: gl::texture: buffer_width < 1
GLGSRender.cpp: display_buffers[buffer].width < 1
GLGSRender.cpp: GLGSRender::flip: buffer is nil
GLGSRender.cpp: current_display_buffer: not declared

Those values are set by the games directly; I don't understand how games are not setting up the registers but only for your system? If those are 0, how about the other ~64k configuration registers? This is why this seems suspicious. Check if gs_gcm_cube.elf runs on your system. You can find it in /dev_hdd0/game/TEST12345/USRDIR.

Could you somehow be not using LLE gcm_sys?

Yeah, that was the issue. My distro is missing some files while installing the emulator.

If I download the app image, and I run the emulator from within it, it works.

Thanks for your help 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XeClutch picture XeClutch  路  3Comments

Nezarn picture Nezarn  路  3Comments

On1ko picture On1ko  路  3Comments

legend800 picture legend800  路  3Comments

Xcedf picture Xcedf  路  3Comments