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

Post-shader error: 0(2): error C0121: #version 300 must be followed by es... #11180

Closed
ProfoundDarkness opened this issue Jun 15, 2018 · 3 comments
Milestone

Comments

@ProfoundDarkness
Copy link

ProfoundDarkness commented Jun 15, 2018

What happens?

Following upgrading from 1.5.4 to 1.6.3. When using Rendering Backend->OpenGL with any postprocessing shader selected (ie FXAA Antialiasing) upon loading a game (any) get an error message on screen (see issue title) and the shader is apparently NOT active. After far too much hunting around found (from source code) how to generate a log file, got the following snippet:

`
59:14:677 idle0 E[G3D]: thin3d\GLQueueRunner.cpp:223 Error in shader compilation for: postshader
59:14:677 idle0 E[G3D]: thin3d\GLQueueRunner.cpp:224 Info log: 0(2) : error C0121: #version 300 must be followed by es
0(2) : error C0201: unsupported version 300
0(6) : error C7532: global type vec2 requires "#version 100" or later
0(6) : error C5060: out can't be used with non-varying v_texcoord0
0(8) : error C7532: global type vec4 requires "#version 100" or later
0(13) : error C7532: global variable gl_Position requires "#version 100" or later

59:14:678 idle0 E[G3D]: thin3d\GLQueueRunner.cpp:225 Shader source:
#version 300
#ifdef GL_ARB_shading_language_420pack
#extension GL_ARB_shading_language_420pack : require
#endif

out vec2 v_texcoord0;
in vec2 a_texcoord0;
in vec4 a_position;

void main()
{
v_texcoord0 = a_texcoord0;
gl_Position = a_position;
gl_Position.z = 2.0 * gl_Position.z - gl_Position.w;
}
`

There are many other snippets with a similar initial error but I don't know how one would post the log to github as the help suggested doing (btw nifty new issue preset).

What should happen?

As in 1.5.4 with opengl backend, game loads and shader appears to be active with no errors.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

Desktop Windows 7 x64 GeForce DX10 (not 10.1) graphics card. 4 gigs ram.

Troubleshooting:

-Tried DX9, no shaders available so not applicable. Vulkan is (as expected) not an option.
-Tried DX11 and surprisingly it worked and the shaders appeared to work (tried a few different ones and they did what they claimed).

In case there were any left over old/invalid files lingering around I also tried a fresh install and got the same error, after I ensured that backend was opengl and a postprocessing shader was selected that is. To put it another way this is happening with defaults + 2 changes.

@unknownbrackets
Copy link
Collaborator

While using OpenGL, can you go to Tools -> System information, scroll all the way down, and check what it says under "API version" and "Shading language"?

I'm guessing it will show something below or maybe equal to v3.3.0, but want to confirm.

options.version = 300;

My guess: this should either be 330 or else needs to do something smarter for older versions. 300 is not actually a valid version of GLSL.

-[Unknown]

@ProfoundDarkness
Copy link
Author

API Version: v3.3.0
Shading language: 3.30 NVIDIA via Cg compiler

@unknownbrackets
Copy link
Collaborator

Thanks for confirming - should be fixed in an upcoming git build (once #11182 is merged.)

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.7.0 milestone Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants