Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL broken on Intel (Windows) since 13691 - RSX: Compilation failed: ERROR: 0:9: 'std430' : syntax error syntax error #12285

Closed
retroNUC opened this issue Jun 26, 2022 · 10 comments · Fixed by #12371

Comments

@retroNUC
Copy link

retroNUC commented Jun 26, 2022

Quick summary

Many games that previously worked in OpenGL backend are now crashing after updating to RPCS3 Version 0.0.22-13691, which is the start of ongoing OpenGL rewrites. Using previous version before these changes (13670) works fine.

Noticed this happing in most games that I had Custom Configs for that were set to run with OpenGL rather than Vulkan video backend during to various compatibility errors. I have tried deleting caches of games, contents of hdd1, resetting RPCS3 config to defaults (except resetting OpenGL), etc.

Log

RPCS3.zip

·F 0:00:41.302676 {RSX [0x0106288]} RSX: Compilation failed: ERROR: 0:9: 'std430' : syntax error syntax error
source: 
#version 450

#define SSBO_BASE_LOCATION 10
#define SSBO(x) (SSBO_BASE_LOCATION + x)

layout(local_size_x = 128, local_size_y = 1, local_size_z = 1) in;

layout(binding=SSBO(0), std430) buffer ssbo0{ uint data_in[]; };
layout(binding=SSBO(1), std430) buffer ssbo1{ uint data_out[]; };
layout(binding=12, std140) uniform parameters
{
	uint image_width;
	uint image_height;

	... (rest of shader dump)

·W 0:00:41.302866 {RSX [0x0106288]} SYS: Emulation has been frozen! You can either use debugger tools to inspect current emulation state or terminate it.
·F 0:00:41.303022 {RSX [0x0106288]} RSX: Linkage failed: Attached compute shader is not compiled.

System Configuration

  • OS - Windows 11 Pro 21H2
  • CPU - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  • GPU - Integrated Iris XE Graphics
  • Driver - 30.0.101.1994 Retail / 30.0.101.3109 Beta
@retroNUC
Copy link
Author

Working: v0.0.22-13600
Not Working: v0.0.22-13750

Will see if I can bisect further.

@kd-11
Copy link
Contributor

kd-11 commented Jun 26, 2022

There is little point. OpenGL is being rewritten.
That said, the problem here is intel's opengl driver. We'll have to see how bad things are when the rewrite is done.

@retroNUC
Copy link
Author

Yeah, narrowed it down to 13691 as the first broken build, which was the first round of your rewrite changes - #12114.

Will stick with the build before this (13670) for now, and potentially bug more of the "Doesn't work on Vulkan, but works on OpenGL" issues so that I don't have to set certain games to OpenGL in the first place. Cheers.

@retroNUC retroNUC changed the title Many games crashing in OpenGL backend after update to 0.0.22-13821 - RSX: Compilation failed: ERROR: 0:9: 'std430' : syntax error syntax error OpenGL broken on Intel (Windows) since 13691 - RSX: Compilation failed: ERROR: 0:9: 'std430' : syntax error syntax error Jun 26, 2022
@AniLeo
Copy link
Member

AniLeo commented Jun 26, 2022

Intel's GL driver on Windows was already not supposed to work since it's of very poor quality, see #6199

@kd-11
Copy link
Contributor

kd-11 commented Jul 15, 2022

std430 is part of GL_ARB_enhanced_layouts and is supposed to be supported on any GPU that advertises support for GL 4.4+
I'll intel to the legacy path of course, but that would mean losing out on all the new improvements as without std430, compute shaders may as well not be supported.

@kd-11 kd-11 self-assigned this Jul 15, 2022
@retroNUC
Copy link
Author

That should be any Intel iGPU since 2015, but knowing their drivers... yeah.
https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html

In this case, I'm running the highlighted one (11th Gen, 2021), so happy to do any testing or provide any more support.
image

@retroNUC
Copy link
Author

retroNUC commented Jul 15, 2022

Hey kd, decided to compile the build and take a look myself. Comparing the dumped broken GLSL snippet with the source, seems like there's something funky with the ordering of GLSL macro expansion on Intel, so doesn't resolve properly. Maybe it's not following all standard C-like rules?

In any case, tested this change locally, and it appears to fix the issue and get Intel working again: 83fbd50

@kd-11
Copy link
Contributor

kd-11 commented Jul 16, 2022

That's a compiler bug. Removing brackets breaks macro chaining since the expression is not contained. At that point it's better to use some other method to generate the replacements and assume intel does not support macros.

@kd-11
Copy link
Contributor

kd-11 commented Jul 19, 2022

#12371 should fix this one.
After thinking about it, these problems are not going to stop, and I'm left with very few options. I'll be adding a spirv compiler to OpenGL which is only to be used for intel windows driver by default. It was either that or just revoke all support for OpenGL on intel. Legacy intel setups will have to use the fallback pipelines that do not support compute shaders and other complex features for a while before we completely drop that as well down the line.

@retroNUC
Copy link
Author

retroNUC commented Aug 28, 2022

Can verify that Intel iGPU is working again with OpenGL on v14088, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants