From 498d681d3e8d740cb8fb0d35d1ba3959ff93da56 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Jun 2019 12:04:04 -0700 Subject: [PATCH 01/18] Force new IP port on local address change --- libraries/networking/src/LimitedNodeList.cpp | 8 ++++++-- libraries/networking/src/udt/Socket.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 0eda2ee2e0..97a12e4c71 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -1172,7 +1172,7 @@ void LimitedNodeList::stopInitialSTUNUpdate(bool success) { // We now setup a timer here to fire every so often to check that our IP address has not changed. // Or, if we failed - if will check if we can eventually get a public socket - const int STUN_IP_ADDRESS_CHECK_INTERVAL_MSECS = 30 * 1000; + const int STUN_IP_ADDRESS_CHECK_INTERVAL_MSECS = 10 * 1000; QTimer* stunOccasionalTimer = new QTimer { this }; connect(stunOccasionalTimer, &QTimer::timeout, this, &LimitedNodeList::sendSTUNRequest); @@ -1230,12 +1230,16 @@ void LimitedNodeList::errorTestingLocalSocket() { } void LimitedNodeList::setLocalSocket(const HifiSockAddr& sockAddr) { - if (sockAddr != _localSockAddr) { + if (sockAddr.getAddress() != _localSockAddr.getAddress()) { if (_localSockAddr.isNull()) { qCInfo(networking) << "Local socket is" << sockAddr; } else { qCInfo(networking) << "Local socket has changed from" << _localSockAddr << "to" << sockAddr; + if (_hasTCPCheckedLocalSocket) { // Force a port change for NAT: + _nodeSocket.rebind(0); + _localSockAddr.setPort(_nodeSocket.localPort()); + } } _localSockAddr = sockAddr; diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 98d6c0a6be..5a3111a7eb 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -73,6 +73,7 @@ void Socket::rebind() { void Socket::rebind(quint16 localPort) { _udpSocket.close(); + _udpSocket.waitForDisconnected(); bind(QHostAddress::AnyIPv4, localPort); } From c088fab60602b9f5455f5d1e05208db2eff7c038 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 7 Jun 2019 16:23:38 -0700 Subject: [PATCH 02/18] Fix annoying typo --- libraries/networking/src/LimitedNodeList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 97a12e4c71..d8d43f4b02 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -983,7 +983,7 @@ void LimitedNodeList::sendSTUNRequest() { const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10; if (!_hasCompletedInitialSTUN) { - qCDebug(networking) << "Sending intial stun request to" << STUN_SERVER_HOSTNAME; + qCDebug(networking) << "Sending initial stun request to" << STUN_SERVER_HOSTNAME; if (_numInitialSTUNRequests > NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL) { // we're still trying to do our initial STUN we're over the fail threshold From d780964cb4979abfdf501dc72f16abe1106f6130 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 10 Jun 2019 17:28:49 -0700 Subject: [PATCH 03/18] Reset NodeList upon local nework change; abort current socket when rebinding Also ensure QUdpSocket is owned by LimitedNodeList. --- libraries/networking/src/LimitedNodeList.cpp | 1 + libraries/networking/src/udt/Socket.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 2f1a8c9d10..9b1f011680 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -1239,6 +1239,7 @@ void LimitedNodeList::setLocalSocket(const HifiSockAddr& sockAddr) { } else { qCInfo(networking) << "Local socket has changed from" << _localSockAddr << "to" << sockAddr; if (_hasTCPCheckedLocalSocket) { // Force a port change for NAT: + reset(); _nodeSocket.rebind(0); _localSockAddr.setPort(_nodeSocket.localPort()); } diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 75d4c9ef45..bcc2293e1f 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -33,6 +33,7 @@ using namespace udt; Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : QObject(parent), + _udpSocket(parent), _readyReadBackupTimer(new QTimer(this)), _shouldChangeSocketOptions(shouldChangeSocketOptions) { @@ -50,6 +51,7 @@ Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : } void Socket::bind(const QHostAddress& address, quint16 port) { + _udpSocket.bind(address, port); if (_shouldChangeSocketOptions) { @@ -72,8 +74,7 @@ void Socket::rebind() { } void Socket::rebind(quint16 localPort) { - _udpSocket.close(); - _udpSocket.waitForDisconnected(); + _udpSocket.abort(); bind(QHostAddress::AnyIPv4, localPort); } From cfcea359b2c5dc28630f952bf3794af687ee6faf Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 14 Jun 2019 16:51:59 -0700 Subject: [PATCH 04/18] Handle local address changes for servers --- domain-server/src/DomainServer.cpp | 4 ++++ libraries/networking/src/LimitedNodeList.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 44887599d3..00ca858a1f 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -739,6 +739,10 @@ void DomainServer::setupNodeListAndAssignments() { connect(nodeList.data(), &LimitedNodeList::nodeAdded, this, &DomainServer::nodeAdded); connect(nodeList.data(), &LimitedNodeList::nodeKilled, this, &DomainServer::nodeKilled); + connect(nodeList.data(), &LimitedNodeList::localSockAddrChanged, this, + [this](const HifiSockAddr& localSockAddr) { + DependencyManager::get()->putLocalPortIntoSharedMemory(DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY, this, localSockAddr.getPort()); + }); // register as the packet receiver for the types we want PacketReceiver& packetReceiver = nodeList->getPacketReceiver(); diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 92a5692ca9..e47b4cc7bc 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -1237,16 +1237,18 @@ void LimitedNodeList::setLocalSocket(const HifiSockAddr& sockAddr) { if (_localSockAddr.isNull()) { qCInfo(networking) << "Local socket is" << sockAddr; + _localSockAddr = sockAddr; } else { qCInfo(networking) << "Local socket has changed from" << _localSockAddr << "to" << sockAddr; + _localSockAddr = sockAddr; if (_hasTCPCheckedLocalSocket) { // Force a port change for NAT: reset(); _nodeSocket.rebind(0); _localSockAddr.setPort(_nodeSocket.localPort()); + qCInfo(networking) << "Local port changed to" << _localSockAddr.getPort(); } } - _localSockAddr = sockAddr; emit localSockAddrChanged(_localSockAddr); } } From 11b599f8f98639f38dd59aebf764fc2700abae5e Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Tue, 18 Jun 2019 09:34:55 -0700 Subject: [PATCH 05/18] Update SIMD resampler to avoid benign UBSan warnings due to unaligned load/store --- libraries/audio/src/AudioSRC.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libraries/audio/src/AudioSRC.cpp b/libraries/audio/src/AudioSRC.cpp index d488eccb6a..625f45e9ae 100644 --- a/libraries/audio/src/AudioSRC.cpp +++ b/libraries/audio/src/AudioSRC.cpp @@ -793,6 +793,18 @@ int AudioSRC::multirateFilter4(const float* input0, const float* input1, const f #include // SSE2 +// unaligned load/store without undefined behavior +static inline __m128i mm_loadu_si32(void const* mem_addr) { + int32_t temp; + memcpy(&temp, mem_addr, sizeof(int32_t)); + return _mm_cvtsi32_si128(temp); +} + +static inline void mm_storeu_si32(void* mem_addr, __m128i a) { + int32_t temp = _mm_cvtsi128_si32(a); + memcpy(mem_addr, &temp, sizeof(int32_t)); +} + // convert int16_t to float, deinterleave stereo void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames) { __m128 scale = _mm_set1_ps(1/32768.0f); @@ -839,7 +851,7 @@ void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames _mm_storeu_ps(&outputs[1][i], f1); } for (; i < numFrames; i++) { - __m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[2*i]); + __m128i a0 = mm_loadu_si32((__m128i*)&input[2*i]); __m128i a1 = a0; // deinterleave and sign-extend @@ -878,9 +890,9 @@ void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames _mm_storeu_ps(&outputs[3][i], _mm_shuffle_ps(f1, f3, _MM_SHUFFLE(3,1,3,1))); } for (; i < numFrames; i++) { - __m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[4*i+0]); + __m128i a0 = mm_loadu_si32((__m128i*)&input[4*i+0]); __m128i a1 = a0; - __m128i a2 = _mm_cvtsi32_si128(*(int32_t*)&input[4*i+2]); + __m128i a2 = mm_loadu_si32((__m128i*)&input[4*i+2]); __m128i a3 = a2; // deinterleave and sign-extend @@ -986,7 +998,7 @@ void AudioSRC::convertOutput(float** inputs, int16_t* output, int numFrames) { // interleave a0 = _mm_unpacklo_epi16(a0, a1); - *(int32_t*)&output[2*i] = _mm_cvtsi128_si32(a0); + mm_storeu_si32((__m128i*)&output[2*i], a0); } } else if (_numChannels == 4) { From fa4dfffd8ec55f5629b994327c7a06af4ddd8ab1 Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Tue, 18 Jun 2019 09:53:54 -0700 Subject: [PATCH 06/18] Update reverb SIMD to avoid benign UBSan warnings due to unaligned load/store --- libraries/audio/src/AudioReverb.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libraries/audio/src/AudioReverb.cpp b/libraries/audio/src/AudioReverb.cpp index a7c6fefd39..4d89172a38 100644 --- a/libraries/audio/src/AudioReverb.cpp +++ b/libraries/audio/src/AudioReverb.cpp @@ -1796,6 +1796,18 @@ void AudioReverb::render(float** inputs, float** outputs, int numFrames) { #include +// unaligned load/store without undefined behavior +static inline __m128i mm_loadu_si32(void const* mem_addr) { + int32_t temp; + memcpy(&temp, mem_addr, sizeof(int32_t)); + return _mm_cvtsi32_si128(temp); +} + +static inline void mm_storeu_si32(void* mem_addr, __m128i a) { + int32_t temp = _mm_cvtsi128_si32(a); + memcpy(mem_addr, &temp, sizeof(int32_t)); +} + // convert int16_t to float, deinterleave stereo void AudioReverb::convertInput(const int16_t* input, float** outputs, int numFrames) { __m128 scale = _mm_set1_ps(1/32768.0f); @@ -1816,7 +1828,7 @@ void AudioReverb::convertInput(const int16_t* input, float** outputs, int numFra _mm_storeu_ps(&outputs[1][i], f1); } for (; i < numFrames; i++) { - __m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[2*i]); + __m128i a0 = mm_loadu_si32((__m128i*)&input[2*i]); __m128i a1 = a0; // deinterleave and sign-extend @@ -1887,7 +1899,7 @@ void AudioReverb::convertOutput(float** inputs, int16_t* output, int numFrames) // interleave a0 = _mm_unpacklo_epi16(a0, a1); - *(int32_t*)&output[2*i] = _mm_cvtsi128_si32(a0); + mm_storeu_si32((__m128i*)&output[2*i], a0); } } From ce7571dcc13cfb3156c4c77449d4668b8971d3fe Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Tue, 18 Jun 2019 10:29:23 -0700 Subject: [PATCH 07/18] Replace NEXTPOW2() macros with constexpr (supported since VS2015) --- libraries/audio/src/AudioReverb.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/libraries/audio/src/AudioReverb.cpp b/libraries/audio/src/AudioReverb.cpp index 4d89172a38..26f5528866 100644 --- a/libraries/audio/src/AudioReverb.cpp +++ b/libraries/audio/src/AudioReverb.cpp @@ -35,16 +35,6 @@ static const double SQRT2 = 1.41421356237309504880; static const double FIXQ31 = 2147483648.0; static const double FIXQ32 = 4294967296.0; -// Round an integer to the next power-of-two, at compile time. -// VS2013 does not support constexpr so macros are used instead. -#define SETBITS0(x) (x) -#define SETBITS1(x) (SETBITS0(x) | (SETBITS0(x) >> 1)) -#define SETBITS2(x) (SETBITS1(x) | (SETBITS1(x) >> 2)) -#define SETBITS3(x) (SETBITS2(x) | (SETBITS2(x) >> 4)) -#define SETBITS4(x) (SETBITS3(x) | (SETBITS3(x) >> 8)) -#define SETBITS5(x) (SETBITS4(x) | (SETBITS4(x) >> 16)) -#define NEXTPOW2(x) (SETBITS5((x) - 1) + 1) - // // Allpass delay modulation // @@ -111,6 +101,18 @@ static const int M_AP19 = 113; static const int M_AP20 = 107; static const int M_AP21 = 127; +// Round an integer to the next power-of-two, at compile time +constexpr uint32_t NEXTPOW2(uint32_t n) { + n -= 1; + n |= (n >> 1); + n |= (n >> 2); + n |= (n >> 4); + n |= (n >> 8); + n |= (n >> 16); + n += 1; + return n; +} + // // Filter design tools using analog-matched response. // All filter types approximate the s-plane response, including cutoff > Nyquist. From 34def0fd6ba15d10df836880ec46fbd2ce65a780 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 11:09:15 -0700 Subject: [PATCH 08/18] DEV-145: About screen for platform info --- .../simplifiedUI/settingsApp/SettingsApp.qml | 15 +- .../simplifiedUI/settingsApp/about/About.qml | 176 ++++++++++++++++++ 2 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml index adb8344902..1f48d1d753 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml @@ -17,6 +17,7 @@ import "./audio" as AudioSettings import "./general" as GeneralSettings import "./vr" as VrSettings import "./dev" as DevSettings +import "./about" as AboutSettings Rectangle { property string activeTabView: "generalTabView" @@ -76,6 +77,10 @@ Rectangle { tabTitle: "VR" tabViewName: "vrTabView" } + ListElement { + tabTitle: "About" + tabViewName: "aboutTabView" + } ListElement { tabTitle: "Dev" tabViewName: "devTabView" @@ -103,7 +108,7 @@ Rectangle { delegate: Item { visible: model.tabTitle !== "Dev" || (model.tabTitle === "Dev" && root.developerModeEnabled) - width: tabTitleText.paintedWidth + 64 + width: tabTitleText.paintedWidth + 32 height: parent.height HifiStylesUit.GraphikRegular { @@ -163,6 +168,12 @@ Rectangle { anchors.fill: parent } + AboutSettings.About { + id: aboutTabViewContainer + visible: activeTabView === "aboutTabView" + anchors.fill: parent + } + SimplifiedControls.VerticalScrollBar { parent: { if (activeTabView === "generalTabView") { @@ -173,6 +184,8 @@ Rectangle { vrTabViewContainer } else if (activeTabView === "devTabView") { devTabViewContainer + } else if (activeTabView === "aboutTabView") { + aboutTabViewContainer } } } diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml new file mode 100644 index 0000000000..7f0dcc2289 --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -0,0 +1,176 @@ +// +// About.qml +// +// Created by Zach Fox on 2019-06-18 +// Copyright 2019 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 +// + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import "../../simplifiedConstants" as SimplifiedConstants +import "../../simplifiedControls" as SimplifiedControls +import stylesUit 1.0 as HifiStylesUit +import QtQuick.Layouts 1.3 + +Flickable { + id: root + contentWidth: parent.width + contentHeight: aboutColumnLayout.height + clip: true + + onVisibleChanged: { + if (visible) { + root.contentX = 0; + root.contentY = 0; + } + } + + + SimplifiedConstants.SimplifiedConstants { + id: simplifiedUI + } + + + Image { + id: accent + source: "../images/accent3.svg" + anchors.left: parent.left + anchors.top: parent.top + width: 83 + height: 156 + transform: Scale { + xScale: -1 + origin.x: accent.width / 2 + origin.y: accent.height / 2 + } + } + + + ColumnLayout { + id: aboutColumnLayout + anchors.left: parent.left + anchors.leftMargin: 26 + anchors.right: parent.right + anchors.rightMargin: 26 + anchors.top: parent.top + spacing: simplifiedUI.margins.settings.spacingBetweenSettings + + ColumnLayout { + id: platformInfoContainer + Layout.preferredWidth: parent.width + Layout.topMargin: 24 + Layout.bottomMargin: 24 + spacing: 0 + + HifiStylesUit.GraphikSemiBold { + id: platformInfoTitle + text: "Platform Info" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 22 + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Platform Tier: " + PlatformInfo.getTierProfiled() + Layout.maximumWidth: parent.width + Layout.topMargin: 14 + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "OS Type: " + PlatformInfo.getOperatingSystemType() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "CPU: " + PlatformInfo.getCPUBrand() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "# CPUs: " + PlatformInfo.getNumCPUs() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "GPU Type: " + PlatformInfo.getGraphicsCardType() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + SimplifiedControls.Button { + Layout.topMargin: 24 + width: 200 + height: 32 + text: "Copy to Clipboard" + + onClicked: { + Window.copyToClipboard(root.buildPlatformInfoTextToCopy()); + } + } + } + } + + function buildPlatformInfoTextToCopy() { + var textToCopy = "Platform Info:\n"; + textToCopy += "Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; + textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; + textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n"; + textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n"; + textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n"; + textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n"; + textToCopy += "GPU Type: " + PlatformInfo.getGraphicsCardType() + "\n"; + textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")); + + return textToCopy; + } +} From ec4fc672b6b0a7758eae15c5db19f4b5b7956d8f Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 11:29:20 -0700 Subject: [PATCH 09/18] Better design; Interface version --- .../simplifiedUI/settingsApp/about/About.qml | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index 7f0dcc2289..a79aa82336 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -66,18 +66,36 @@ Flickable { spacing: 0 HifiStylesUit.GraphikSemiBold { - id: platformInfoTitle - text: "Platform Info" + text: "About Interface" Layout.maximumWidth: parent.width + Layout.bottomMargin: 14 height: paintedHeight size: 22 color: simplifiedUI.colors.text.white } HifiStylesUit.GraphikRegular { - text: "Platform Tier: " + PlatformInfo.getTierProfiled() + text: "Interface Version: " + Window.checkVersion() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikSemiBold { + text: "Platform Info" + Layout.maximumWidth: parent.width + Layout.topMargin: 24 + Layout.bottomMargin: 14 + height: paintedHeight + size: 22 + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() Layout.maximumWidth: parent.width - Layout.topMargin: 14 height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -130,7 +148,7 @@ Flickable { } HifiStylesUit.GraphikRegular { - text: "GPU Type: " + PlatformInfo.getGraphicsCardType() + text: "GPU: " + PlatformInfo.getGraphicsCardType() Layout.maximumWidth: parent.width height: paintedHeight size: 16 @@ -161,14 +179,16 @@ Flickable { } function buildPlatformInfoTextToCopy() { - var textToCopy = "Platform Info:\n"; - textToCopy += "Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; + var textToCopy = "About Interface:\n"; + textToCopy += "Interface Version: " + Window.checkVersion() + "\n"; + textToCopy += "\nPlatform Info:\n"; + textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n"; textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n"; textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n"; textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n"; - textToCopy += "GPU Type: " + PlatformInfo.getGraphicsCardType() + "\n"; + textToCopy += "GPU: " + PlatformInfo.getGraphicsCardType() + "\n"; textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")); return textToCopy; From 4670c113971ac9d2c0d381e960c9c52e33646df3 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 12:26:03 -0700 Subject: [PATCH 10/18] Tighten up the graphics on level 3 --- .../simplifiedUI/settingsApp/about/About.qml | 40 ++++++------------ .../settingsApp/about/images/logo.png | Bin 0 -> 16487 bytes 2 files changed, 13 insertions(+), 27 deletions(-) create mode 100644 interface/resources/qml/hifi/simplifiedUI/settingsApp/about/images/logo.png diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index a79aa82336..83a21ff0d7 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -34,21 +34,6 @@ Flickable { } - Image { - id: accent - source: "../images/accent3.svg" - anchors.left: parent.left - anchors.top: parent.top - width: 83 - height: 156 - transform: Scale { - xScale: -1 - origin.x: accent.width / 2 - origin.y: accent.height / 2 - } - } - - ColumnLayout { id: aboutColumnLayout anchors.left: parent.left @@ -56,26 +41,27 @@ Flickable { anchors.right: parent.right anchors.rightMargin: 26 anchors.top: parent.top - spacing: simplifiedUI.margins.settings.spacingBetweenSettings + spacing: 0 + + Image { + source: "images/logo.png" + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 16 + Layout.preferredWidth: 240 + Layout.preferredHeight: 180 + fillMode: Image.PreserveAspectFit + mipmap: true + } ColumnLayout { id: platformInfoContainer Layout.preferredWidth: parent.width - Layout.topMargin: 24 Layout.bottomMargin: 24 spacing: 0 HifiStylesUit.GraphikSemiBold { - text: "About Interface" - Layout.maximumWidth: parent.width - Layout.bottomMargin: 14 - height: paintedHeight - size: 22 - color: simplifiedUI.colors.text.white - } - - HifiStylesUit.GraphikRegular { - text: "Interface Version: " + Window.checkVersion() + text: "Version " + Window.checkVersion() + Layout.alignment: Qt.AlignHCenter Layout.maximumWidth: parent.width height: paintedHeight size: 16 diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/images/logo.png b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d480da86ddc13c61dee02443563bfed4022ecdbc GIT binary patch literal 16487 zcmeIacTiJb+cug)3st&w450KLdJ*X$NE0J95Q;#6&^sikQ~@ah0)o;bI$qRdH*^8ojtQ>_N;ZS>%Q-Gm+Y*yW+$4N>eEqkQUd@0 zIzs~;3jhE}0sw#ys3-scK$@a3KL7xLpbhQ^001=1mp2fQS8x>oAph%O1rLOq+*U#Q zdP_RF_&U2vhI*p`mzSDmDB20>KE?CS2}qYm9{>w@xoxTr(#!Azu0(AusKJPgA9 zT`j{+t&rhfNM#qOrUt)Ss7k0e+S@hIi9ggE(Lw&Ge=K!DO1Yw3yc1Ri_FpXg+S-?nQRWxE=i%ex8xkOLsnoy6xav3sx~fAj`z54d5^^$D(#k4w zFcn!j328+YY3YAKO1wE>4h{82OL};? zsK~=$NI5xqISE-eMK=jKn7o^WleE0EgsiKQoQ#6J0!-Rj;UB$BOjLAykwKR;csc%G zk?Z1%^ltWF=)TBmbXhRWa}g2=w(2`*$u`y88Y53FX26Pk^d8Ausbn9g4gR z2v-;AzneY&U#9tgX3)QALms&L{I^l^FIa%DTVRNjzpIwJt54wnBoL+kPx=Qq1^@Tj z|IdQt|6A?}HluAEy{G!a2nr z={#{2@8!IvhrI28ydy4iAURHqsPBzUqPx;2%tTj-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c033c6ad4dd22563beba Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 12:29:52 -0700 Subject: [PATCH 11/18] Better text formatting --- .../qml/hifi/simplifiedUI/settingsApp/about/About.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index 83a21ff0d7..6c1f4a3b57 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -165,9 +165,9 @@ Flickable { } function buildPlatformInfoTextToCopy() { - var textToCopy = "About Interface:\n"; + var textToCopy = "**About Interface**\n"; textToCopy += "Interface Version: " + Window.checkVersion() + "\n"; - textToCopy += "\nPlatform Info:\n"; + textToCopy += "\n**Platform Info**\n"; textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n"; From f6822f17a95a2da4bf02717854c0c07047d601bb Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 12:43:45 -0700 Subject: [PATCH 12/18] Add computer description --- .../simplifiedUI/settingsApp/about/About.qml | 46 +++++++++++++++++-- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index 6c1f4a3b57..76ab762a6b 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -47,8 +47,8 @@ Flickable { source: "images/logo.png" Layout.alignment: Qt.AlignHCenter Layout.topMargin: 16 - Layout.preferredWidth: 240 - Layout.preferredHeight: 180 + Layout.preferredWidth: 200 + Layout.preferredHeight: 150 fillMode: Image.PreserveAspectFit mipmap: true } @@ -72,11 +72,35 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "Platform Info" Layout.maximumWidth: parent.width - Layout.topMargin: 24 - Layout.bottomMargin: 14 + Layout.topMargin: 8 + Layout.bottomMargin: 8 height: paintedHeight size: 22 color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "Computer Vendor/Model:" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + + Component.onCompleted: { + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + text = "Computer Vendor/Model: " + computerVendor + "/" + computerModel; + } } HifiStylesUit.GraphikRegular { @@ -152,7 +176,7 @@ Flickable { } SimplifiedControls.Button { - Layout.topMargin: 24 + Layout.topMargin: 8 width: 200 height: 32 text: "Copy to Clipboard" @@ -168,6 +192,18 @@ Flickable { var textToCopy = "**About Interface**\n"; textToCopy += "Interface Version: " + Window.checkVersion() + "\n"; textToCopy += "\n**Platform Info**\n"; + + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n"; textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n"; From 18f703ee4304a711d57d32332924d12810391e88 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 14:11:14 -0700 Subject: [PATCH 13/18] BUGZ-732: Enable text selection by mouse in Profile/Display Name field --- .../hifi/simplifiedUI/avatarApp/components/DisplayNameHeader.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/resources/qml/hifi/simplifiedUI/avatarApp/components/DisplayNameHeader.qml b/interface/resources/qml/hifi/simplifiedUI/avatarApp/components/DisplayNameHeader.qml index a6be398e53..becbd8ca61 100644 --- a/interface/resources/qml/hifi/simplifiedUI/avatarApp/components/DisplayNameHeader.qml +++ b/interface/resources/qml/hifi/simplifiedUI/avatarApp/components/DisplayNameHeader.qml @@ -94,6 +94,7 @@ Item { text: MyAvatar.sessionDisplayName === "" ? MyAvatar.displayName : MyAvatar.sessionDisplayName maximumLength: 256 clip: true + selectByMouse: true anchors.fill: parent onEditingFinished: { if (MyAvatar.displayName !== text) { From 0a2f37f9a08cac291e0c687694b072cc66e69d65 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 18 Jun 2019 15:36:32 -0700 Subject: [PATCH 14/18] Q_OBJECT and template classes don't mix --- libraries/shared/src/Preferences.h | 117 ++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 36 deletions(-) diff --git a/libraries/shared/src/Preferences.h b/libraries/shared/src/Preferences.h index 9f84d9c8b7..9147117792 100644 --- a/libraries/shared/src/Preferences.h +++ b/libraries/shared/src/Preferences.h @@ -115,48 +115,39 @@ protected: const Lambda _triggerHandler; }; - -template -class TypedPreference : public Preference { -public: - using Getter = std::function; - using Setter = std::function; - - TypedPreference(const QString& category, const QString& name, Getter getter, Setter setter) - : Preference(category, name), _getter(getter), _setter(setter) { } - - T getValue() const { return _value; } - void setValue(const T& value) { if (_value != value) { _value = value; emitValueChanged(); } } - void load() override { _value = _getter(); } - void save() const override { - T oldValue = _getter(); - if (_value != oldValue) { - _setter(_value); - } - } - -protected: - T _value; - const Getter _getter; - const Setter _setter; -}; - -class BoolPreference : public TypedPreference { +class BoolPreference : public Preference { Q_OBJECT Q_PROPERTY(bool value READ getValue WRITE setValue NOTIFY valueChanged) public: + using Getter = std::function; + using Setter = std::function; + BoolPreference(const QString& category, const QString& name, Getter getter, Setter setter) - : TypedPreference(category, name, getter, setter) { } + : Preference(category, name), _getter(getter), _setter(setter) { } + + bool getValue() const { return _value; } + void setValue(const bool& value) { if (_value != value) { _value = value; emitValueChanged(); } } + void load() override { _value = _getter(); } + void save() const override { + bool oldValue = _getter(); + if (_value != oldValue) { + _setter(_value); + } + } signals: void valueChanged(); protected: + bool _value; + const Getter _getter; + const Setter _setter; + void emitValueChanged() override { emit valueChanged(); } }; -class FloatPreference : public TypedPreference { +class FloatPreference : public Preference { Q_OBJECT Q_PROPERTY(float value READ getValue WRITE setValue NOTIFY valueChanged) Q_PROPERTY(float min READ getMin CONSTANT) @@ -165,8 +156,21 @@ class FloatPreference : public TypedPreference { Q_PROPERTY(float decimals READ getDecimals CONSTANT) public: + using Getter = std::function; + using Setter = std::function; + FloatPreference(const QString& category, const QString& name, Getter getter, Setter setter) - : TypedPreference(category, name, getter, setter) { } + : Preference(category, name), _getter(getter), _setter(setter) { } + + float getValue() const { return _value; } + void setValue(const float& value) { if (_value != value) { _value = value; emitValueChanged(); } } + void load() override { _value = _getter(); } + void save() const override { + float oldValue = _getter(); + if (_value != oldValue) { + _setter(_value); + } + } float getMin() const { return _min; } void setMin(float min) { _min = min; }; @@ -186,14 +190,17 @@ signals: protected: void emitValueChanged() override { emit valueChanged(); } + float _value; + const Getter _getter; + const Setter _setter; + float _decimals { 0 }; float _min { 0 }; float _max { 1 }; float _step { 0.1f }; }; - -class IntPreference : public TypedPreference { +class IntPreference : public Preference { Q_OBJECT Q_PROPERTY(float value READ getValue WRITE setValue NOTIFY valueChanged) Q_PROPERTY(float min READ getMin CONSTANT) @@ -202,8 +209,21 @@ class IntPreference : public TypedPreference { Q_PROPERTY(int decimals READ getDecimals CONSTANT) public: + using Getter = std::function; + using Setter = std::function; + IntPreference(const QString& category, const QString& name, Getter getter, Setter setter) - : TypedPreference(category, name, getter, setter) { } + : Preference(category, name), _getter(getter), _setter(setter) { } + + int getValue() const { return _value; } + void setValue(const int& value) { if (_value != value) { _value = value; emitValueChanged(); } } + void load() override { _value = _getter(); } + void save() const override { + int oldValue = _getter(); + if (_value != oldValue) { + _setter(_value); + } + } float getMin() const { return _min; } void setMin(float min) { _min = min; }; @@ -221,6 +241,10 @@ signals: void valueChanged(); protected: + int _value; + const Getter _getter; + const Setter _setter; + void emitValueChanged() override { emit valueChanged(); } int _min { std::numeric_limits::min() }; @@ -229,19 +253,37 @@ protected: int _decimals { 0 }; }; -class StringPreference : public TypedPreference { +class StringPreference : public Preference { Q_OBJECT Q_PROPERTY(QString value READ getValue WRITE setValue NOTIFY valueChanged) public: + using Getter = std::function; + using Setter = std::function; + StringPreference(const QString& category, const QString& name, Getter getter, Setter setter) - : TypedPreference(category, name, getter, setter) { } + : Preference(category, name), _getter(getter), _setter(setter) { } + + + QString getValue() const { return _value; } + void setValue(const QString& value) { if (_value != value) { _value = value; emitValueChanged(); } } + void load() override { _value = _getter(); } + void save() const override { + QString oldValue = _getter(); + if (_value != oldValue) { + _setter(_value); + } + } signals: void valueChanged(); protected: void emitValueChanged() override { emit valueChanged(); } + + QString _value; + const Getter _getter; + const Setter _setter; }; class SliderPreference : public FloatPreference { @@ -303,7 +345,7 @@ public: ComboBoxPreference(const QString& category, const QString& name, Getter getter, Setter setter) : EditPreference(category, name, getter, setter) { } Type getType() override { return ComboBox; } - + const QStringList& getItems() { return _items; } void setItems(const QStringList& items) { _items = items; } @@ -342,6 +384,9 @@ class CheckPreference : public BoolPreference { Q_OBJECT Q_PROPERTY(bool indented READ getIndented CONSTANT) public: + using Getter = std::function; + using Setter = std::function; + CheckPreference(const QString& category, const QString& name, Getter getter, Setter setter) : BoolPreference(category, name, getter, setter) { } Type getType() override { return Checkbox; } From 06b00e93ae3b9c0653a0eedbb8783498e3bacc14 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 18 Jun 2019 15:43:14 -0700 Subject: [PATCH 15/18] Limit the stats-dump on packet error --- libraries/networking/src/LimitedNodeList.cpp | 17 ++++++++++------- libraries/networking/src/LimitedNodeList.h | 3 +++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 8fefe5820c..4282e05542 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -450,13 +450,16 @@ qint64 LimitedNodeList::sendPacket(std::unique_ptr packet, const HifiS auto size = sendUnreliablePacket(*packet, sockAddr, hmacAuth); if (size < 0) { auto now = usecTimestampNow(); - eachNode([now](const SharedNodePointer & node) { - qCDebug(networking) << "Stats for " << node->getPublicSocket() << "\n" - << " Last Heard Microstamp: " << node->getLastHeardMicrostamp() << " (" << (now - node->getLastHeardMicrostamp()) << "usec ago)\n" - << " Outbound Kbps: " << node->getOutboundKbps() << "\n" - << " Inbound Kbps: " << node->getInboundKbps() << "\n" - << " Ping: " << node->getPingMs(); - }); + if (now - _sendErrorStatsTime > ERROR_STATS_PERIOD_US) { + _sendErrorStatsTime = now; + eachNode([now](const SharedNodePointer& node) { + qCDebug(networking) << "Stats for " << node->getPublicSocket() << "\n" + << " Last Heard Microstamp: " << node->getLastHeardMicrostamp() << " (" << (now - node->getLastHeardMicrostamp()) << "usec ago)\n" + << " Outbound Kbps: " << node->getOutboundKbps() << "\n" + << " Inbound Kbps: " << node->getInboundKbps() << "\n" + << " Ping: " << node->getPingMs(); + }); + } } return size; } diff --git a/libraries/networking/src/LimitedNodeList.h b/libraries/networking/src/LimitedNodeList.h index f9f6bf3b3e..7e40d763e4 100644 --- a/libraries/networking/src/LimitedNodeList.h +++ b/libraries/networking/src/LimitedNodeList.h @@ -497,6 +497,9 @@ private: float _outboundKbps { 0.0f }; bool _dropOutgoingNodeTraffic { false }; + + quint64 _sendErrorStatsTime { (quint64)0 }; + static const quint64 ERROR_STATS_PERIOD_US { 2 * USECS_PER_SECOND }; }; #endif // hifi_LimitedNodeList_h From 7d808525443da2bc20fb95ef3f4d6b4400a0b956 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 18 Jun 2019 16:06:47 -0700 Subject: [PATCH 16/18] Reduce reporting period to 1 s --- libraries/networking/src/LimitedNodeList.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/LimitedNodeList.h b/libraries/networking/src/LimitedNodeList.h index 7e40d763e4..5f24401b10 100644 --- a/libraries/networking/src/LimitedNodeList.h +++ b/libraries/networking/src/LimitedNodeList.h @@ -499,7 +499,7 @@ private: bool _dropOutgoingNodeTraffic { false }; quint64 _sendErrorStatsTime { (quint64)0 }; - static const quint64 ERROR_STATS_PERIOD_US { 2 * USECS_PER_SECOND }; + static const quint64 ERROR_STATS_PERIOD_US { 1 * USECS_PER_SECOND }; }; #endif // hifi_LimitedNodeList_h From 3ff81607ab36bed17f29ae4ffeb7685d7f03c835 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Tue, 18 Jun 2019 17:17:21 -0700 Subject: [PATCH 17/18] fix deferred rendering on macbook air --- .../render-utils/src/DeferredBufferWrite.slh | 7 ++- .../src/DeferredLightingEffect.cpp | 45 ++++--------------- .../render-utils/src/DeferredLightingEffect.h | 13 ------ libraries/render-utils/src/deferred_light.slv | 4 +- 4 files changed, 14 insertions(+), 55 deletions(-) diff --git a/libraries/render-utils/src/DeferredBufferWrite.slh b/libraries/render-utils/src/DeferredBufferWrite.slh index fc9310a520..de4581d66e 100644 --- a/libraries/render-utils/src/DeferredBufferWrite.slh +++ b/libraries/render-utils/src/DeferredBufferWrite.slh @@ -37,7 +37,6 @@ void packDeferredFragment(vec3 normal, float alpha, vec3 albedo, float roughness _fragColor0 = vec4(albedo, mix(packShadedMetallic(metallic), packScatteringMetallic(metallic), check)); _fragColor1 = vec4(packNormal(normal), clamp(roughness, 0.0, 1.0)); _fragColor2 = vec4(mix(emissive, vec3(scattering), check), occlusion); - _fragColor3 = vec4(isEmissiveEnabled() * emissive, 1.0); } @@ -49,7 +48,6 @@ void packDeferredFragmentLightmap(vec3 normal, float alpha, vec3 albedo, float r _fragColor0 = vec4(albedo, packLightmappedMetallic(metallic)); _fragColor1 = vec4(packNormal(normal), clamp(roughness, 0.0, 1.0)); _fragColor2 = vec4(isLightmapEnabled() * lightmap, 1.0); - _fragColor3 = vec4(isLightmapEnabled() * lightmap * albedo, 1.0); } @@ -59,7 +57,7 @@ void packDeferredFragmentUnlit(vec3 normal, float alpha, vec3 color) { } _fragColor0 = vec4(color, packUnlit()); _fragColor1 = vec4(packNormal(normal), 1.0); - // _fragColor2 = vec4(vec3(0.0), 1.0); + _fragColor2 = vec4(vec3(0.0), 1.0); _fragColor3 = vec4(color, 1.0); } @@ -69,7 +67,8 @@ void packDeferredFragmentTranslucent(vec3 normal, float alpha, vec3 albedo, floa } _fragColor0 = vec4(albedo.rgb, alpha); _fragColor1 = vec4(packNormal(normal), clamp(roughness, 0.0, 1.0)); - + _fragColor2 = vec4(vec3(0.0), 1.0); + _fragColor3 = vec4(0.0); } <@endif@> diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 82b7f3102a..51729fc5cf 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -41,33 +41,17 @@ namespace gr { using namespace render; -struct LightLocations { - bool shadowTransform{ false }; - void initialize(const gpu::ShaderPointer& program) { - shadowTransform = program->getReflection().validUniformBuffer(ru::Buffer::ShadowParams); - } -}; - -static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePointer& program, LightLocationsPtr& locations); +static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePointer& program); void DeferredLightingEffect::init() { - _directionalAmbientSphereLightLocations = std::make_shared(); - _directionalSkyboxLightLocations = std::make_shared(); + loadLightProgram(shader::render_utils::program::directional_ambient_light, false, _directionalAmbientSphereLight); + loadLightProgram(shader::render_utils::program::directional_skybox_light, false, _directionalSkyboxLight); - _directionalAmbientSphereLightShadowLocations = std::make_shared(); - _directionalSkyboxLightShadowLocations = std::make_shared(); + loadLightProgram(shader::render_utils::program::directional_ambient_light_shadow, false, _directionalAmbientSphereLightShadow); + loadLightProgram(shader::render_utils::program::directional_skybox_light_shadow, false, _directionalSkyboxLightShadow); - _localLightLocations = std::make_shared(); - _localLightOutlineLocations = std::make_shared(); - - loadLightProgram(shader::render_utils::program::directional_ambient_light, false, _directionalAmbientSphereLight, _directionalAmbientSphereLightLocations); - loadLightProgram(shader::render_utils::program::directional_skybox_light, false, _directionalSkyboxLight, _directionalSkyboxLightLocations); - - loadLightProgram(shader::render_utils::program::directional_ambient_light_shadow, false, _directionalAmbientSphereLightShadow, _directionalAmbientSphereLightShadowLocations); - loadLightProgram(shader::render_utils::program::directional_skybox_light_shadow, false, _directionalSkyboxLightShadow, _directionalSkyboxLightShadowLocations); - - loadLightProgram(shader::render_utils::program::local_lights_shading, true, _localLight, _localLightLocations); - loadLightProgram(shader::render_utils::program::local_lights_drawOutline, true, _localLightOutline, _localLightOutlineLocations); + loadLightProgram(shader::render_utils::program::local_lights_shading, true, _localLight); + loadLightProgram(shader::render_utils::program::local_lights_drawOutline, true, _localLightOutline); } // FIXME: figure out how to move lightFrame into a varying in GeometryCache and RenderPipelines @@ -123,15 +107,9 @@ void DeferredLightingEffect::unsetLocalLightsBatch(gpu::Batch& batch) { batch.setUniformBuffer(ru::Buffer::LightClusterFrustumGrid, nullptr); } -static gpu::ShaderPointer makeLightProgram(int programId, LightLocationsPtr& locations) { +static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePointer& pipeline) { + gpu::ShaderPointer program = gpu::Shader::createProgram(programId); - locations->initialize(program); - return program; -} - -static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePointer& pipeline, LightLocationsPtr& locations) { - - gpu::ShaderPointer program = makeLightProgram(programId, locations); auto state = std::make_shared(); state->setColorWriteMask(true, true, true, false); @@ -456,7 +434,6 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, // Setup the global directional pass pipeline auto program = deferredLightingEffect->_directionalSkyboxLight; - LightLocationsPtr locations = deferredLightingEffect->_directionalSkyboxLightLocations; { if (keyLightCastShadows) { @@ -464,20 +441,16 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, // otherwise use the ambient sphere version if (hasAmbientMap) { program = deferredLightingEffect->_directionalSkyboxLightShadow; - locations = deferredLightingEffect->_directionalSkyboxLightShadowLocations; } else { program = deferredLightingEffect->_directionalAmbientSphereLightShadow; - locations = deferredLightingEffect->_directionalAmbientSphereLightShadowLocations; } } else { // If the keylight has an ambient Map then use the Skybox version of the pass // otherwise use the ambient sphere version if (hasAmbientMap) { program = deferredLightingEffect->_directionalSkyboxLight; - locations = deferredLightingEffect->_directionalSkyboxLightLocations; } else { program = deferredLightingEffect->_directionalAmbientSphereLight; - locations = deferredLightingEffect->_directionalAmbientSphereLightLocations; } } diff --git a/libraries/render-utils/src/DeferredLightingEffect.h b/libraries/render-utils/src/DeferredLightingEffect.h index 1cc6ca4767..84b3127443 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.h +++ b/libraries/render-utils/src/DeferredLightingEffect.h @@ -37,10 +37,6 @@ #include "SubsurfaceScattering.h" #include "AmbientOcclusionEffect.h" - -struct LightLocations; -using LightLocationsPtr = std::shared_ptr; - // THis is where we currently accumulate the local lights, let s change that sooner than later class DeferredLightingEffect : public Dependency { SINGLETON_DEPENDENCY @@ -72,15 +68,6 @@ private: gpu::PipelinePointer _localLight; gpu::PipelinePointer _localLightOutline; - LightLocationsPtr _directionalSkyboxLightLocations; - LightLocationsPtr _directionalAmbientSphereLightLocations; - - LightLocationsPtr _directionalSkyboxLightShadowLocations; - LightLocationsPtr _directionalAmbientSphereLightShadowLocations; - - LightLocationsPtr _localLightLocations; - LightLocationsPtr _localLightOutlineLocations; - friend class LightClusteringPass; friend class RenderDeferredSetup; friend class RenderDeferredLocals; diff --git a/libraries/render-utils/src/deferred_light.slv b/libraries/render-utils/src/deferred_light.slv index 164fd9fb3b..2a68aa0e27 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -18,7 +18,7 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; void main(void) { const float depth = 1.0; - const vec4 UNIT_QUAD[4] = vec4[4]( + const mat4 UNIT_QUAD = mat4( vec4(-1.0, -1.0, depth, 1.0), vec4(1.0, -1.0, depth, 1.0), vec4(-1.0, 1.0, depth, 1.0), @@ -26,7 +26,7 @@ void main(void) { ); vec4 pos = UNIT_QUAD[gl_VertexID]; - _texCoord01.xy = (pos.xy + 1.0) * 0.5; + _texCoord01 = vec4((pos.xy + 1.0) * 0.5, 0.0, 0.0); gl_Position = pos; } From 96179328e00c3e988a9b7114c9232d76ee1cb0c7 Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Wed, 19 Jun 2019 11:20:32 -0700 Subject: [PATCH 18/18] nitpick: [mac] preserve symlinks when installing interface.app --- tools/nitpick/src/TestRunnerDesktop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nitpick/src/TestRunnerDesktop.cpp b/tools/nitpick/src/TestRunnerDesktop.cpp index b9caaa0ecb..acb5cc77b9 100644 --- a/tools/nitpick/src/TestRunnerDesktop.cpp +++ b/tools/nitpick/src/TestRunnerDesktop.cpp @@ -265,8 +265,8 @@ void TestRunnerDesktop::runInstaller() { folderName += QString(" - ") + getPRNumberFromURL(_url->text()); } - script.write((QString("cp -rf \"$VOLUME/") + folderName + "/interface.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); - script.write((QString("cp -rf \"$VOLUME/") + folderName + "/Sandbox.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); + script.write((QString("cp -Rf \"$VOLUME/") + folderName + "/interface.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); + script.write((QString("cp -Rf \"$VOLUME/") + folderName + "/Sandbox.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); script.write("hdiutil detach \"$VOLUME\"\n"); script.write("killall yes\n");