mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 14:28:03 +02:00
Merge pull request #10765 from samcake/brown
Adding Profiling for script engine timer callback
This commit is contained in:
commit
04d74a715a
15 changed files with 130 additions and 190 deletions
|
@ -124,6 +124,11 @@ signals:
|
|||
void dirtyEnabled();
|
||||
};
|
||||
|
||||
class TConfigProxy {
|
||||
public:
|
||||
using Config = JobConfig;
|
||||
};
|
||||
|
||||
class TaskConfig : public JobConfig {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -134,12 +139,37 @@ public:
|
|||
TaskConfig() = default ;
|
||||
TaskConfig(bool enabled) : JobConfig(enabled) {}
|
||||
|
||||
|
||||
|
||||
// Get a sub job config through task.getConfig(path)
|
||||
// where path can be:
|
||||
// - <job_name> search for the first job named job_name traversing the the sub graph of task and jobs (from this task as root)
|
||||
// - <parent_name>.[<sub_parent_names>.]<job_name>
|
||||
// Allowing to first look for the parent_name job (from this task as root) and then search from there for the
|
||||
// optional sub_parent_names and finally from there looking for the job_name (assuming every job in the path were found)
|
||||
//
|
||||
// getter for qml integration, prefer the templated getter
|
||||
Q_INVOKABLE QObject* getConfig(const QString& name) { return QObject::findChild<JobConfig*>(name); }
|
||||
Q_INVOKABLE QObject* getConfig(const QString& name) { return getConfig<TConfigProxy>(name.toStdString()); }
|
||||
// getter for cpp (strictly typed), prefer this getter
|
||||
template <class T> typename T::Config* getConfig(std::string job = "") const {
|
||||
QString name = job.empty() ? QString() : QString(job.c_str()); // an empty string is not a null string
|
||||
return findChild<typename T::Config*>(name);
|
||||
const TaskConfig* root = this;
|
||||
QString path = (job.empty() ? QString() : QString(job.c_str())); // an empty string is not a null string
|
||||
auto tokens = path.split('.', QString::SkipEmptyParts);
|
||||
|
||||
if (tokens.empty()) {
|
||||
tokens.push_back(QString());
|
||||
} else {
|
||||
while (tokens.size() > 1) {
|
||||
auto name = tokens.front();
|
||||
tokens.pop_front();
|
||||
root = QObject::findChild<TaskConfig*>(name);
|
||||
if (!root) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return root->findChild<typename T::Config*>(tokens.front());
|
||||
}
|
||||
|
||||
void connectChildConfig(QConfigPointer childConfig, const std::string& name);
|
||||
|
|
|
@ -1020,6 +1020,7 @@ void ScriptEngine::run() {
|
|||
emit runningStateChanged();
|
||||
|
||||
{
|
||||
PROFILE_RANGE(script, _fileNameString);
|
||||
evaluate(_scriptContents, _fileNameString);
|
||||
maybeEmitUncaughtException(__FUNCTION__);
|
||||
}
|
||||
|
@ -1283,6 +1284,7 @@ void ScriptEngine::timerFired() {
|
|||
|
||||
// call the associated JS function, if it exists
|
||||
if (timerData.function.isValid()) {
|
||||
PROFILE_RANGE(script, __FUNCTION__);
|
||||
auto preTimer = p_high_resolution_clock::now();
|
||||
callWithEnvironment(timerData.definingEntityIdentifier, timerData.definingSandboxURL, timerData.function, timerData.function, QScriptValueList());
|
||||
auto postTimer = p_high_resolution_clock::now();
|
||||
|
|
|
@ -49,11 +49,15 @@ Item {
|
|||
|
||||
property var valueMax : 1
|
||||
|
||||
property var _values : new Array()
|
||||
property var _values
|
||||
property var tick : 0
|
||||
|
||||
function createValues() {
|
||||
if (!_values) {
|
||||
_values = new Array();
|
||||
}
|
||||
for (var i =0; i < plots.length; i++) {
|
||||
|
||||
var plot = plots[i];
|
||||
var object = plot["object"] || root.object;
|
||||
var value = plot["prop"];
|
||||
|
@ -93,7 +97,7 @@ Item {
|
|||
|
||||
var VALUE_HISTORY_SIZE = 100;
|
||||
tick++;
|
||||
|
||||
|
||||
var currentValueMax = 0
|
||||
for (var i = 0; i < _values.length; i++) {
|
||||
|
||||
|
@ -128,7 +132,6 @@ Item {
|
|||
if ((valueMax < currentValueMax) || (tick % VALUE_HISTORY_SIZE == 0)) {
|
||||
valueMax = currentValueMax;
|
||||
}
|
||||
|
||||
mycanvas.requestPaint()
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import "configSlider"
|
|||
import "../lib/plotperf"
|
||||
|
||||
Column {
|
||||
property var mainViewTask: Render.getConfig("RenderMainView")
|
||||
spacing: 8
|
||||
Column {
|
||||
id: surfaceGeometry
|
||||
|
@ -33,7 +32,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr(modelData.split(":")[0])
|
||||
integral: (modelData.split(":")[3] == 'true')
|
||||
config: mainViewTask.getConfig("AmbientOcclusion")
|
||||
config: Render.getConfig("RenderMainView.AmbientOcclusion")
|
||||
property: modelData.split(":")[1]
|
||||
max: modelData.split(":")[2]
|
||||
min: 0.0
|
||||
|
@ -51,8 +50,8 @@ Column {
|
|||
]
|
||||
CheckBox {
|
||||
text: qsTr(modelData.split(":")[0])
|
||||
checked: mainViewTask.getConfig("AmbientOcclusion")[modelData.split(":")[1]]
|
||||
onCheckedChanged: { mainViewTask.getConfig("AmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||
checked: Render.getConfig("RenderMainView.AmbientOcclusion")[modelData.split(":")[1]]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.AmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +62,8 @@ Column {
|
|||
]
|
||||
CheckBox {
|
||||
text: qsTr(modelData.split(":")[0])
|
||||
checked: mainViewTask.getConfig("DebugAmbientOcclusion")[modelData.split(":")[1]]
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugAmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugAmbientOcclusion")[modelData.split(":")[1]]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugAmbientOcclusion")[modelData.split(":")[1]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +72,7 @@ Column {
|
|||
PlotPerf {
|
||||
title: "Timing"
|
||||
height: 50
|
||||
object: mainViewTask.getConfig("AmbientOcclusion")
|
||||
object: Render.getConfig("RenderMainView.AmbientOcclusion")
|
||||
valueUnit: "ms"
|
||||
valueScale: 1
|
||||
valueNumDigits: "3"
|
||||
|
|
|
@ -14,9 +14,8 @@ import "configSlider"
|
|||
Column {
|
||||
id: root
|
||||
spacing: 8
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
property var sceneOctree: mainViewTask.getConfig("DrawSceneOctree");
|
||||
property var itemSelection: mainViewTask.getConfig("DrawItemSelection");
|
||||
property var sceneOctree: Render.getConfig("RenderMainView.DrawSceneOctree");
|
||||
property var itemSelection: Render.getConfig("RenderMainView.DrawItemSelection");
|
||||
|
||||
Component.onCompleted: {
|
||||
sceneOctree.enabled = true;
|
||||
|
@ -31,8 +30,8 @@ Column {
|
|||
Component.onDestruction: {
|
||||
sceneOctree.enabled = false;
|
||||
itemSelection.enabled = false;
|
||||
mainViewTask.getConfig("FetchSceneSelection").freezeFrustum = false;
|
||||
mainViewTask.getConfig("CullSceneSelection").freezeFrustum = false;
|
||||
Render.getConfig("RenderMainView.FetchSceneSelection").freezeFrustum = false;
|
||||
Render.getConfig("RenderMainView.CullSceneSelection").freezeFrustum = false;
|
||||
}
|
||||
|
||||
GroupBox {
|
||||
|
@ -46,8 +45,8 @@ Column {
|
|||
text: "Freeze Culling Frustum"
|
||||
checked: false
|
||||
onCheckedChanged: {
|
||||
mainViewTask.getConfig("FetchSceneSelection").freezeFrustum = checked;
|
||||
mainViewTask.getConfig("CullSceneSelection").freezeFrustum = checked;
|
||||
Render.getConfig("RenderMainView.FetchSceneSelection").freezeFrustum = checked;
|
||||
Render.getConfig("RenderMainView.CullSceneSelection").freezeFrustum = checked;
|
||||
}
|
||||
}
|
||||
Label {
|
||||
|
@ -99,12 +98,12 @@ Column {
|
|||
|
||||
Column{
|
||||
Repeater {
|
||||
model: [ "Opaque:DrawOpaqueDeferred", "Transparent:DrawTransparentDeferred", "Light:DrawLight",
|
||||
"Opaque Overlays:DrawOverlay3DOpaque", "Transparent Overlays:DrawOverlay3DTransparent" ]
|
||||
model: [ "Opaque:RenderMainView.DrawOpaqueDeferred", "Transparent:RenderMainView.DrawTransparentDeferred", "Light:RenderMainView.DrawLight",
|
||||
"Opaque Overlays:RenderMainView.DrawOverlay3DOpaque", "Transparent Overlays:RenderMainView.DrawOverlay3DTransparent" ]
|
||||
ConfigSlider {
|
||||
label: qsTr(modelData.split(":")[0])
|
||||
integral: true
|
||||
config: mainViewTask.getConfig(modelData.split(":")[1])
|
||||
config: Render.getConfig(modelData.split(":")[1])
|
||||
property: "maxDrawn"
|
||||
max: config.numDrawn
|
||||
min: -1
|
||||
|
|
|
@ -13,7 +13,7 @@ var qml = Script.resolvePath('ambientOcclusionPass.qml');
|
|||
var window = new OverlayWindow({
|
||||
title: 'Ambient Occlusion Pass',
|
||||
source: qml,
|
||||
width: 400, height: 250,
|
||||
width: 400, height: 300,
|
||||
});
|
||||
window.setPosition(Window.innerWidth - 420, 50 + 550 + 50);
|
||||
window.closed.connect(function() { Script.stop(); });
|
||||
|
|
|
@ -13,7 +13,7 @@ var qml = Script.resolvePath('deferredLighting.qml');
|
|||
var window = new OverlayWindow({
|
||||
title: 'Lighting',
|
||||
source: qml,
|
||||
width: 400, height:350,
|
||||
width: 400, height:400,
|
||||
});
|
||||
window.setPosition(Window.innerWidth - 420, 50);
|
||||
window.closed.connect(function() { Script.stop(); });
|
||||
|
|
|
@ -15,7 +15,7 @@ var window = new OverlayWindow({
|
|||
title: 'Light Clustering',
|
||||
source: qml,
|
||||
width: 400,
|
||||
height: 300
|
||||
height: 400
|
||||
});
|
||||
window.setPosition(Window.innerWidth - 420, 50 + 250 + 50 + 250 + 50 );
|
||||
window.closed.connect(function() { Script.stop(); });
|
|
@ -17,19 +17,18 @@ Column {
|
|||
Column {
|
||||
id: lightClustering
|
||||
spacing: 10
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
|
||||
Column{
|
||||
PlotPerf {
|
||||
title: "Light CLustering Timing"
|
||||
height: 50
|
||||
object: mainViewTask.getConfig("LightClustering")
|
||||
object: Render.getConfig("RenderMainView.LightClustering")
|
||||
valueUnit: "ms"
|
||||
valueScale: 1
|
||||
valueNumDigits: "4"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "cpuRunTime",
|
||||
label: "time",
|
||||
scale: 1,
|
||||
|
@ -41,19 +40,19 @@ Column {
|
|||
PlotPerf {
|
||||
title: "Lights"
|
||||
height: 50
|
||||
object: mainViewTask.getConfig("LightClustering")
|
||||
object: Render.getConfig("RenderMainView.LightClustering")
|
||||
valueUnit: ""
|
||||
valueScale: 1
|
||||
valueNumDigits: "0"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "numClusteredLights",
|
||||
label: "visible",
|
||||
color: "#D959FE"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "numInputLights",
|
||||
label: "input",
|
||||
color: "#FED959"
|
||||
|
@ -64,25 +63,25 @@ Column {
|
|||
PlotPerf {
|
||||
title: "Scene Lights"
|
||||
height: 80
|
||||
object: mainViewTask.getConfig("LightClustering")
|
||||
object: Render.getConfig("RenderMainView.LightClustering")
|
||||
valueUnit: ""
|
||||
valueScale: 1
|
||||
valueNumDigits: "0"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "numSceneLights",
|
||||
label: "current",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "numFreeSceneLights",
|
||||
label: "free",
|
||||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("LightClustering"),
|
||||
object: Render.getConfig("RenderMainView.LightClustering"),
|
||||
prop: "numAllocatedSceneLights",
|
||||
label: "allocated",
|
||||
color: "#9495FF"
|
||||
|
@ -93,7 +92,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr("Range Near [m]")
|
||||
integral: false
|
||||
config: mainViewTask.getConfig("LightClustering")
|
||||
config: Render.getConfig("RenderMainView.LightClustering")
|
||||
property: "rangeNear"
|
||||
max: 20.0
|
||||
min: 0.1
|
||||
|
@ -101,7 +100,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr("Range Far [m]")
|
||||
integral: false
|
||||
config: mainViewTask.getConfig("LightClustering")
|
||||
config: Render.getConfig("RenderMainView.LightClustering")
|
||||
property: "rangeFar"
|
||||
max: 500.0
|
||||
min: 100.0
|
||||
|
@ -109,7 +108,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr("Grid X")
|
||||
integral: true
|
||||
config: mainViewTask.getConfig("LightClustering")
|
||||
config: Render.getConfig("RenderMainView.LightClustering")
|
||||
property: "dimX"
|
||||
max: 32
|
||||
min: 1
|
||||
|
@ -117,7 +116,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr("Grid Y")
|
||||
integral: true
|
||||
config: mainViewTask.getConfig("LightClustering")
|
||||
config: Render.getConfig("RenderMainView.LightClustering")
|
||||
property: "dimY"
|
||||
max: 32
|
||||
min: 1
|
||||
|
@ -125,33 +124,33 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr("Grid Z")
|
||||
integral: true
|
||||
config: mainViewTask.getConfig("LightClustering")
|
||||
config: Render.getConfig("RenderMainView.LightClustering")
|
||||
property: "dimZ"
|
||||
max: 31
|
||||
min: 1
|
||||
}
|
||||
CheckBox {
|
||||
text: "Freeze"
|
||||
checked: mainViewTask.getConfig("LightClustering")["freeze"]
|
||||
onCheckedChanged: { mainViewTask.getConfig("LightClustering")["freeze"] = checked }
|
||||
checked: Render.getConfig("RenderMainView.LightClustering")["freeze"]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.LightClustering")["freeze"] = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Draw Grid"
|
||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawGrid"]
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawGrid"] = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawGrid"]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawGrid"] = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Draw Cluster From Depth"
|
||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawClusterFromDepth"]
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawClusterFromDepth"] = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawClusterFromDepth"]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawClusterFromDepth"] = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Draw Content"
|
||||
checked: mainViewTask.getConfig("DebugLightClusters")["doDrawContent"]
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugLightClusters")["doDrawContent"] = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugLightClusters")["doDrawContent"]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugLightClusters")["doDrawContent"] = checked }
|
||||
}
|
||||
Label {
|
||||
text: "Num Cluster Items = " + mainViewTask.getConfig("LightClustering")["numClusteredLightReferences"].toFixed(0)
|
||||
text: "Num Cluster Items = " + Render.getConfig("RenderMainView.LightClustering")["numClusteredLightReferences"].toFixed(0)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@ var qml = Script.resolvePath('stats.qml');
|
|||
var window = new OverlayWindow({
|
||||
title: 'Render Stats',
|
||||
source: qml,
|
||||
width: 320,
|
||||
height: 720
|
||||
width: 400,
|
||||
height: 400
|
||||
});
|
||||
window.setPosition(500, 50);
|
||||
window.closed.connect(function() { Script.stop(); });
|
|
@ -21,99 +21,13 @@ Item {
|
|||
spacing: 8
|
||||
anchors.fill:parent
|
||||
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
property var config: mainViewTask.getConfig("Stats")
|
||||
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: "Num Buffers"
|
||||
height: parent.evalEvenHeight()
|
||||
object: stats.config
|
||||
plots: [
|
||||
{
|
||||
prop: "bufferCPUCount",
|
||||
label: "CPU",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
prop: "bufferGPUCount",
|
||||
label: "GPU",
|
||||
color: "#1AC567"
|
||||
}
|
||||
]
|
||||
}
|
||||
PlotPerf {
|
||||
title: "gpu::Buffer Memory"
|
||||
height: parent.evalEvenHeight()
|
||||
object: stats.config
|
||||
valueScale: 1048576
|
||||
valueUnit: "Mb"
|
||||
valueNumDigits: "1"
|
||||
plots: [
|
||||
{
|
||||
prop: "bufferCPUMemoryUsage",
|
||||
label: "CPU",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
prop: "bufferGPUMemoryUsage",
|
||||
label: "GPU",
|
||||
color: "#1AC567"
|
||||
}
|
||||
]
|
||||
}
|
||||
PlotPerf {
|
||||
title: "Num Textures"
|
||||
height: parent.evalEvenHeight()
|
||||
object: stats.config
|
||||
plots: [
|
||||
{
|
||||
prop: "textureCPUCount",
|
||||
label: "CPU",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
prop: "textureGPUCount",
|
||||
label: "GPU",
|
||||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
prop: "texturePendingGPUTransferCount",
|
||||
label: "Transfer",
|
||||
color: "#9495FF"
|
||||
}
|
||||
]
|
||||
}
|
||||
PlotPerf {
|
||||
title: "gpu::Texture Memory"
|
||||
height: parent.evalEvenHeight()
|
||||
object: stats.config
|
||||
valueScale: 1048576
|
||||
valueUnit: "Mb"
|
||||
valueNumDigits: "1"
|
||||
plots: [
|
||||
{
|
||||
prop: "textureCPUMemoryUsage",
|
||||
label: "CPU",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
prop: "textureGPUMemoryUsage",
|
||||
label: "GPU",
|
||||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
prop: "textureGPUVirtualMemoryUsage",
|
||||
label: "GPU Virtual",
|
||||
color: "#9495FF"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
PlotPerf {
|
||||
title: "Triangles"
|
||||
height: parent.evalEvenHeight()
|
||||
|
@ -183,9 +97,9 @@ Item {
|
|||
]
|
||||
}
|
||||
|
||||
property var drawOpaqueConfig: mainViewTask.getConfig("DrawOpaqueDeferred")
|
||||
property var drawTransparentConfig: mainViewTask.getConfig("DrawTransparentDeferred")
|
||||
property var drawLightConfig: mainViewTask.getConfig("DrawLight")
|
||||
property var drawOpaqueConfig: Render.getConfig("RenderMainView.DrawOpaqueDeferred")
|
||||
property var drawTransparentConfig: Render.getConfig("RenderMainView.DrawTransparentDeferred")
|
||||
property var drawLightConfig: Render.getConfig("RenderMainView.DrawLight")
|
||||
|
||||
PlotPerf {
|
||||
title: "Items"
|
||||
|
@ -200,13 +114,13 @@ Item {
|
|||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("DrawTransparentDeferred"),
|
||||
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
|
||||
prop: "numDrawn",
|
||||
label: "Translucents",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("DrawLight"),
|
||||
object: Render.getConfig("RenderMainView.DrawLight"),
|
||||
prop: "numDrawn",
|
||||
label: "Lights",
|
||||
color: "#FED959"
|
||||
|
@ -223,25 +137,25 @@ Item {
|
|||
valueNumDigits: "2"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("DrawOpaqueDeferred"),
|
||||
object: Render.getConfig("RenderMainView.DrawOpaqueDeferred"),
|
||||
prop: "cpuRunTime",
|
||||
label: "Opaques",
|
||||
color: "#1AC567"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("DrawTransparentDeferred"),
|
||||
object: Render.getConfig("RenderMainView.DrawTransparentDeferred"),
|
||||
prop: "cpuRunTime",
|
||||
label: "Translucents",
|
||||
color: "#00B4EF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("RenderDeferred"),
|
||||
object: Render.getConfig("RenderMainView.RenderDeferred"),
|
||||
prop: "cpuRunTime",
|
||||
label: "Lighting",
|
||||
color: "#FED959"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("RenderDeferredTask"),
|
||||
object: Render.getConfig("RenderMainView.RenderDeferredTask"),
|
||||
prop: "cpuRunTime",
|
||||
label: "RenderFrame",
|
||||
color: "#E2334D"
|
||||
|
|
|
@ -20,10 +20,7 @@ Item {
|
|||
id: stats
|
||||
spacing: 8
|
||||
anchors.fill:parent
|
||||
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
property var config: mainViewTask.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
|
||||
|
@ -39,31 +36,31 @@ Item {
|
|||
valueNumDigits: "4"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("OpaqueRangeTimer"),
|
||||
object: Render.getConfig("RenderMainView.OpaqueRangeTimer"),
|
||||
prop: "gpuRunTime",
|
||||
label: "Opaque",
|
||||
color: "#FFFFFF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("LinearDepth"),
|
||||
object: Render.getConfig("RenderMainView.LinearDepth"),
|
||||
prop: "gpuRunTime",
|
||||
label: "LinearDepth",
|
||||
color: "#00FF00"
|
||||
},{
|
||||
object: mainViewTask.getConfig("SurfaceGeometry"),
|
||||
object: Render.getConfig("RenderMainView.SurfaceGeometry"),
|
||||
prop: "gpuRunTime",
|
||||
label: "SurfaceGeometry",
|
||||
color: "#00FFFF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("RenderDeferred"),
|
||||
object: Render.getConfig("RenderMainView.RenderDeferred"),
|
||||
prop: "gpuRunTime",
|
||||
label: "DeferredLighting",
|
||||
color: "#FF00FF"
|
||||
}
|
||||
,
|
||||
{
|
||||
object: mainViewTask.getConfig("ToneAndPostRangeTimer"),
|
||||
object: Render.getConfig("RenderMainView.ToneAndPostRangeTimer"),
|
||||
prop: "gpuRunTime",
|
||||
label: "tone and post",
|
||||
color: "#FF0000"
|
||||
|
@ -79,31 +76,31 @@ Item {
|
|||
valueNumDigits: "3"
|
||||
plots: [
|
||||
{
|
||||
object: mainViewTask.getConfig("OpaqueRangeTimer"),
|
||||
object: Render.getConfig("RenderMainView.OpaqueRangeTimer"),
|
||||
prop: "batchRunTime",
|
||||
label: "Opaque",
|
||||
color: "#FFFFFF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("LinearDepth"),
|
||||
object: Render.getConfig("RenderMainView.LinearDepth"),
|
||||
prop: "batchRunTime",
|
||||
label: "LinearDepth",
|
||||
color: "#00FF00"
|
||||
},{
|
||||
object: mainViewTask.getConfig("SurfaceGeometry"),
|
||||
object: Render.getConfig("RenderMainView.SurfaceGeometry"),
|
||||
prop: "batchRunTime",
|
||||
label: "SurfaceGeometry",
|
||||
color: "#00FFFF"
|
||||
},
|
||||
{
|
||||
object: mainViewTask.getConfig("RenderDeferred"),
|
||||
object: Render.getConfig("RenderMainView.RenderDeferred"),
|
||||
prop: "batchRunTime",
|
||||
label: "DeferredLighting",
|
||||
color: "#FF00FF"
|
||||
}
|
||||
,
|
||||
{
|
||||
object: mainViewTask.getConfig("ToneAndPostRangeTimer"),
|
||||
object: Render.getConfig("RenderMainView.ToneAndPostRangeTimer"),
|
||||
prop: "batchRunTime",
|
||||
label: "tone and post",
|
||||
color: "#FF0000"
|
||||
|
|
|
@ -16,29 +16,28 @@ Column {
|
|||
Column {
|
||||
id: scattering
|
||||
spacing: 10
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
|
||||
Column{
|
||||
Column{
|
||||
CheckBox {
|
||||
text: "Scattering"
|
||||
checked: mainViewTask.getConfig("Scattering").enableScattering
|
||||
onCheckedChanged: { mainViewTask.getConfig("Scattering").enableScattering = checked }
|
||||
checked: Render.getConfig("RenderMainView.Scattering").enableScattering
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.Scattering").enableScattering = checked }
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
text: "Show Scattering BRDF"
|
||||
checked: mainViewTask.getConfig("Scattering").showScatteringBRDF
|
||||
onCheckedChanged: { mainViewTask.getConfig("Scattering").showScatteringBRDF = checked }
|
||||
checked: Render.getConfig("RenderMainView.Scattering").showScatteringBRDF
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.Scattering").showScatteringBRDF = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Show Curvature"
|
||||
checked: mainViewTask.getConfig("Scattering").showCurvature
|
||||
onCheckedChanged: { mainViewTask.getConfig("Scattering").showCurvature = checked }
|
||||
checked: Render.getConfig("RenderMainView.Scattering").showCurvature
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.Scattering").showCurvature = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Show Diffused Normal"
|
||||
checked: mainViewTask.getConfig("Scattering").showDiffusedNormal
|
||||
onCheckedChanged: { mainViewTask.getConfig("Scattering").showDiffusedNormal = checked }
|
||||
checked: Render.getConfig("RenderMainView.Scattering").showDiffusedNormal
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.Scattering").showDiffusedNormal = checked }
|
||||
}
|
||||
Repeater {
|
||||
model: [ "Scattering Bent Red:Scattering:bentRed:2.0",
|
||||
|
@ -59,23 +58,23 @@ Column {
|
|||
}
|
||||
CheckBox {
|
||||
text: "Scattering Profile"
|
||||
checked: mainViewTask.getConfig("DebugScattering").showProfile
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugScattering").showProfile = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugScattering").showProfile
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugScattering").showProfile = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Scattering Table"
|
||||
checked: mainViewTask.getConfig("DebugScattering").showLUT
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugScattering").showLUT = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugScattering").showLUT
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugScattering").showLUT = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Cursor Pixel"
|
||||
checked: mainViewTask.getConfig("DebugScattering").showCursorPixel
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugScattering").showCursorPixel = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugScattering").showCursorPixel
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugScattering").showCursorPixel = checked }
|
||||
}
|
||||
CheckBox {
|
||||
text: "Skin Specular Beckmann"
|
||||
checked: mainViewTask.getConfig("DebugScattering").showSpecularTable
|
||||
onCheckedChanged: { mainViewTask.getConfig("DebugScattering").showSpecularTable = checked }
|
||||
checked: Render.getConfig("RenderMainView.DebugScattering").showSpecularTable
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.DebugScattering").showSpecularTable = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,13 +16,12 @@ Column {
|
|||
Column {
|
||||
id: surfaceGeometry
|
||||
spacing: 10
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
|
||||
Column{
|
||||
ConfigSlider {
|
||||
label: qsTr("Depth Threshold [cm]")
|
||||
integral: false
|
||||
config: mainViewTask.getConfig("SurfaceGeometry")
|
||||
config: Render.getConfig("RenderMainView.SurfaceGeometry")
|
||||
property: "depthThreshold"
|
||||
max: 5.0
|
||||
min: 0.0
|
||||
|
@ -35,7 +34,7 @@ Column {
|
|||
ConfigSlider {
|
||||
label: qsTr(modelData.split(":")[0])
|
||||
integral: (modelData.split(":")[3] == 'true')
|
||||
config: mainViewTask.getConfig("SurfaceGeometry")
|
||||
config: Render.getConfig("RenderMainView.SurfaceGeometry")
|
||||
property: modelData.split(":")[1]
|
||||
max: modelData.split(":")[2]
|
||||
min: 0.0
|
||||
|
@ -43,18 +42,18 @@ Column {
|
|||
}
|
||||
CheckBox {
|
||||
text: "Half Resolution"
|
||||
checked: mainViewTask.getConfig("SurfaceGeometry")["resolutionLevel"]
|
||||
onCheckedChanged: { mainViewTask.getConfig("SurfaceGeometry")["resolutionLevel"] = checked }
|
||||
checked: Render.getConfig("RenderMainView.SurfaceGeometry")["resolutionLevel"]
|
||||
onCheckedChanged: { Render.getConfig("RenderMainView.SurfaceGeometry")["resolutionLevel"] = checked }
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: [ "Diffusion Scale:SurfaceGeometry:diffuseFilterScale:2.0",
|
||||
"Diffusion Depth Threshold:SurfaceGeometry:diffuseDepthThreshold:1.0"
|
||||
model: [ "Diffusion Scale:RenderMainView.SurfaceGeometry:diffuseFilterScale:2.0",
|
||||
"Diffusion Depth Threshold:RenderMainView.SurfaceGeometry:diffuseDepthThreshold:1.0"
|
||||
]
|
||||
ConfigSlider {
|
||||
label: qsTr(modelData.split(":")[0])
|
||||
integral: false
|
||||
config: mainViewTask.getConfig(modelData.split(":")[1])
|
||||
config: Render.getConfig(modelData.split(":")[1])
|
||||
property: modelData.split(":")[2]
|
||||
max: modelData.split(":")[3]
|
||||
min: 0.0
|
||||
|
|
|
@ -22,8 +22,7 @@ Item {
|
|||
spacing: 8
|
||||
anchors.fill:parent
|
||||
|
||||
property var mainViewTask: Render.getConfig("RenderMainView");
|
||||
property var config: mainViewTask.getConfig("Stats")
|
||||
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 ?
|
||||
|
|
Loading…
Reference in a new issue