Merge branch 'main' into Prefab/CreatePrefab

This commit is contained in:
srikappa
2021-04-27 15:41:04 -07:00
4912 changed files with 44763 additions and 90471 deletions
@@ -26,4 +26,4 @@ namespace AZ
template <typename T>
using Instance = AZStd::intrusive_ptr<T>;
}
}
}
@@ -60,4 +60,4 @@ namespace AZ
return m_guid != rhs.m_guid || m_subId != rhs.m_subId;
}
}
}
}
@@ -35,4 +35,4 @@ namespace AZStd
base_type::assign(list.begin(), list.end());
}
};
}
}
@@ -158,4 +158,4 @@ namespace AZStd
/// Old elements will be evicted if the capacity is exceeded.
size_t m_capacity = 0;
};
} // namespace AZStd
} // namespace AZStd
@@ -76,4 +76,4 @@ namespace AZStd
base_type::m_container.set_allocator(allocator);
}
};
}
}
@@ -231,4 +231,4 @@ namespace AZStd
protected:
RandomAccessContainer m_container;
};
}
}
@@ -16,4 +16,4 @@ set(FILES
lru_cache.cpp
Main.cpp
vector_set.cpp
)
)
+1 -1
View File
@@ -169,4 +169,4 @@ namespace UnitTest
intintptr_cache.clear();
EXPECT_EQ(p->use_count(), 1);
}
}
}
+1 -1
View File
@@ -282,4 +282,4 @@ namespace UnitTest
VectorSetTester<AZStd::fixed_vector_set<int32_t, 64>> tester;
tester.TestIteratorsConst();
}
}
}
@@ -193,4 +193,4 @@ public class KeyboardHandler
private Activity m_activity;
private InputMethodManager m_inputManager;
private DummyTextView m_textView;
}
}
@@ -88,4 +88,4 @@ public class APKHandler
private static AssetManager s_assetManager = null;
private static boolean s_debug = false;
}
}
@@ -320,4 +320,4 @@ public class ObbDownloaderActivity extends Activity implements IDownloaderClient
private int m_buttonPauseTextId;
private int m_kbPerSecondTextId;
private int m_timeRemainingTextId;
}
}
@@ -37,4 +37,4 @@ public class ObbDownloaderAlarmReceiver extends BroadcastReceiver
e.printStackTrace();
}
}
}
}
@@ -75,4 +75,4 @@ public class ObbDownloaderService extends DownloaderService
private byte[] m_salt = new byte[] { 23, 12, 4, -12, -34, 23,
-120, 122, -23, -104, -2, -4, 12, 3, -21, 123, -11, 4, -11, 32
};
}
}
@@ -84,4 +84,4 @@ public class SimpleObject
// ----
private static final String TAG = "SimpleObject";
}
}
@@ -11,4 +11,4 @@
set(FILES
AzAutoGen.py
)
)
@@ -417,4 +417,4 @@ namespace AZ
return true;
}
}
}
}
@@ -219,4 +219,4 @@ namespace AZ
bool m_isRunning; //!< Internal flag indicating if the application is running, mainly used to determine if we shoudl be blocking on the event pump while paused
};
} // namespace Android
} // namespace AZ
} // namespace AZ
@@ -485,4 +485,4 @@ namespace AZ { namespace Android
} // namespace AZ
#include <AzCore/Android/JNI/Internal/Object_impl.h>
#include <AzCore/Android/JNI/Internal/Object_impl.h>
@@ -1104,8 +1104,11 @@ namespace AZ
// If we either already had valid asset data, or just created it via FindOrCreateAsset, try to queue the load.
if (m_assetData && m_assetData->GetId().IsValid())
{
// Only try to queue if the asset isn't already loading or loaded.
if (m_assetData->GetStatus() == AZ::Data::AssetData::AssetStatus::NotLoaded)
// Try to queue if the asset isn't already loading or loaded.
// Also try to queue if the asset *is* already loading or loaded, but we're the only one with a strong reference
// (i.e. use count == 1), because that means it was in the process of being garbage-collected.
if ((m_assetData->GetStatus() == AZ::Data::AssetData::AssetStatus::NotLoaded) ||
(m_assetData->GetUseCount() == 1))
{
*this = AssetInternal::GetAsset(m_assetData->GetId(), m_assetData->GetType(), loadBehavior, loadParams);
}
@@ -255,7 +255,7 @@ namespace AZ
bool AssetContainer::IsValid() const
{
return (m_containerAssetId.IsValid() && m_initComplete);
return (m_containerAssetId.IsValid() && m_initComplete && m_rootAsset);
}
void AssetContainer::CheckReady()
@@ -341,6 +341,7 @@ namespace AZ
void AssetContainer::OnAssetError(Asset<AssetData> asset)
{
AZ_Warning("AssetContainer", false, "Error loading asset %s", asset->GetId().ToString<AZStd::string>().c_str());
HandleReadyAsset(asset);
}
@@ -366,7 +367,10 @@ namespace AZ
auto remainingPreloadIter = m_preloadList.find(waiterId);
if (remainingPreloadIter == m_preloadList.end())
{
AZ_Warning("AssetContainer", !m_initComplete, "Couldn't find waiting list for %s", waiterId.ToString<AZStd::string>().c_str());
// If we got here without an entry on the preload list, it probably means this asset was triggered to load multiple
// times, some with dependencies and some without. To ensure that we don't disturb the loads that expect the
// dependencies, just silently return and don't treat the asset as finished loading. We'll rely on the other load
// to send an OnAssetReady() whenever its expected dependencies are met.
return;
}
if (!remainingPreloadIter->second.erase(preloadID))
@@ -610,7 +614,12 @@ namespace AZ
}
for(auto& thisList : preloadList)
{
m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end());
// Only save the entry to the final preload list if it has at least one dependent asset still remaining after
// the checks above.
if (!thisList.second.empty())
{
m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end());
}
}
}
}
@@ -208,6 +208,7 @@ namespace AZ::Data
void AssetDataStream::Close()
{
AZ_Assert(m_isOpen, "Attempting to close a stream that hasn't been opened.");
AZ_Assert(m_curReadRequest == nullptr, "Attempting to close a stream with a read request in flight.");
// Destroy the asset buffer and unlock the allocator, so the allocator itself knows that it is no longer needed.
if (m_buffer != m_preloadedData.data())
@@ -222,6 +223,16 @@ namespace AZ::Data
AZ_PROFILE_INTERVAL_END(AZ::Debug::ProfileCategory::AzCore, this);
}
void AssetDataStream::RequestCancel()
{
AZStd::scoped_lock<AZStd::mutex> lock(m_readRequestMutex);
if (m_curReadRequest)
{
auto streamer = Interface<IO::IStreamer>::Get();
m_curReadRequest = streamer->Cancel(m_curReadRequest);
}
}
void AssetDataStream::Seek(AZ::IO::OffsetType bytes, AZ::IO::GenericStream::SeekMode mode)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzCore);
@@ -82,6 +82,10 @@ namespace AZ::Data
//! Gets the size of data loaded (so far).
size_t GetLoadedSize() const { return m_loadedSize; }
//! Request a cancellation of any current IO streamer requests.
//! Note: This is asynchronous and not guaranteed to cancel if the request is already in-process.
void RequestCancel();
private:
//! Perform any operations needed by all variants of Open()
void OpenInternal(size_t assetSize, const char* streamName);
@@ -28,6 +28,8 @@ namespace AZ::Data::AssetInternal
class WeakAsset
{
public:
static constexpr bool EnableAssetCancellation = false;
WeakAsset() = default;
WeakAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior);
@@ -111,7 +113,14 @@ namespace AZ::Data::AssetInternal
// - If the left and right sides are the same, clearing the right side's reference means one less reference will exist
if (m_assetData)
{
m_assetData->ReleaseWeak();
if constexpr (EnableAssetCancellation)
{
m_assetData->ReleaseWeak();
}
else
{
m_assetData->Release();
}
}
m_assetData = AZStd::move(rhs.m_assetData);
rhs.m_assetData = nullptr;
@@ -141,13 +150,27 @@ namespace AZ::Data::AssetInternal
if (assetData)
{
assetData->AcquireWeak();
if constexpr (EnableAssetCancellation)
{
assetData->AcquireWeak();
}
else
{
assetData->Acquire();
}
m_assetId = assetData->GetId();
}
if (m_assetData)
{
m_assetData->ReleaseWeak();
if constexpr (EnableAssetCancellation)
{
m_assetData->ReleaseWeak();
}
else
{
m_assetData->Release();
}
}
m_assetData = assetData;
@@ -2144,7 +2144,7 @@ namespace AZ
if (curIter != m_assetContainers.end())
{
auto newRef = curIter->second.lock();
if (newRef)
if (newRef && newRef->IsValid())
{
return newRef;
}
@@ -87,4 +87,4 @@ namespace AZ
size_t m_nextBlockSize;
unsigned int m_compressedBufferIndex;
};
};
};
@@ -82,4 +82,4 @@ namespace AZ
#define AZ_TRACE_INSTANT_THREAD_CATEGORY(name, category) \
EBUS_QUEUE_EVENT(AZ::Debug::EventTraceDrillerBus, RecordInstantThread, name, category, AZStd::this_thread::get_id(), AZStd::GetTimeNowMicroSecond())
#define AZ_TRACE_INSTANT_THREAD(name) AZ_TRACE_INSTANT_THREAD_CATEGORY(name, "")
#define AZ_TRACE_INSTANT_THREAD(name) AZ_TRACE_INSTANT_THREAD_CATEGORY(name, "")
@@ -64,4 +64,4 @@ namespace AZ
} // namespace AZ
#endif // AZCORE_FRAME_PROFILER_H
#pragma once
#pragma once
@@ -39,4 +39,4 @@ namespace AZ
} // namespace AZ
#endif // AZCORE_FRAME_PROFILER_BUS_H
#pragma once
#pragma once
@@ -46,4 +46,4 @@ namespace AZ
}
#endif // AZCORE_PROFILER_DRILLER_BUS_H
#pragma once
#pragma once
@@ -194,4 +194,4 @@ namespace AZ
}
};
}
}
}
@@ -112,4 +112,4 @@ namespace AZ
return m_offsetEnd;
}
} // namespace IO
} // namesapce AZ
} // namesapce AZ
@@ -71,4 +71,4 @@ namespace AZ
u64 m_offsetEnd : 63;
};
} // namespace IO
} // namesapce AZ
} // namesapce AZ
+1 -1
View File
@@ -24,4 +24,4 @@
#if AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING && defined(AZ_COMPILER_CLANG)
#pragma clang diagnostic pop
#endif
#endif
@@ -46,4 +46,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
@@ -68,4 +68,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
@@ -70,4 +70,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
+1 -1
View File
@@ -36,4 +36,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
@@ -96,4 +96,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
@@ -135,4 +135,4 @@ namespace AZ
}
#endif
#pragma once
#pragma once
@@ -296,4 +296,4 @@ namespace AZ
m_updateCallback(index);
}
}
}
}
@@ -164,4 +164,4 @@ namespace AZ
return GetTargetValue();
}
};
}
}
@@ -67,4 +67,4 @@ namespace AZ
//! Transforms a position by a matrix. This function can be used with any generic cases which include projection matrices.
Vector3 MatrixTransformPosition(const Matrix4x4& matrix, const Vector3& inPosition);
} // namespace AZ
} // namespace AZ
@@ -110,4 +110,4 @@ namespace AZ
} // namespace AZ
#include <AzCore/Math/Internal/VertexContainer.inl>
#include <AzCore/Math/Internal/VertexContainer.inl>
@@ -172,4 +172,4 @@ namespace AZ
template<>
inline AZ::Vector3 AdaptVertexOut<AZ::Vector2>(const AZ::Vector2& vector) { return Vector2ToVector3(vector); }
} // namespace AZ
} // namespace AZ
@@ -31,4 +31,4 @@ namespace AZ
return modulePath;
}
} // namespace Internal
} // namespace AZ
} // namespace AZ
@@ -113,4 +113,4 @@
#define AZCG_Unpack_98(x, ...) AZCG_Unpack_1(x) AZCG_Unpack_97(__VA_ARGS__)
#define AZCG_Unpack_99(x, ...) AZCG_Unpack_1(x) AZCG_Unpack_98(__VA_ARGS__)
#define AZCG_Unpack(...) AZ_MACRO_SPECIALIZE(AZCG_Unpack_, AZ_VA_NUM_ARGS(__VA_ARGS__), (__VA_ARGS__))
#define AZCG_Paste(x) x
#define AZCG_Paste(x) x
@@ -26,4 +26,4 @@ namespace AZ
void Activate() override { }
void Deactivate() override { }
};
}
}
@@ -79,4 +79,4 @@ namespace AZ
AZ_TYPE_INFO_SPECIALIZE(Script::Attributes::OperatorType, "{26B98C03-7E07-4E3E-9E31-03DA2168E896}");
AZ_TYPE_INFO_SPECIALIZE(Script::Attributes::StorageType, "{57FED71F-B590-4002-9599-A48CB50B0F8E}");
}
}
@@ -32,4 +32,4 @@ namespace AZ
};
typedef AZ::EBus<BehaviorObjectSignalsInterface> BehaviorObjectSignals;
}
}
@@ -138,4 +138,4 @@ namespace AZ
m_currentlyProcessingTypeIds.pop_back();
}
}
}
}
@@ -208,4 +208,4 @@ namespace AZ
}
}
}
}
}
@@ -1411,4 +1411,4 @@ namespace AZ
m_value = entityProperty->m_value;
}
}
}
}
@@ -38,4 +38,4 @@ namespace AZ
};
typedef AZ::EBus<ScriptPropertyWatcherInterface> ScriptPropertyWatcherBus;
}
}
@@ -47,4 +47,4 @@ namespace AZ
}
}
#endif // #if !defined(AZCORE_EXCLUDE_LUA)
#endif // #if !defined(AZCORE_EXCLUDE_LUA)
@@ -287,4 +287,4 @@ namespace AZ
return nullptr;
}
}
}
@@ -139,4 +139,4 @@ namespace AZ
/// @deprecated Use SliceBus.
using PrefabBus = SliceBus;
} // namespace AZ
} // namespace AZ
@@ -39,4 +39,4 @@ namespace AZ
SliceAssetHandler m_assetHandler;
};
} // namespace AZ
} // namespace AZ
+1 -1
View File
@@ -125,4 +125,4 @@ namespace AZ
bool DummyStateHandler(HSM& /*sm*/, const HSM::Event& /*e*/) { return handleEvent; }
}
#endif // AZCORE_HIERARCHIAL_STATE_MACHINE_H
#pragma once
#pragma once
+1 -1
View File
@@ -38,4 +38,4 @@ namespace AZStd
using std::is_placeholder;
template<class T>
constexpr size_t is_placeholder_v = is_placeholder<T>::value;
}
}
@@ -2024,4 +2024,4 @@ namespace AZStd
#endif // AZSTD_DELEGATE_H
#pragma once
#pragma once
@@ -228,4 +228,4 @@ namespace AZStd
}
#endif //AZSTD_DELEGATE_BIND_H
#pragma once
#pragma once
@@ -23,4 +23,4 @@ namespace AZStd
#endif // AZSTD_DELEGATE_H
#pragma once
#pragma once
@@ -194,4 +194,4 @@ namespace AZStd
}
#endif // AZSTD_PARALLEL_CONTAINERS_CONCURRENT_FIXED_UNORDERED_MAP_H
#pragma once
#pragma once
@@ -162,4 +162,4 @@ namespace AZStd
}
#endif // AZSTD_PARALLEL_CONTAINERS_CONCURRENT_FIXED_UNORDERED_SET_H
#pragma once
#pragma once
@@ -266,4 +266,4 @@ namespace AZStd
}
#endif // AZSTD_PARALLEL_CONTAINERS_CONCURRENT_UNORDERED_MAP_H
#pragma once
#pragma once
@@ -228,4 +228,4 @@ namespace AZStd
}
#endif // AZSTD_PARALLEL_CONTAINERS_CONCURRENT_UNORDERED_SET_H
#pragma once
#pragma once
@@ -159,4 +159,4 @@ namespace AZStd
}
#endif
#pragma once
#pragma once
@@ -23,4 +23,4 @@ namespace AZStd
*/
using intrusive_base = intrusive_refcount<atomic_uint>;
} // namespace AZStd
} // namespace AZStd
@@ -75,4 +75,4 @@ namespace AZStd
Deleter m_deleter;
};
} // namespace AZStd
} // namespace AZStd
@@ -62,4 +62,4 @@ namespace AZStd
}
}
#endif // AZSTD_MEMORYTOASCII_H
#endif // AZSTD_MEMORYTOASCII_H
@@ -16,4 +16,4 @@ namespace AZStd
{
using std::add_const;
using std::add_const_t;
}
}
@@ -17,4 +17,4 @@ namespace AZStd
using std::add_pointer;
template<class Type>
using add_pointer_t = std::add_pointer_t<Type>;
}
}
@@ -129,4 +129,4 @@ namespace AZStd
{
};
}
}
}
@@ -41,4 +41,4 @@ namespace AZStd
template <size_t index, typename ...Args>
using pack_traits_get_arg_t = typename pack_traits_get_arg<index, pack_traits_arg_sequence<Args...>>::type;
}
}
}
@@ -17,4 +17,4 @@ namespace AZStd
{
using std::is_member_object_pointer;
using std::is_member_object_pointer_v;
}
}
@@ -17,4 +17,4 @@ namespace AZStd
using std::remove_pointer;
template<class Type>
using remove_pointer_t = std::remove_pointer_t<Type>;
}
}
@@ -19,4 +19,4 @@ namespace AZStd
// It can be used to detect ill-formed which are not mappable to void
template<typename... Args> struct make_void { using type = void; };
template<typename... Args> using void_t = typename make_void<Args...>::type;
}
}
@@ -11,4 +11,4 @@
*/
#pragma once
#include <AzCore/AzCore_Traits_Android.h>
#include <AzCore/AzCore_Traits_Android.h>
@@ -21,4 +21,4 @@ namespace AZ
return 0;
}
}
}
}
@@ -11,4 +11,4 @@
*/
#pragma once
#include "../../../Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.h"
#include "../../../Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.h"
@@ -11,4 +11,4 @@
*/
#pragma once
#include "../../../Common/UnixLike/AzCore/Socket/AzSocket_fwd_UnixLike.h"
#include "../../../Common/UnixLike/AzCore/Socket/AzSocket_fwd_UnixLike.h"
@@ -9,4 +9,4 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#pragma once
@@ -91,4 +91,4 @@ if (LY_TEST_PROJECT)
PROPERTY COMPILE_DEFINITIONS
VALUES LY_NO_ASSETS
)
endif()
endif()
@@ -65,4 +65,4 @@ namespace AZ::IO::Platform
}
}
}
}
}
@@ -21,4 +21,4 @@ inline void* memalign(size_t blocksize, size_t bytes)
}
# define AZ_OS_MALLOC(byteSize, alignment) memalign(alignment, byteSize)
# define AZ_OS_FREE(pointer) ::free(pointer)
# define AZ_OS_FREE(pointer) ::free(pointer)
@@ -34,4 +34,4 @@ namespace AZ::Platform
m_threadSleepCondition.notify_one();
}
} // namespace AZ::Platform
} // namespace AZ::Platform
@@ -28,4 +28,4 @@ namespace AZ
{
}
} // namespace Internal
} // namespace AZ
} // namespace AZ
@@ -27,4 +27,4 @@ namespace AZStd
return result;
}
}
}
@@ -50,4 +50,4 @@ namespace RADTelemetry
using ProfileTelemetryRequestBus = AZ::EBus<ProfileTelemetryRequests>;
}
#endif
#endif
@@ -90,4 +90,4 @@ namespace AZ
}
}
}
}
}
@@ -26,4 +26,4 @@ namespace AZ
bool FormatAndPeelOffWildCardExtension(const char* sourcePath, char* filePath, size_t filePathSize, char* extensionPath, size_t extensionSize, bool keepWildcard = false);
}
}
}
}
@@ -14,4 +14,4 @@
#include <malloc.h>
# define AZ_OS_MALLOC(byteSize, alignment) ::memalign(alignment, byteSize)
# define AZ_OS_FREE(pointer) ::free(pointer)
# define AZ_OS_FREE(pointer) ::free(pointer)
@@ -12,4 +12,4 @@
#pragma once
#include <unistd.h>
#include <unistd.h>
@@ -12,4 +12,4 @@
#pragma once
struct sockaddr;
struct sockaddr_in;
struct sockaddr_in;
@@ -12,4 +12,4 @@
set(FILES
RadTelemetry/ProfileTelemetry.h
RadTelemetry/ProfileTelemetryBus.h
)
)
@@ -11,4 +11,4 @@
*/
#pragma once
#include <AzCore/AzCore_Traits_Linux.h>
#include <AzCore/AzCore_Traits_Linux.h>
@@ -65,4 +65,4 @@ namespace AZ::IO::Platform
}
}
}
}
}
@@ -21,4 +21,4 @@ namespace AZ
return 0;
}
}
}
}
@@ -28,4 +28,4 @@ namespace AZ
{
}
} // namespace Internal
} // namespace AZ
} // namespace AZ

Some files were not shown because too many files have changed in this diff Show More