-
Notifications
You must be signed in to change notification settings - Fork 492
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
glretrace: Add possibility to check for a lost context #794
base: master
Are you sure you want to change the base?
Conversation
Completely untested ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things, otherwise looks great. Thanks!
retrace/glretrace_egl.cpp
Outdated
@@ -268,6 +268,8 @@ static void retrace_eglCreateContext(trace::Call &call) { | |||
break; | |||
} | |||
|
|||
if (retrace::notifyLostContext) | |||
profile.notifyLostContext = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1
-> true
retrace/glretrace_egl.cpp
Outdated
@@ -326,13 +328,20 @@ static void retrace_eglSwapBuffers(trace::Call &call) { | |||
} | |||
} else { | |||
glFlush(); | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spurious whitespace
retrace/glretrace_egl.cpp
Outdated
|
||
if (retrace::profilingFrameTimes) { | ||
// Wait for presentation to finish | ||
glFinish(); | ||
std::cout << "rendering_finished " << glretrace::getCurrentTime() << std::endl; | ||
} | ||
|
||
if (retrace::notifyLostContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& ... has_EXT_create_context_robustness
565ab6d
to
a78f75a
Compare
@okias, do you have a trace that triggers GPU resets? If so, please see if this works/helps. |
retrace/glretrace_glx.cpp
Outdated
@@ -159,6 +159,15 @@ static void retrace_glXSwapBuffers(trace::Call &call) { | |||
glFlush(); | |||
} | |||
|
|||
if (retrace::notifyLostContext) { | |||
if (glGetGraphicsResetStatus() != GL_NO_ERROR) { | |||
std::cout << "Context was lost aborting rendering" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
Here should be std::cerr << "error: Context ...
I have on Mesa3D CI, but since it involve lot of work, I'm looking for a way how to kill my TGL GPU in laptop first :) |
ok, with
from xorg-intel-gpu-tools on TGL. And it does nothing when running
|
I tried iterate whole |
@okias what backend is used to create the context when running the trace? |
my bad, it's GLX. I thought I have at least something traced in EGL, but I don't see any trace with EGL. |
retrace/retrace_main.cpp
Outdated
@@ -729,6 +729,7 @@ usage(const char *argv0) { | |||
" --no-context-check don't check that the actual GL context version matches the requested version\n" | |||
" --min-cpu-time=NANOSECONDS ignore calls with less than this CPU time when profiling (default is 1000)\n" | |||
" --ignore-calls=CALLSET ignore calls in CALLSET\n" | |||
" --notify-context-lost enable_context_lost_notify\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notify-lost-context, word order is incorrect
for a regular run without crashing it. |
b360656
to
341e9c0
Compare
I tried |
Signed-off-by: Gert Wollny <[email protected]>
Add a command line option to create an EGL context that supports lost context notification, and check with each rendered frame whether the context was lost. In that case abort replaying and return an error code -2. v2: Check for support before querying the reset status (EGL) Signed-off-by: Gert Wollny <[email protected]>
v2: check for support before using the reset status query (GLX) Signed-off-by: Gert Wollny <[email protected]>
341e9c0
to
f4ed1e2
Compare
Add a command line option to create an EGL context that supports
lost context notification, and check with each rendered frame whether
the context was lost. In that case abort replaying and return an error
code -2.
Closes: #787
Signed-off-by: Gert Wollny [email protected]