I’ve narrowed the problem down to a shader execution. The following fragment shader, after execution causes the driver to crash at the next client sync point:
layout (binding = 0) uniform samplerCubeArray texEnv;
in Shared {
vec3 uv;
} pass;
layout (location = 0) out vec4 oColor;
void main() {
vec3 N = normalize(pass.uv);
vec3 irradiance = vec3(0.0);
vec3 up = vec3(0.0, 1.0, 0.0);
vec3 right = normalize(cross(up, N));
up = cross(N, right);
// Integrate over the hemisphere
float sampleDelta = 0.025;
float sampleCount = 0.0;
for (float phi = 0.0; phi < 2.0 * PI; phi += sampleDelta) {
for (float theta = 0.0; theta < 0.5 * PI; theta += sampleDelta) {
// Convert spherical coords to cartesian (in tangent space)
vec3 tangentSample = vec3(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));
// Tangent space to world space conversion
vec3 sampleVec = tangentSample.x * right + tangentSample.y * up + tangentSample.z * N;
irradiance += texture(texEnv, vec4(sampleVec, 0.0)).rgb * cos(theta) * sin(theta);
++sampleCount;
}
}
irradiance *= PI / float(sampleCount);
oColor = vec4(irradiance, 1.0);
}
If I replace the shader with a stub shader that simply samples the cube map array with the passed in uv coords no crash occurs. Again note that all this code works on the Linux Nvidia driver version 455.23.
Edit: If I increase the sampleDelta to 0.1 the crash doesn’t occur so this seems to be timing based.