mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-16 07:39:11 +02:00
Merge branch 'master' of github.com:highfidelity/hifi
This commit is contained in:
commit
2888b65498
16 changed files with 94 additions and 58 deletions
|
@ -48,7 +48,8 @@ Rectangle {
|
|||
onSkeletonModelURLChanged: {
|
||||
root.updatePreviewUrl();
|
||||
|
||||
if (MyAvatar.skeletonModelURL.indexOf("defaultAvatar" > -1) && topBarInventoryModel.count > 0) {
|
||||
if ((MyAvatar.skeletonModelURL.indexOf("defaultAvatar") > -1 || MyAvatar.skeletonModelURL.indexOf("fst") === -1) &&
|
||||
topBarInventoryModel.count > 0) {
|
||||
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
||||
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
||||
}
|
||||
|
@ -100,7 +101,8 @@ Rectangle {
|
|||
inventoryFullyReceived = true;
|
||||
|
||||
// If we have an avatar in our inventory AND we haven't already auto-selected an avatar...
|
||||
if (!Settings.getValue("simplifiedUI/alreadyAutoSelectedAvatar", false) && topBarInventoryModel.count > 0) {
|
||||
if ((!Settings.getValue("simplifiedUI/alreadyAutoSelectedAvatar", false) ||
|
||||
MyAvatar.skeletonModelURL.indexOf("defaultAvatar") > -1 || MyAvatar.skeletonModelURL.indexOf("fst") === -1) && topBarInventoryModel.count > 0) {
|
||||
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
||||
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
||||
}
|
||||
|
|
|
@ -63,9 +63,15 @@ PerformanceManager::PerformancePreset PerformanceManager::getPerformancePreset()
|
|||
|
||||
void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformancePreset preset) {
|
||||
|
||||
// Ugly case that prevent us to run deferred everywhere...
|
||||
bool isDeferredCapable = platform::Profiler::isRenderMethodDeferredCapable();
|
||||
|
||||
switch (preset) {
|
||||
case PerformancePreset::HIGH:
|
||||
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
|
||||
RenderScriptingInterface::getInstance()->setRenderMethod( ( isDeferredCapable ?
|
||||
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||
RenderScriptingInterface::RenderMethod::FORWARD ) );
|
||||
|
||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
|
||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
|
||||
|
||||
|
@ -73,7 +79,10 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
|||
|
||||
break;
|
||||
case PerformancePreset::MID:
|
||||
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
|
||||
RenderScriptingInterface::getInstance()->setRenderMethod((isDeferredCapable ?
|
||||
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||
RenderScriptingInterface::RenderMethod::FORWARD));
|
||||
|
||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
|
||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
|
||||
DependencyManager::get<LODManager>()->setWorldDetailQuality(0.5f);
|
||||
|
|
|
@ -262,7 +262,7 @@ class Stats : public QQuickItem {
|
|||
STATS_PROPERTY(int, processing, 0)
|
||||
STATS_PROPERTY(int, processingPending, 0)
|
||||
STATS_PROPERTY(int, triangles, 0)
|
||||
STATS_PROPERTY(uint32_t, drawcalls, 0)
|
||||
STATS_PROPERTY(quint32 , drawcalls, 0)
|
||||
STATS_PROPERTY(int, materialSwitches, 0)
|
||||
STATS_PROPERTY(int, itemConsidered, 0)
|
||||
STATS_PROPERTY(int, itemOutOfView, 0)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 26 KiB |
|
@ -256,28 +256,18 @@ void EntityTreeRenderer::clear() {
|
|||
}
|
||||
|
||||
// reset the engine
|
||||
if (_wantScripts && !_shuttingDown) {
|
||||
resetEntitiesScriptEngine();
|
||||
}
|
||||
// remove all entities from the scene
|
||||
auto scene = _viewState->getMain3DScene();
|
||||
if (_shuttingDown) {
|
||||
if (scene) {
|
||||
render::Transaction transaction;
|
||||
for (const auto& entry : _entitiesInScene) {
|
||||
const auto& renderer = entry.second;
|
||||
renderer->removeFromScene(scene, transaction);
|
||||
}
|
||||
scene->enqueueTransaction(transaction);
|
||||
if (scene) {
|
||||
for (const auto& entry : _entitiesInScene) {
|
||||
const auto& renderer = entry.second;
|
||||
fadeOutRenderable(renderer);
|
||||
}
|
||||
} else {
|
||||
if (_wantScripts) {
|
||||
resetEntitiesScriptEngine();
|
||||
}
|
||||
if (scene) {
|
||||
for (const auto& entry : _entitiesInScene) {
|
||||
const auto& renderer = entry.second;
|
||||
fadeOutRenderable(renderer);
|
||||
}
|
||||
} else {
|
||||
qCWarning(entitiesrenderer) << "EntitityTreeRenderer::clear(), Unexpected null scene";
|
||||
}
|
||||
qCWarning(entitiesrenderer) << "EntitityTreeRenderer::clear(), Unexpected null scene, possibly during application shutdown";
|
||||
}
|
||||
_entitiesInScene.clear();
|
||||
_renderablesToUpdate.clear();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
//
|
||||
|
||||
#include "RenderableWebEntityItem.h"
|
||||
#include <atomic>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
|
@ -47,7 +46,7 @@ static uint64_t MAX_NO_RENDER_INTERVAL = 30 * USECS_PER_SECOND;
|
|||
static uint8_t YOUTUBE_MAX_FPS = 30;
|
||||
|
||||
// Don't allow more than 20 concurrent web views
|
||||
static std::atomic<uint32_t> _currentWebCount(0);
|
||||
static uint32_t _currentWebCount { 0 };
|
||||
static const uint32_t MAX_CONCURRENT_WEB_VIEWS = 20;
|
||||
|
||||
static QTouchDevice _touchDevice;
|
||||
|
@ -357,15 +356,16 @@ void WebEntityRenderer::buildWebSurface(const EntityItemPointer& entity, const Q
|
|||
|
||||
void WebEntityRenderer::destroyWebSurface() {
|
||||
QSharedPointer<OffscreenQmlSurface> webSurface;
|
||||
ContentType contentType = ContentType::NoContent;
|
||||
withWriteLock([&] {
|
||||
webSurface.swap(_webSurface);
|
||||
_contentType = ContentType::NoContent;
|
||||
|
||||
if (webSurface) {
|
||||
--_currentWebCount;
|
||||
WebEntityRenderer::releaseWebSurface(webSurface, _cachedWebSurface, _connections);
|
||||
}
|
||||
_contentType = contentType;
|
||||
});
|
||||
|
||||
if (webSurface) {
|
||||
--_currentWebCount;
|
||||
WebEntityRenderer::releaseWebSurface(webSurface, _cachedWebSurface, _connections);
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec2 WebEntityRenderer::getWindowSize(const TypedEntityPointer& entity) const {
|
||||
|
@ -469,12 +469,6 @@ void WebEntityRenderer::handlePointerEventAsMouse(const PointerEvent& event) {
|
|||
QCoreApplication::sendEvent(_webSurface->getWindow(), &mouseEvent);
|
||||
}
|
||||
|
||||
void WebEntityRenderer::onRemoveFromSceneTyped(const TypedEntityPointer& entity) {
|
||||
// HACK: destroyWebSurface() here to avoid a crash on shutdown.
|
||||
// TODO: fix the real problem: EntityRenderer<>::dtor never called on shutdown for smart-pointer resource leak.
|
||||
destroyWebSurface();
|
||||
}
|
||||
|
||||
void WebEntityRenderer::setProxyWindow(QWindow* proxyWindow) {
|
||||
withReadLock([&] {
|
||||
if (_webSurface) {
|
||||
|
|
|
@ -64,7 +64,6 @@ protected:
|
|||
void handlePointerEventAsTouch(const PointerEvent& event);
|
||||
void handlePointerEventAsMouse(const PointerEvent& event);
|
||||
|
||||
void onRemoveFromSceneTyped(const TypedEntityPointer& entity) override;
|
||||
private:
|
||||
void onTimeout();
|
||||
void buildWebSurface(const EntityItemPointer& entity, const QString& newSourceURL);
|
||||
|
|
|
@ -306,7 +306,8 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
// may be called by multiple threads.
|
||||
|
||||
if (!_sendDomainServerCheckInEnabled) {
|
||||
qCDebug(networking_ice) << "Refusing to send a domain-server check in while it is disabled.";
|
||||
static const QString DISABLED_CHECKIN_DEBUG{ "Refusing to send a domain-server check in while it is disabled." };
|
||||
HIFI_FCDEBUG(networking_ice(), DISABLED_CHECKIN_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -450,13 +451,17 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
|
||||
// Send duplicate check-ins in the exponentially increasing sequence 1, 1, 2, 4, ...
|
||||
static const int MAX_CHECKINS_TOGETHER = 20;
|
||||
static const int REBIND_CHECKIN_COUNT = 2;
|
||||
int outstandingCheckins = _domainHandler.getCheckInPacketsSinceLastReply();
|
||||
/*
|
||||
static const int WARNING_CHECKIN_COUNT = 2;
|
||||
if (outstandingCheckins > WARNING_CHECKIN_COUNT) {
|
||||
// We may be headed for a disconnect, as we've written two DomainListRequests without getting anything back.
|
||||
// In some cases, we've found that nothing is going out on the wire despite not getting any errors from
|
||||
// sendPacket => writeDatagram, below. In at least some such cases, we've found that the DomainDisconnectRequest
|
||||
// does go through, so let's at least try to mix it up with a different safe packet.
|
||||
// TODO: send ICEPing, and later on tell the other nodes to shut up for a moment.
|
||||
|
||||
if (outstandingCheckins > REBIND_CHECKIN_COUNT) {
|
||||
_nodeSocket.rebind();
|
||||
}
|
||||
|
||||
}*/
|
||||
int checkinCount = outstandingCheckins > 1 ? std::pow(2, outstandingCheckins - 2) : 1;
|
||||
checkinCount = std::min(checkinCount, MAX_CHECKINS_TOGETHER);
|
||||
for (int i = 1; i < checkinCount; ++i) {
|
||||
|
|
|
@ -230,7 +230,7 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
|
|||
// _udpSocket.writeDatagram will return an error anyway, but there are
|
||||
// potential crashes in Qt when that happens.
|
||||
if (_udpSocket.state() != QAbstractSocket::BoundState) {
|
||||
qCDebug(networking) << "Attempt to writeDatagram when in unbound state";
|
||||
qCDebug(networking) << "Attempt to writeDatagram when in unbound state to" << sockAddr;
|
||||
return -1;
|
||||
}
|
||||
qint64 bytesWritten = _udpSocket.writeDatagram(datagram, sockAddr.getAddress(), sockAddr.getPort());
|
||||
|
@ -240,11 +240,11 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
|
|||
#ifdef WIN32
|
||||
wsaError = WSAGetLastError();
|
||||
#endif
|
||||
qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << ") error - " << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")"
|
||||
qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << sockAddr << ") error - " << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")"
|
||||
<< (pending ? "pending bytes:" : "pending:") << pending;
|
||||
#ifdef DEBUG_EVENT_QUEUE
|
||||
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize;
|
||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize << "writing datagram to" << sockAddr;
|
||||
#endif // DEBUG_EVENT_QUEUE
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "Platform.h"
|
||||
#include "PlatformKeys.h"
|
||||
#include <qglobal.h>
|
||||
|
||||
using namespace platform;
|
||||
|
||||
|
@ -124,4 +125,35 @@ bool filterOnProcessors(const platform::json& computer, const platform::json& cp
|
|||
|
||||
// Not able to profile
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Ugly very adhoc capability check to know if a particular hw can REnder with Deferred method or not
|
||||
// YES for PC windows and linux
|
||||
// NO for android
|
||||
// YES on macos EXCEPT for macbookair with gpu intel iris or intel HD 6000
|
||||
bool Profiler::isRenderMethodDeferredCapable() {
|
||||
#if defined(Q_OS_MAC)
|
||||
auto computer = platform::getComputer();
|
||||
const auto computerModel = (computer.count(keys::computer::model) ? computer[keys::computer::model].get<std::string>() : "");
|
||||
|
||||
auto gpuInfo = platform::getGPU(0);
|
||||
const auto gpuModel = (gpuInfo.count(keys::gpu::model) ? gpuInfo[keys::gpu::model].get<std::string>() : "");
|
||||
|
||||
|
||||
// Macbook air 2018 are a problem
|
||||
if ((computerModel.find("MacBookAir") != std::string::npos) && (gpuModel.find("Intel HD Graphics 6000") != std::string::npos)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We know for fact that one INtel Iris is problematic, not enough info yet for sure
|
||||
// if ((gpuModel.find("Intel Iris ....") != std::string::npos)) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
return true;
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ public:
|
|||
static const std::array<const char*, Tier::NumTiers> TierNames;
|
||||
|
||||
static Tier profilePlatform();
|
||||
|
||||
// Ugly very adhoc capability check to know if a particular hw can REnder with Deferred method or not
|
||||
static bool isRenderMethodDeferredCapable();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
GLint rendererInfoCount;
|
||||
CGLError err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &rendererInfoCount);
|
||||
GLint j, numRenderers = 0, deviceVRAM, bestVRAM = 0;
|
||||
int bestGPUid = 0;
|
||||
err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &numRenderers);
|
||||
if (0 == err) {
|
||||
// Iterate over all of them and use the figure for the one with the most VRAM,
|
||||
|
@ -55,6 +56,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
for (j = 0; j < numRenderers; j++) {
|
||||
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
||||
if (deviceVRAM > bestVRAM) {
|
||||
bestGPUid = j;
|
||||
bestVRAM = deviceVRAM;
|
||||
_isValid = true;
|
||||
}
|
||||
|
@ -78,6 +80,8 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
for (int i = 0; i < parts.size(); ++i) {
|
||||
if (parts[i].toLower().contains("radeon") || parts[i].toLower().contains("nvidia")) {
|
||||
_name=parts[i];
|
||||
} else if (i == bestGPUid) {
|
||||
_name=parts[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,9 @@ Rectangle {
|
|||
color: global.color
|
||||
|
||||
ScrollView {
|
||||
id: control
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
contentWidth: parent.width
|
||||
clip: true
|
||||
|
||||
Column {
|
||||
|
|
|
@ -24,9 +24,12 @@ Rectangle {
|
|||
color: global.colorBack
|
||||
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
contentWidth: parent.width
|
||||
clip: true
|
||||
Column {
|
||||
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
@ -35,8 +38,6 @@ Rectangle {
|
|||
isUnfold: true
|
||||
panelFrameData: Component {
|
||||
PerformanceSettings {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,8 +46,6 @@ Rectangle {
|
|||
isUnfold: true
|
||||
panelFrameData: Component {
|
||||
RenderSettings {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +53,6 @@ Rectangle {
|
|||
label: "Platform"
|
||||
panelFrameData: Component {
|
||||
Platform {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -415,7 +415,7 @@ function getInputDeviceMutedOverlayTopY() {
|
|||
var inputDeviceMutedOverlay = false;
|
||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX = 353;
|
||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX = 95;
|
||||
var INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20;
|
||||
var INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20 + TOP_BAR_HEIGHT_PX;
|
||||
function updateInputDeviceMutedOverlay(isMuted) {
|
||||
if (isMuted) {
|
||||
var props = {
|
||||
|
|
Loading…
Reference in a new issue