nv2a: Fix glsl ambiguous overload to prevent renderdoc failure

This commit is contained in:
Erik Abair 2022-04-26 21:18:52 -07:00 committed by mborgerson
parent e80d5fa9c3
commit 6d7f329880
2 changed files with 9 additions and 4 deletions

View File

@ -169,14 +169,19 @@ void gl_debug_frame_terminator(void)
if (rdoc_api->IsTargetControlConnected()) {
if (rdoc_api->IsFrameCapturing()) {
rdoc_api->EndFrameCapture(NULL, NULL);
CHECK_GL_ERROR();
GLenum error = glGetError();
if (error != GL_NO_ERROR) {
fprintf(stderr,
"Renderdoc EndFrameCapture triggered GL error 0x%X - ignoring\n",
error);
}
}
if (renderdoc_capture_frames) {
rdoc_api->StartFrameCapture(NULL, NULL);
GLenum error = glGetError();
if (error != GL_NO_ERROR) {
fprintf(stderr,
"Renderdoc frame capture triggered GL error 0x%X - ignoring\n",
"Renderdoc StartFrameCapture triggered GL error 0x%X - ignoring\n",
error);
}
--renderdoc_capture_frames;

View File

@ -653,8 +653,8 @@ static MString* psh_convert(struct PixelShader *ps)
mstring_append(clip, "bool clipContained = false;\n");
}
mstring_append(clip, "for (int i = 0; i < 8; i++) {\n"
" bvec4 clipTest = bvec4(lessThan(gl_FragCoord.xy-0.5, clipRegion[i].xy),\n"
" greaterThan(gl_FragCoord.xy-0.5, clipRegion[i].zw));\n"
" bvec4 clipTest = bvec4(lessThan(gl_FragCoord.xy-0.5, vec2(clipRegion[i].xy)),\n"
" greaterThan(gl_FragCoord.xy-0.5, vec2(clipRegion[i].zw)));\n"
" if (!any(clipTest)) {\n");
if (ps->state.window_clip_exclusive) {
mstring_append(clip, " discard;\n");