• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 456 457 458 459 460 ... 1190 Next »

Failed to compile geometry shader (gl_SampleID)
View New Posts | View Today's Posts

Thread Closed 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Failed to compile geometry shader (gl_SampleID)
01-09-2015, 11:06 AM
#1
bdm
Unregistered
 
Steps to reproduce:
1) OSX, 10.9.5 (Late 2013 retina MacBook Pro)
2) Dolphin 4.0-4980 (current build as of today)
3) Graphics Settings > Enhancements > Anti-aliasing: 8x, Stereoscopic 3D Mode: Side-by-Side
4) open game


Results:
"Failed to compile geometry shader!
This usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.

If you're sure this is Dolphin's error anyway, post the contents of <redacted>/Library/Application Support/Dolphin/Dump/bad_gs_0000.txt along with this error message at the forums.

Debug info (NVIDIA Corporation, NVIDIA GeForce GT 750M OpenGL Engine, 4.1 NVIDIA-8.26.28 310.40.55b01):
ERROR: 0:29: Use of undeclared identifier 'gl_SampleID'"


Discussion:
gl_SampleID is invalid in a geometry shader (see:
https://www.opengl.org/registry/specs/ARB/sample_shading.txt
"gl_SampleID" is only added to fragment shader built-in variables, it is not valid in any other stage.)

Note that the failing shader does not actually use the sampleEFB() function, so the invalid syntax is effectively dead code.  Speculation: other platform's shader compilers may perform dead code elimination prior to semantic analysis; Apple's drivers do not and always flag invalid syntax in all shader code.




<bad_gs_0000.txt>
Code:
#version 150




#extension GL_ARB_sample_shading : enable
#define SAMPLER_BINDING(x)

#extension GL_ARB_gpu_shader5 : enable




#define float2 vec2
#define float3 vec3
#define float4 vec4
#define uint2 uvec2
#define uint3 uvec3
#define uint4 uvec4
#define int2 ivec2
#define int3 ivec3
#define int4 ivec4
#define frac fract
#define lerp mix


SAMPLER_BINDING(9) uniform sampler2DMSArray samp9;
vec4 sampleEFB(ivec3 pos) {
    return texelFetch(samp9, pos, gl_SampleID);
}
layout(triangles) in;
layout(triangle_strip, max_vertices = 6) out;
flat out int layer;
void main()
{
    for (int j = 0; j < 2; ++j) {
        for (int i = 0; i < 3; ++i) {
            layer = j;
            gl_Layer = j;
            gl_Position = gl_in[i].gl_Position;
            EmitVertex();
        }
        EndPrimitive();
    }
}
ERROR: 0:29: Use of undeclared identifier 'gl_SampleID'
01-09-2015, 08:26 PM
#2
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 5,919
Threads: 4
Joined: Sep 2013
The problem is that you're running an old graphics driver, and the only way you can update that is to upgrade to OS X 10.10 (blame apple if you want).
Find
01-09-2015, 11:42 PM (This post was last modified: 01-09-2015, 11:58 PM by degasus.)
#3
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,827
Threads: 10
Joined: May 2012
@KHg8m3r Nope, this looks like a real issue. I'm triggering Armada about it.

This function is used in the fragment shader. Can you try to remove this "sampler +" part of this line? https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/VideoBackends/OGL/FramebufferManager.cpp#L302

edit: Or just try 4.0-4993, I guess it's now fixed? Thx for reporting and for debugging the issue.
Find
01-10-2015, 08:52 AM
#4
bdm
Unregistered
 
Verified fixed in 4.0-4993.
Thanks for the quick turnaround.
01-10-2015, 09:05 AM
#5
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 5,919
Threads: 4
Joined: Sep 2013
You should still probably upgrade to OSX 10.10 Tongue
Find
08-13-2015, 10:58 AM
#6
Tabobo
Unregistered
 
I have a problem too, it fails to compile geometry shader but my error from the bad_gs_0000.txt is:
ERROR: 1:23: 'centroid in' : supported in fragment shaders only
ERROR: 1:24: 'centroid in' : supported in fragment shaders only
ERROR: 1:25: 'centroid in' : supported in fragment shaders only
ERROR: 1:26: 'centroid in' : supported in fragment shaders only
it lets me play but i cant see a lot of it, but only with 2 things in the game which are a map and a menu
08-13-2015, 12:07 PM
#7
Kurausukun Offline
Zeitgenössischer Wurst
*******
Posts: 1,034
Threads: 62
Joined: Mar 2014
Read the thread rules. No necroposting. Also, you made you own thread for this, so just be patient.
Find
08-13-2015, 02:48 PM
#8
mbc07 Offline
Wiki Caretaker
*******
Content Creators (Moderators)
Posts: 3,562
Threads: 47
Joined: Dec 2010
Forum Rules Wrote:Necroposting: Do not revive a discussion older than 6 months unless your post adds something meaningful or otherwise contributes to the thread. Please create a new thread about your subject instead. Threads violating this rule will be closed. Stickied threads, Game Discussion threads, and HD Texture threads are exempt, however, and users can freely post there regardless of how old the topics are.
Avell A70 MOB: Core i7-11800H, GeForce RTX 3060, 16 GB DDR4-3200, Windows 11 (Insider Preview)
ASRock Z97M OC Formula: Pentium G3258, GeForce GT 440, 16 GB DDR3-1600, Windows 10 (22H2)
Find
« Next Oldest | Next Newest »
Thread Closed 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode