mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:36:47 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into yellow
This commit is contained in:
commit
8c9cf7bddd
2 changed files with 30 additions and 12 deletions
|
@ -20,7 +20,7 @@ macro(SETUP_HIFI_LIBRARY)
|
||||||
foreach(SRC ${AVX_SRCS})
|
foreach(SRC ${AVX_SRCS})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX)
|
||||||
elseif (APPLE OR UNIX)
|
elseif (APPLE OR (UNIX AND NOT ANDROID))
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -30,7 +30,7 @@ macro(SETUP_HIFI_LIBRARY)
|
||||||
foreach(SRC ${AVX2_SRCS})
|
foreach(SRC ${AVX2_SRCS})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX2)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX2)
|
||||||
elseif (APPLE OR UNIX)
|
elseif (APPLE OR (UNIX AND NOT ANDROID))
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma")
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -44,7 +44,7 @@ macro(SETUP_HIFI_LIBRARY)
|
||||||
if (COMPILER_SUPPORTS_AVX512)
|
if (COMPILER_SUPPORTS_AVX512)
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX512)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX512)
|
||||||
endif()
|
endif()
|
||||||
elseif (APPLE OR UNIX)
|
elseif (APPLE OR (UNIX AND NOT ANDROID))
|
||||||
check_cxx_compiler_flag("-mavx512f" COMPILER_SUPPORTS_AVX512)
|
check_cxx_compiler_flag("-mavx512f" COMPILER_SUPPORTS_AVX512)
|
||||||
if (COMPILER_SUPPORTS_AVX512)
|
if (COMPILER_SUPPORTS_AVX512)
|
||||||
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx512f)
|
set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx512f)
|
||||||
|
|
|
@ -239,15 +239,24 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
|
||||||
int pending = _udpSocket.bytesToWrite();
|
int pending = _udpSocket.bytesToWrite();
|
||||||
if (bytesWritten < 0 || pending) {
|
if (bytesWritten < 0 || pending) {
|
||||||
int wsaError = 0;
|
int wsaError = 0;
|
||||||
|
static std::atomic<int> previousWsaError (0);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
wsaError = WSAGetLastError();
|
wsaError = WSAGetLastError();
|
||||||
#endif
|
#endif
|
||||||
qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << sockAddr << ") error - " << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")"
|
QString errorString;
|
||||||
|
QDebug(&errorString) << "udt::writeDatagram (" << _udpSocket.state() << sockAddr << ") error - "
|
||||||
|
<< wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")"
|
||||||
<< (pending ? "pending bytes:" : "pending:") << pending;
|
<< (pending ? "pending bytes:" : "pending:") << pending;
|
||||||
|
|
||||||
|
if (previousWsaError.exchange(wsaError) != wsaError) {
|
||||||
|
qCDebug(networking).noquote() << errorString;
|
||||||
#ifdef DEBUG_EVENT_QUEUE
|
#ifdef DEBUG_EVENT_QUEUE
|
||||||
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
||||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize << "writing datagram to" << sockAddr;
|
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize << "writing datagram to" << sockAddr;
|
||||||
#endif // DEBUG_EVENT_QUEUE
|
#endif // DEBUG_EVENT_QUEUE
|
||||||
|
} else {
|
||||||
|
HIFI_FCDEBUG(networking(), errorString.toLatin1().constData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bytesWritten;
|
return bytesWritten;
|
||||||
|
@ -525,16 +534,25 @@ std::vector<HifiSockAddr> Socket::getConnectionSockAddrs() {
|
||||||
|
|
||||||
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
|
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
|
||||||
int wsaError = 0;
|
int wsaError = 0;
|
||||||
|
static std::atomic<int> previousWsaError(0);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
wsaError = WSAGetLastError();
|
wsaError = WSAGetLastError();
|
||||||
#endif
|
#endif
|
||||||
int pending = _udpSocket.bytesToWrite();
|
int pending = _udpSocket.bytesToWrite();
|
||||||
qCDebug(networking) << "udt::Socket (" << _udpSocket.state() << ") error - " << wsaError << socketError << "(" << _udpSocket.errorString() << ")"
|
QString errorString;
|
||||||
<< (pending ? "pending bytes:" : "pending:") << pending;
|
QDebug(&errorString) << "udt::Socket (" << _udpSocket.state() << ") error - " << wsaError << socketError <<
|
||||||
|
"(" << _udpSocket.errorString() << ")" << (pending ? "pending bytes:" : "pending:")
|
||||||
|
<< pending;
|
||||||
|
|
||||||
|
if (previousWsaError.exchange(wsaError) != wsaError) {
|
||||||
|
qCDebug(networking).noquote() << errorString;
|
||||||
#ifdef DEBUG_EVENT_QUEUE
|
#ifdef DEBUG_EVENT_QUEUE
|
||||||
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
||||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize;
|
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize;
|
||||||
#endif // DEBUG_EVENT_QUEUE
|
#endif // DEBUG_EVENT_QUEUE
|
||||||
|
} else {
|
||||||
|
HIFI_FCDEBUG(networking(), errorString.toLatin1().constData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {
|
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {
|
||||||
|
|
Loading…
Reference in a new issue