mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add paranoid checks and debug messages for Xe KMD
Xe is the new KMD driver for Intel GPUs on Linux, replacing i915 on LNL and newer. So here just checking if '/proc/sys/dev/xe/perf_stream_paranoid' is also set to 0 and printing debug messages when it is set to 1. Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
This commit is contained in:
committed by
Baldur Karlsson
parent
18256e19d6
commit
02854e6b95
@@ -66,8 +66,8 @@ CounterDescription IntelGlCounters::GetCounterDescription(GPUCounter index) cons
|
||||
desc.name = "Counters limited, see description";
|
||||
desc.category = "More counters are available";
|
||||
desc.description =
|
||||
"Not all counters available, run 'sudo sysctl dev.i915.perf_stream_paranoid=0' to enable "
|
||||
"more counters!";
|
||||
"Not all counters available, run 'sudo sysctl dev.i915.perf_stream_paranoid=0' or "
|
||||
"'sudo sysctl dev.xe.perf_stream_paranoid=0' to enable more counters!";
|
||||
|
||||
desc.resultType = CompType::UInt;
|
||||
desc.resultByteWidth = 8;
|
||||
@@ -197,13 +197,17 @@ bool IntelGlCounters::Init()
|
||||
m_Paranoid = false;
|
||||
|
||||
#if defined(RENDERDOC_PLATFORM_ANDROID) || defined(RENDERDOC_PLATFORM_LINUX)
|
||||
rdcstr contents;
|
||||
FileIO::ReadAll("/proc/sys/dev/i915/perf_stream_paranoid", contents);
|
||||
contents.trim();
|
||||
if(!contents.empty())
|
||||
rdcstr i915_contents, xe_contents;
|
||||
|
||||
FileIO::ReadAll("/proc/sys/dev/i915/perf_stream_paranoid", i915_contents);
|
||||
i915_contents.trim();
|
||||
|
||||
FileIO::ReadAll("/proc/sys/dev/xe/perf_stream_paranoid", xe_contents);
|
||||
xe_contents.trim();
|
||||
|
||||
if(!i915_contents.empty())
|
||||
{
|
||||
int paranoid = atoi(contents.c_str());
|
||||
if(paranoid)
|
||||
if(atoi(i915_contents.c_str()))
|
||||
{
|
||||
RDCWARN(
|
||||
"Not all counters available, run "
|
||||
@@ -211,6 +215,17 @@ bool IntelGlCounters::Init()
|
||||
m_Paranoid = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!xe_contents.empty())
|
||||
{
|
||||
if(atoi(xe_contents.c_str()))
|
||||
{
|
||||
RDCWARN(
|
||||
"Not all counters available, run "
|
||||
"'sudo sysctl dev.xe.perf_stream_paranoid=0' to enable more counters!");
|
||||
m_Paranoid = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user