mirror of
https://github.com/lubosz/overte.git
synced 2025-08-05 11:29:57 +02:00
New plots to watch the GPU load"
"
This commit is contained in:
parent
22ac95d463
commit
800d2db8f1
2 changed files with 85 additions and 0 deletions
21
scripts/developer/utilities/render/renderStatsGPU.js
Normal file
21
scripts/developer/utilities/render/renderStatsGPU.js
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
//
|
||||||
|
// renderStats.js
|
||||||
|
// examples/utilities/tools/render
|
||||||
|
//
|
||||||
|
// Sam Gateau, created on 3/22/2016.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
// Set up the qml ui
|
||||||
|
var qml = Script.resolvePath('statsGPU.qml');
|
||||||
|
var window = new OverlayWindow({
|
||||||
|
title: 'Render Stats GPU',
|
||||||
|
source: qml,
|
||||||
|
width: 320,
|
||||||
|
height: 200
|
||||||
|
});
|
||||||
|
window.setPosition(50, 20);
|
||||||
|
window.closed.connect(function() { Script.stop(); });
|
64
scripts/developer/utilities/render/statsGPU.qml
Normal file
64
scripts/developer/utilities/render/statsGPU.qml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
//
|
||||||
|
// stats.qml
|
||||||
|
// examples/utilities/render
|
||||||
|
//
|
||||||
|
// Created by Zach Pomerantz on 2/8/2016
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import "../lib/plotperf"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: statsUI
|
||||||
|
anchors.fill:parent
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: stats
|
||||||
|
spacing: 8
|
||||||
|
anchors.fill:parent
|
||||||
|
|
||||||
|
property var config: Render.getConfig("Stats")
|
||||||
|
|
||||||
|
function evalEvenHeight() {
|
||||||
|
// Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ?
|
||||||
|
return (height - spacing * (children.length - 1)) / children.length
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PlotPerf {
|
||||||
|
title: "Timing"
|
||||||
|
height: parent.evalEvenHeight()
|
||||||
|
object: parent.drawOpaqueConfig
|
||||||
|
valueUnit: "ms"
|
||||||
|
valueScale: 1
|
||||||
|
valueNumDigits: "4"
|
||||||
|
plots: [
|
||||||
|
{
|
||||||
|
object: Render.getConfig("SurfaceGeometry"),
|
||||||
|
prop: "gpuTime",
|
||||||
|
label: "SurfaceGeometryGPU",
|
||||||
|
color: "#00FFFF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
object: Render.getConfig("RenderDeferred"),
|
||||||
|
prop: "gpuTime",
|
||||||
|
label: "DeferredLighting",
|
||||||
|
color: "#FF00FF"
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
object: Render.getConfig("RangeTimer"),
|
||||||
|
prop: "gpuTime",
|
||||||
|
label: "FrameGPU",
|
||||||
|
color: "#FFFF00"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue