Showing the changes to scripts/developer (2 of 59 files). Show all
Unified · Split
| @@ -0,0 +1,21 @@ | |||
| 1 | // | ||
| 2 | // textureMonitor.js | ||
| 3 | // examples/utilities/tools/render | ||
| 4 | // | ||
| 5 | // Sam Gateau, created on 3/22/2016. | ||
| 6 | // Copyright 2016 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | |||
| 12 | // Set up the qml ui | ||
| 13 | var qml = Script.resolvePath('textureMonitor.qml'); | ||
| 14 | var window = new OverlayWindow({ | ||
| 15 | title: 'Textures', | ||
| 16 | source: qml, | ||
| 17 | width: 320, | ||
| 18 | height: 300, | ||
| 19 | }); | ||
| 20 | window.setPosition(500, 50); | ||
| 21 | window.closed.connect(function() { Script.stop(); }); | ||
| @@ -0,0 +1,78 @@ | |||
| 1 | // | ||
| 2 | // texture monitor.qml | ||
| 3 | // examples/utilities/render | ||
| 4 | // | ||
| 5 | // Created by Sam Gateau on 5/17/2017 | ||
| 6 | // Copyright 2016 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | import QtQuick 2.5 | ||
| 12 | import QtQuick.Controls 1.4 | ||
| 13 | import "../lib/plotperf" | ||
| 14 | |||
| 15 | |||
| 16 | Item { | ||
| 17 | id: texMex | ||
| 18 | anchors.fill:parent | ||
| 19 | |||
| 20 | Column { | ||
| 21 | id: stats | ||
| 22 | spacing: 8 | ||
| 23 | anchors.fill:parent | ||
| 24 | |||
| 25 | property var config: Render.getConfig("Stats") | ||
| 26 | |||
| 27 | function evalEvenHeight() { | ||
| 28 | // Why do we have to do that manually ? cannot seem to find a qml / anchor / layout mode that does that ? | ||
| 29 | return (height - spacing * (children.length - 1)) / children.length | ||
| 30 | } | ||
| 31 | PlotPerf { | ||
| 32 | title: "gpu::Texture Memory" | ||
| 33 | height: parent.evalEvenHeight() | ||
| 34 | object: stats.config | ||
| 35 | valueScale: 1048576 | ||
| 36 | valueUnit: "Mb" | ||
| 37 | valueNumDigits: "1" | ||
| 38 | plots: [ | ||
| 39 | { | ||
| 40 | prop: "textureCPUMemSize", | ||
| 41 | label: "CPU", | ||
| 42 | color: "#00B4EF" | ||
| 43 | }, | ||
| 44 | { | ||
| 45 | prop: "textureGPUMemSize", | ||
| 46 | label: "GPU", | ||
| 47 | color: "#E3E3E3" | ||
| 48 | }, | ||
| 49 | { | ||
| 50 | prop: "textureResidentGPUMemSize", | ||
| 51 | label: "Resident", | ||
| 52 | color: "#A2277C" | ||
| 53 | }, | ||
| 54 | { | ||
| 55 | prop: "textureFramebufferGPUMemSize", | ||
| 56 | label: "Framebuffer", | ||
| 57 | color: "#EF93D1" | ||
| 58 | }, | ||
| 59 | { | ||
| 60 | prop: "textureResourceGPUMemSize", | ||
| 61 | label: "Resource", | ||
| 62 | color: "#1FC6A6" | ||
| 63 | }, | ||
| 64 | { | ||
| 65 | prop: "textureResourcePopulatedGPUMemSize", | ||
| 66 | label: "Populated", | ||
| 67 | color: "#C6A61F" | ||
| 68 | }, | ||
| 69 | { | ||
| 70 | prop: "texturePendingGPUTransferSize", | ||
| 71 | label: "Transfer", | ||
| 72 | color: "#FF6309" | ||
| 73 | } | ||
| 74 | ] | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | } | ||