зеркало из https://github.com/mozilla/gecko-dev.git
Bug 934783 - Fix GPU memory reporter for win7 and reenable. r=njn
This commit is contained in:
Родитель
764bbc2196
Коммит
5970533426
|
@ -104,7 +104,15 @@ typedef struct _D3DKMTQS_PROCESS_INFO
|
|||
|
||||
typedef struct _D3DKMTQS_PROCESS_SEGMENT_INFO
|
||||
{
|
||||
ULONGLONG BytesCommitted;
|
||||
union {
|
||||
struct {
|
||||
ULONGLONG BytesCommitted;
|
||||
} Win8;
|
||||
struct {
|
||||
ULONG BytesCommitted;
|
||||
ULONG UnknownRandomness;
|
||||
} Win7;
|
||||
};
|
||||
|
||||
ULONGLONG Filler[2];
|
||||
ULONG Filler2;
|
||||
|
|
|
@ -239,14 +239,15 @@ public:
|
|||
queryStatistics.hProcess = ProcessHandle;
|
||||
queryStatistics.QueryProcessSegment.SegmentId = i;
|
||||
if (NT_SUCCESS(queryD3DKMTStatistics(&queryStatistics))) {
|
||||
if (aperture)
|
||||
sharedBytesUsed += queryStatistics.QueryResult
|
||||
.ProcessSegmentInfo
|
||||
.BytesCommitted;
|
||||
ULONGLONG bytesCommitted;
|
||||
if (!IsWin8OrLater())
|
||||
bytesCommitted = queryStatistics.QueryResult.ProcessSegmentInfo.Win7.BytesCommitted;
|
||||
else
|
||||
dedicatedBytesUsed += queryStatistics.QueryResult
|
||||
.ProcessSegmentInfo
|
||||
.BytesCommitted;
|
||||
bytesCommitted = queryStatistics.QueryResult.ProcessSegmentInfo.Win8.BytesCommitted;
|
||||
if (aperture)
|
||||
sharedBytesUsed += bytesCommitted;
|
||||
else
|
||||
dedicatedBytesUsed += bytesCommitted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,9 +313,7 @@ gfxWindowsPlatform::gfxWindowsPlatform()
|
|||
|
||||
UpdateRenderMode();
|
||||
|
||||
// This reporter is disabled because it frequently gives bogus values. See
|
||||
// bug 917496.
|
||||
//RegisterStrongMemoryReporter(new GPUAdapterReporter());
|
||||
RegisterStrongMemoryReporter(new GPUAdapterReporter());
|
||||
}
|
||||
|
||||
gfxWindowsPlatform::~gfxWindowsPlatform()
|
||||
|
|
Загрузка…
Ссылка в новой задаче