Merge branch 'development' into math_string_converters

monroegm-disable-blank-issue-2
puvvadar 4 years ago committed by GitHub
commit a2d86a9fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,3 +67,6 @@ add_subdirectory(Multiplayer)
## Integration tests for editor testing framework ##
add_subdirectory(editor_test_testing)
## Performance ##
add_subdirectory(Performance)

@ -0,0 +1,39 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
if(NOT PAL_TRAIT_BUILD_TESTS_SUPPORTED OR NOT PAL_TRAIT_BUILD_HOST_TOOLS)
return()
endif()
ly_add_pytest(
NAME AutomatedTesting::EditorLevelLoadingPerfTests_DX12
TEST_SUITE periodic
TEST_REQUIRES gpu
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic_DX12.py
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
Performance
)
ly_add_pytest(
NAME AutomatedTesting::EditorLevelLoadingPerfTests_Vulkan
TEST_SUITE periodic
TEST_REQUIRES gpu
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic_Vulkan.py
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
Performance
)

@ -0,0 +1,31 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# This suite consists of all test cases that are passing and have been verified.
import pytest
import os
import sys
from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
class TestAutomation(EditorTestSuite):
class Time_EditorLevelLoading_10KEntityCpuPerfTest(EditorSingleTest):
extra_cmdline_args = ['-rhi=dx12']
use_null_renderer = False # needs renderer to validate test
from .tests import EditorLevelLoading_10KEntityCpuPerfTest as test_module
class Time_EditorLevelLoading_10kVegInstancesTest(EditorSingleTest):
extra_cmdline_args = ['-rhi=dx12']
use_null_renderer = False # needs renderer to validate test
from .tests import EditorLevelLoading_10kVegInstancesTest as test_module

@ -0,0 +1,34 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# This suite consists of all test cases that are passing and have been verified.
import pytest
import os
import sys
from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
class TestAutomation(EditorTestSuite):
class Time_EditorLevelLoading_10KEntityCpuPerfTest(EditorSingleTest):
# there is currently a huge discrepancy loading this level with vulkan compared to dx12 which requires the 10 min timeout
# this should be removed once that issue has been sorted out
timeout = 600
extra_cmdline_args = ['-rhi=vulkan']
use_null_renderer = False # needs renderer to validate test
from .tests import EditorLevelLoading_10KEntityCpuPerfTest as test_module
class Time_EditorLevelLoading_10kVegInstancesTest(EditorSingleTest):
extra_cmdline_args = ['-rhi=vulkan']
use_null_renderer = False # needs renderer to validate test
from .tests import EditorLevelLoading_10kVegInstancesTest as test_module

@ -0,0 +1,6 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""

@ -0,0 +1,15 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
from Performance.utils.perf_timer import time_editor_level_loading
def EditorLevelLoading_10KEntityCpuPerfTest():
time_editor_level_loading('Performance', '10KEntityCpuPerfTest')
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(EditorLevelLoading_10KEntityCpuPerfTest)

@ -0,0 +1,15 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
from Performance.utils.perf_timer import time_editor_level_loading
def EditorLevelLoading_10kVegInstancesTest():
time_editor_level_loading('Performance', '10kVegInstancesTest')
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(EditorLevelLoading_10kVegInstancesTest)

@ -0,0 +1,6 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""

@ -0,0 +1,6 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""

@ -0,0 +1,72 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import time
ENTER_MSG = ("Entered game mode", "Failed to enter game mode")
EXIT_MSG = ("Exited game mode", "Couldn't exit game mode")
class Timer:
unit_divisor = 60
hour_divisor = unit_divisor * unit_divisor
def start(self):
self._start_time = time.perf_counter()
def log_time(self, message):
from editor_python_test_tools.utils import Report
elapsed_time = time.perf_counter() - self._start_time
hours = int(elapsed_time / Timer.hour_divisor)
minutes = int(elapsed_time % Timer.hour_divisor / Timer.unit_divisor)
seconds = elapsed_time % Timer.unit_divisor
Report.info(f'{message}: {hours:0>2d}:{minutes:0>2d}:{seconds:0>5.2f}\n')
def time_editor_level_loading(level_dir, level_name):
"""
Summary:
Time how long it takes to load an arbitrary level, entering game mode, and exiting game mode
Level Description:
Preferably a level with a large number of entities
Expected Behavior:
Level loads within a reasonable time frame e.i. doesn't trip the framework timeout
Benchmark Steps:
1) Time opening the level
2) Time entering game mode
3) Time exiting game mode
4) Close the editor
:return: None
"""
from editor_python_test_tools.utils import TestHelper as helper
timer = Timer()
helper.init_idle()
# 1) Open level
timer.start()
helper.open_level(level_dir, level_name)
timer.log_time('Level load time')
# 2) Time how long it takes to enter game mode
timer.start()
helper.enter_game_mode(ENTER_MSG)
timer.log_time('Enter game mode')
# 3) Exit game mode
timer.start()
helper.exit_game_mode(EXIT_MSG)
timer.log_time('Exit game mode')
# 4) Close the editor
helper.close_editor()

@ -460,6 +460,33 @@
}
]
},
{
"Name": "DiffuseProbeGridVisualizationCompositePass",
"TemplateName": "DiffuseProbeGridVisualizationCompositePassTemplate",
"Connections": [
{
"LocalSlot": "VisualizationInput",
"AttachmentRef": {
"Pass": "OpaquePass",
"Attachment": "DiffuseProbeGridVisualization"
}
},
{
"LocalSlot": "Depth",
"AttachmentRef": {
"Pass": "DepthPrePass",
"Attachment": "Depth"
}
},
{
"LocalSlot": "ColorInputOutput",
"AttachmentRef": {
"Pass": "PostProcessPass",
"Attachment": "Output"
}
}
]
},
{
"Name": "AuxGeomPass",
"TemplateName": "AuxGeomPassTemplate",
@ -468,8 +495,8 @@
{
"LocalSlot": "ColorInputOutput",
"AttachmentRef": {
"Pass": "PostProcessPass",
"Attachment": "Output"
"Pass": "DiffuseProbeGridVisualizationCompositePass",
"Attachment": "ColorInputOutput"
}
},
{

@ -32,15 +32,6 @@
#include "Settings.h"
#include "CryEdit.h"
enum
{
// in milliseconds
GameModeIdleFrequency = 0,
EditorModeIdleFrequency = 1,
InactiveModeFrequency = 10,
UninitializedFrequency = 9999,
};
Q_LOGGING_CATEGORY(InputDebugging, "o3de.editor.input")
// internal, private namespace:
@ -234,18 +225,12 @@ namespace Editor
EditorQtApplication::EditorQtApplication(int& argc, char** argv)
: AzQtApplication(argc, argv)
, m_stylesheet(new AzQtComponents::O3DEStylesheet(this))
, m_idleTimer(new QTimer(this))
{
m_idleTimer->setInterval(UninitializedFrequency);
setWindowIcon(QIcon(":/Application/res/o3de_editor.ico"));
// set the default key store for our preferences:
setApplicationName("O3DE Editor");
connect(m_idleTimer, &QTimer::timeout, this, &EditorQtApplication::maybeProcessIdle);
connect(this, &QGuiApplication::applicationStateChanged, this, [this] { ResetIdleTimerInterval(PollState); });
installEventFilter(this);
// Disable our debugging input helpers by default
@ -324,6 +309,10 @@ namespace Editor
winapp->OnIdle(0);
}
}
if (m_applicationActive)
{
QTimer::singleShot(1, this, &EditorQtApplication::maybeProcessIdle);
}
}
void EditorQtApplication::InstallQtLogHandler()
@ -376,14 +365,6 @@ namespace Editor
case eNotify_OnQuit:
GetIEditor()->UnregisterNotifyListener(this);
break;
case eNotify_OnBeginGameMode:
// GetIEditor()->IsInGameMode() Isn't reliable when called from within the notification handler
ResetIdleTimerInterval(GameMode);
break;
case eNotify_OnEndGameMode:
ResetIdleTimerInterval(EditorMode);
break;
}
}
@ -456,55 +437,16 @@ namespace Editor
void EditorQtApplication::EnableOnIdle(bool enable)
{
m_applicationActive = enable;
if (enable)
{
if (m_idleTimer->interval() == UninitializedFrequency)
{
ResetIdleTimerInterval();
}
m_idleTimer->start();
}
else
{
m_idleTimer->stop();
QTimer::singleShot(0, this, &EditorQtApplication::maybeProcessIdle);
}
}
bool EditorQtApplication::OnIdleEnabled() const
{
if (m_idleTimer->interval() == UninitializedFrequency)
{
return false;
}
return m_idleTimer->isActive();
}
void EditorQtApplication::ResetIdleTimerInterval(TimerResetFlag flag)
{
bool isInGameMode = flag == GameMode;
if (flag == PollState)
{
isInGameMode = GetIEditor() ? GetIEditor()->IsInGameMode() : false;
}
// Game mode takes precedence over anything else
if (isInGameMode)
{
m_idleTimer->setInterval(GameModeIdleFrequency);
}
else
{
if (applicationState() & Qt::ApplicationActive)
{
m_idleTimer->setInterval(EditorModeIdleFrequency);
}
else
{
m_idleTimer->setInterval(InactiveModeFrequency);
}
}
return m_applicationActive;
}
bool EditorQtApplication::eventFilter(QObject* object, QEvent* event)

@ -102,13 +102,6 @@ namespace Editor
bool m_isMovingOrResizing = false;
private:
enum TimerResetFlag
{
PollState,
GameMode,
EditorMode
};
void ResetIdleTimerInterval(TimerResetFlag = PollState);
static QColor InterpolateColors(QColor a, QColor b, float factor);
void RefreshStyleSheet();
void InstallFilters();
@ -125,7 +118,6 @@ namespace Editor
QTranslator* m_editorTranslator = nullptr;
QTranslator* m_assetBrowserTranslator = nullptr;
QTimer* const m_idleTimer = nullptr;
AZ::UserSettingsProvider m_localUserSettings;
@ -133,5 +125,6 @@ namespace Editor
QSet<int> m_pressedKeys;
bool m_activatedLocalUserSettings = false;
bool m_applicationActive = false;
};
} // namespace editor

@ -135,7 +135,7 @@ namespace Editor
}
widget = widget->parentWidget();
}
return false;
return nullptr;
};
if (object == toolBarAt(QCursor::pos()))
{

@ -116,9 +116,6 @@ bool C3DConnexionDriver::GetInputMessageData(LPARAM lParam, S3DConnexionMessage&
{
if (event->header.dwType == RIM_TYPEHID)
{
static bool bGotTranslation = false,
bGotRotation = false;
static int all6DOFs[6] = {0};
LPRAWHID pRawHid = &event->data.hid;
// Translation or Rotation packet? They come in two different packets.

@ -42,8 +42,8 @@
#define HPPA_ASSERT_PRINT_STACK(...) _EXPAND(_GET_MACRO23(__VA_ARGS__, _HPPA_ASSERT_PRINT_STACK3, _HPPA_ASSERT_PRINT_STACK2)(__VA_ARGS__))
namespace AZ {
namespace AZ
{
/// default windows virtual page size \todo Read this from the OS when we create the allocator)
#define OS_VIRTUAL_PAGE_SIZE AZ_PAGE_SIZE
//////////////////////////////////////////////////////////////////////////
@ -57,6 +57,79 @@ namespace AZ {
// Enabled mutex per bucket
#define USE_MUTEX_PER_BUCKET
namespace HphaInternal
{
//! Rounds up a value to next power of 2.
//! For example to round 8388609((2^23) + 1) up to 16777216(2^24) the following occurs
//! Subtract one from the value in case it is already
//! equal to a power of 2
//! 8388609 - 1 = 8388608
//! Propagate the highest one bit in the value to all the lower bits
//! 8388608 = 0b100'0000'0000'0000'0000'0000 in binary
//!
//! 0b100'0000'0000'0000'0000'0000
//! |0b010'0000'0000'0000'0000'0000 (>> 1)
//! -------------------------------
//! 0b110'0000'0000'0000'0000'0000 (Now there are 2 consecutive 1-bits)
//! |0b001'1000'0000'0000'0000'0000 (>> 2)
//! -------------------------------
//! 0b111'1000'0000'0000'0000'0000 (Now there are 4 consecutive 1-bits)
//! |0b000'0111'1000'0000'0000'0000 (>> 4)
//! -------------------------------
//! 0b111'1111'1000'0000'0000'0000 (Now there are 8 consecutive 1-bits)
//! |0b000'0000'0111'1111'1000'0000 (>> 8)
//! -------------------------------
//! 0b111'1111'1111'1111'1000'0000 (Now there are 16 consecutive 1-bits)
//! |0b000'0000'0000'0000'0111'1111 (>> 16)
//! -------------------------------
//! 0b111'1111'1111'1111'1111'1111 (Now there are 23 consecutive 1-bits)
//! |0b000'0000'0000'0000'0000'0000 (>> 32)
//! -------------------------------
//! 0b111'1111'1111'1111'1111'1111
//! Finally since all the one bits are set in the value, adding one pushes it
//! to next power of 2
//! 0b1000'0000'0000'0000'0000'0000 = 16777216
static constexpr size_t AlignUpToPowerOfTwo(size_t value)
{
// If the value is <=2 it is already aligned
if (value <= 2)
{
return value;
}
// Subtract one to make any values already
// aligned to a power of 2 less than that power of 2
// so that algorithm doesn't push those values upwards
--value;
value |= value >> 0b1;
value |= value >> 0b10;
value |= value >> 0b100;
value |= value >> 0b1000;
value |= value >> 0b1'0000;
value |= value >> 0b10'0000;
++value;
return value;
}
static_assert(AlignUpToPowerOfTwo(0) == 0);
static_assert(AlignUpToPowerOfTwo(1) == 1);
static_assert(AlignUpToPowerOfTwo(2) == 2);
static_assert(AlignUpToPowerOfTwo(3) == 4);
static_assert(AlignUpToPowerOfTwo(4) == 4);
static_assert(AlignUpToPowerOfTwo(5) == 8);
static_assert(AlignUpToPowerOfTwo(8) == 8);
static_assert(AlignUpToPowerOfTwo(10) == 16);
static_assert(AlignUpToPowerOfTwo(16) == 16);
static_assert(AlignUpToPowerOfTwo(24) == 32);
static_assert(AlignUpToPowerOfTwo(32) == 32);
static_assert(AlignUpToPowerOfTwo(45) == 64);
static_assert(AlignUpToPowerOfTwo(64) == 64);
static_assert(AlignUpToPowerOfTwo(112) == 128);
static_assert(AlignUpToPowerOfTwo(128) == 128);
static_assert(AlignUpToPowerOfTwo(136) == 256);
static_assert(AlignUpToPowerOfTwo(256) == 256);
}
//////////////////////////////////////////////////////////////////////////
class HpAllocator
{
@ -211,24 +284,21 @@ namespace AZ {
bool check_marker(size_t marker) const { return mMarker == (marker ^ ((size_t)this)); }
};
using page_list = AZStd::intrusive_list<page, AZStd::list_base_hook<page>>;
class bucket
#if defined(MULTITHREADED) && defined(USE_MUTEX_PER_BUCKET)
static constexpr size_t BucketAlignment = HphaInternal::AlignUpToPowerOfTwo(sizeof(page_list) + sizeof(AZStd::mutex) + sizeof(size_t));
#else
static constexpr size_t BucketAlignment = HphaInternal::AlignUpToPowerOfTwo(sizeof(page_list) + sizeof(size_t));
#endif
AZ_PUSH_DISABLE_WARNING_MSVC(4324)
class alignas(BucketAlignment) bucket
{
page_list mPageList;
#ifdef MULTITHREADED
#if defined (USE_MUTEX_PER_BUCKET)
#if defined(MULTITHREADED) && defined(USE_MUTEX_PER_BUCKET)
mutable AZStd::mutex mLock;
#endif
#endif
size_t mMarker;
#ifdef MULTITHREADED
#if defined (USE_MUTEX_PER_BUCKET)
unsigned char _padding[sizeof(void*) * 16 - sizeof(page_list) - sizeof(AZStd::mutex) - sizeof(size_t)];
#else
unsigned char _padding[sizeof(void*) * 16 - sizeof(page_list) - sizeof(size_t)];
#endif
#else
unsigned char _padding[sizeof(void*) * 4 - sizeof(page_list) - sizeof(size_t)];
#endif
public:
bucket();
#ifdef MULTITHREADED
@ -249,6 +319,7 @@ namespace AZ {
void free(page* p, void* ptr);
void unlink(page* p);
};
AZ_POP_DISABLE_WARNING_MSVC
void* bucket_system_alloc();
void bucket_system_free(void* ptr);
page* bucket_grow(size_t elemSize, size_t marker);
@ -1033,8 +1104,6 @@ namespace AZ {
// Thats why we use SimpleLcgRandom here
AZ::SimpleLcgRandom randGenerator = AZ::SimpleLcgRandom(reinterpret_cast<u64>(static_cast<void*>(this)));
mMarker = size_t(randGenerator.Getu64Random());
(void)_padding;
}
HpAllocator::page* HpAllocator::bucket::get_free_page()
@ -2371,7 +2440,7 @@ namespace AZ {
m_capacity = desc.m_capacity;
}
AZ_Assert(sizeof(HpAllocator) <= sizeof(m_hpAllocatorBuffer), "Increase the m_hpAllocatorBuffer, we need %d bytes but we have %d bytes!", sizeof(HpAllocator), sizeof(m_hpAllocatorBuffer));
static_assert(sizeof(HpAllocator) <= sizeof(m_hpAllocatorBuffer), "Increase the m_hpAllocatorBuffer, it needs to be at least the sizeof(HpAllocator)");
m_allocator = new (&m_hpAllocatorBuffer) HpAllocator(m_desc);
}

@ -73,18 +73,20 @@ namespace AZ
void GarbageCollect() override;
private:
// [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758
// this must be at least the max size of HpAllocator (defined in the cpp) + any platform compiler padding
static const int hpAllocatorStructureSize = 16584;
// [LY][sconel@] end
// A static assert inside of HphaSchema.cpp validates that this is the case
// as of commit https://github.com/o3de/o3de/commit/92cd457c256e1ec91eeabe04b56d1d4c61f8b1af
// When MULTITHREADED and USE_MUTEX_PER_BUCKET is defined
// the largest sizeof for HpAllocator is 16640 on MacOS
// On Windows the sizeof HpAllocator is 8384
// Up this value to 18 KiB to be safe
static constexpr size_t hpAllocatorStructureSize = 18 * 1024;
Descriptor m_desc;
int m_pad; // pad the Descriptor to avoid C4355
size_type m_capacity; ///< Capacity in bytes.
HpAllocator* m_allocator;
// [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758
AZStd::aligned_storage<hpAllocatorStructureSize, 16>::type m_hpAllocatorBuffer; ///< Memory buffer for HpAllocator
// [LY][sconel@] end
AZStd::aligned_storage_t<hpAllocatorStructureSize, 16> m_hpAllocatorBuffer; ///< Memory buffer for HpAllocator
bool m_ownMemoryBlock;
};
} // namespace AZ

@ -140,7 +140,7 @@ namespace AZ {
SymRegisterCallback64_t g_SymRegisterCallback64;
HMODULE g_dbgHelpDll;
#define LOAD_FUNCTION(A) { g_##A = (A##_t)GetProcAddress(g_dbgHelpDll, #A); AZ_Assert(g_##A != 0, ("Can not load %s function!",#A)); }
#define LOAD_FUNCTION(A) { g_##A = (A##_t)GetProcAddress(g_dbgHelpDll, #A); AZ_Assert(g_##A != 0, "Can not load %s function!",#A); }
using namespace AZ::Debug;
@ -596,7 +596,7 @@ namespace AZ {
result = GetLastError();
}
ULONGLONG fileVersion = 0;
if (szImg != NULL)
if (szImg[0]) // !szImg.empty()
{
// try to retrieve the file-version:
VS_FIXEDFILEINFO* fInfo = NULL;
@ -624,43 +624,6 @@ namespace AZ {
}
}
// Retrive some additional-infos about the module
IMAGEHLP_MODULE64 Module;
const char* szSymType = "-unknown-";
if (GetModuleInfo(hProcess, baseAddr, &Module) != FALSE)
{
switch (Module.SymType)
{
case SymNone:
szSymType = "-nosymbols-";
break;
case SymCoff:
szSymType = "COFF";
break;
case SymCv:
szSymType = "CV";
break;
case SymPdb:
szSymType = "PDB";
break;
case SymExport:
szSymType = "-exported-";
break;
case SymDeferred:
szSymType = "-deferred-";
break;
case SymSym:
szSymType = "SYM";
break;
case 8: //SymVirtual:
szSymType = "Virtual";
break;
case 9: // SymDia:
szSymType = "DIA";
break;
}
}
// find insert position
if (g_moduleInfo.size() < g_moduleInfo.capacity())
{
@ -1073,7 +1036,7 @@ cleanup:
}
HANDLE hThread = nativeThread;
CONTEXT alignas(8) context; // Without this alignment the function randomly crashes in release.
alignas(alignof(CONTEXT)) CONTEXT context; // Without this alignment the function randomly crashes in release.
context.ContextFlags = CONTEXT_ALL;
GetThreadContext(hThread, &context);

@ -443,7 +443,7 @@ namespace UnitTest
: m_data(data) { /* expensive operations */ }
private:
int m_data;
[[maybe_unused]] int m_data;
};
//////////////////////////////////////////////////////////////////////////

@ -2539,7 +2539,7 @@ namespace Benchmark
{
AZStd::string test1{ "foo bar"};
AZStd::string test2{ "bar foo" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaPointerSizedSwaps(test1, test2);
}
@ -2549,7 +2549,7 @@ namespace Benchmark
{
AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" };
AZStd::string test2{ "The quick brown fox jumped over the lazy dog" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaPointerSizedSwaps(test1, test2);
}
@ -2559,7 +2559,7 @@ namespace Benchmark
{
AZStd::string test1{ "foo bar" };
AZStd::string test2{ "bar foo" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaMemcpy(test1, test2);
}
@ -2569,7 +2569,7 @@ namespace Benchmark
{
AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" };
AZStd::string test2{ "The quick brown fox jumped over the lazy dog" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaMemcpy(test1, test2);
}
@ -2586,7 +2586,7 @@ namespace Benchmark
AZStd::string sourceString(state.range(0), 'a');
const char* sourceAddress = sourceString.c_str();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceAddress);
@ -2602,7 +2602,7 @@ namespace Benchmark
const char* sourceAddress = sourceString.c_str();
const size_t sourceSize = sourceString.size();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceAddress, sourceSize);
@ -2618,7 +2618,7 @@ namespace Benchmark
auto sourceBegin = sourceString.begin();
auto sourceEnd = sourceString.end();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceBegin, sourceEnd);
@ -2633,7 +2633,7 @@ namespace Benchmark
AZStd::string sourceString(state.range(0), 'a');
AZStd::string_view sourceView(sourceString);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceView);
@ -2647,7 +2647,7 @@ namespace Benchmark
{
AZStd::string sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceString);
@ -2661,7 +2661,7 @@ namespace Benchmark
{
AZStd::string sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(AZStd::move(sourceString));
@ -2673,7 +2673,7 @@ namespace Benchmark
BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromSingleCharacter, AZStd::string)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(state.range(0), 'a');
@ -2691,7 +2691,7 @@ namespace Benchmark
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
const char* sourceAddress = sourceString.c_str();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceAddress);
@ -2707,7 +2707,7 @@ namespace Benchmark
const char* sourceAddress = sourceString.c_str();
const size_t sourceSize = sourceString.size();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceAddress, sourceSize);
@ -2723,7 +2723,7 @@ namespace Benchmark
auto sourceBegin = sourceString.begin();
auto sourceEnd = sourceString.end();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceBegin, sourceEnd);
@ -2738,7 +2738,7 @@ namespace Benchmark
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
AZStd::string_view sourceView(sourceString);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceView);
@ -2752,7 +2752,7 @@ namespace Benchmark
{
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceString);
@ -2766,7 +2766,7 @@ namespace Benchmark
{
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(AZStd::move(sourceString));
@ -2778,7 +2778,7 @@ namespace Benchmark
BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromSingleCharacter, AZStd::fixed_string<1024>)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(state.range(0), 'a');

@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::string payloadCopy = serializedPayload;
@ -53,7 +53,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::string payloadCopy = serializedPayload;
@ -77,7 +77,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::Dom::Json::WriteToRapidJsonDocument(
[&](AZ::Dom::Visitor& visitor)
@ -97,7 +97,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::Dom::Utils::WriteToValue(
[&](AZ::Dom::Visitor& visitor)
@ -117,7 +117,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::JsonSerializationUtils::ReadJsonString(serializedPayload);
@ -130,7 +130,7 @@ namespace AZ::Dom::Benchmark
BENCHMARK_DEFINE_F(DomJsonBenchmark, RapidjsonMakeComplexObject)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TakeAndDiscardWithoutTimingDtor(GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)), state);
}
@ -152,7 +152,7 @@ namespace AZ::Dom::Benchmark
document.GetAllocator());
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{
@ -168,7 +168,7 @@ namespace AZ::Dom::Benchmark
{
rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
rapidjson::Document copy;
copy.CopyFrom(original, copy.GetAllocator(), true);
@ -184,7 +184,7 @@ namespace AZ::Dom::Benchmark
{
rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
rapidjson::Document copy;
copy.CopyFrom(original, copy.GetAllocator(), true);

@ -78,7 +78,7 @@ namespace AZ::Dom::Benchmark
if (apply)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchResult = patchInfo.m_forwardPatches.Apply(m_before);
benchmark::DoNotOptimize(patchResult);
@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
}
else
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
benchmark::DoNotOptimize(patchInfo);

@ -20,7 +20,7 @@ namespace AZ::Dom::Benchmark
PathEntry end;
end.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p;
p /= entry1;
@ -40,7 +40,7 @@ namespace AZ::Dom::Benchmark
PathEntry end;
end.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p = Path() / entry1 / entry2 / 0 / end;
}
@ -55,7 +55,7 @@ namespace AZ::Dom::Benchmark
AZStd::string s;
s.resize_no_construct(p.GetStringLength());
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
p.GetStringLength();
p.FormatString(s.data(), s.size());
@ -69,7 +69,7 @@ namespace AZ::Dom::Benchmark
{
AZStd::string pathString = "/path/with/multiple/0/different/components/including-long-strings-like-this/65536/999/-";
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p(pathString);
benchmark::DoNotOptimize(p);
@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray;
endOfArray.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
name.IsEndOfArray();
index.IsEndOfArray();
@ -104,7 +104,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray;
endOfArray.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(name == name);
benchmark::DoNotOptimize(name == index);

@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark
Value doubleValue(4.0);
Value stringValue("foo", true);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
(intValue.GetType());
(boolValue.GetType());
@ -118,7 +118,7 @@ namespace AZ::Dom::Benchmark
value.GetInternalValue());
};
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
(getTypeViaVisit(intValue));
(getTypeViaVisit(boolValue));
@ -136,7 +136,7 @@ namespace AZ::Dom::Benchmark
BENCHMARK_DEFINE_F(DomValueBenchmark, AzDomValueMakeComplexObject)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TakeAndDiscardWithoutTimingDtor(GenerateDomBenchmarkPayload(state.range(0), state.range(1)), state);
}
@ -149,7 +149,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = original;
benchmark::DoNotOptimize(copy);
@ -163,7 +163,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = original;
copy["entries"]["Key0"].ArrayPushBack(Value(42));
@ -178,7 +178,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = Utils::DeepCopy(original);
TakeAndDiscardWithoutTimingDtor(AZStd::move(copy), state);
@ -199,7 +199,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZ::Name& key : keys)
{
@ -222,7 +222,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{
@ -245,7 +245,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{

@ -966,7 +966,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendFixedPath)(benchmark::State& state)
{
AZ::IO::FixedMaxPath m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@ -977,7 +977,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendAllocatingPath)(benchmark::State& state)
{
AZ::IO::Path m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@ -989,7 +989,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinFixedString)(benchmark::State& state)
{
AZStd::string m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@ -1000,7 +1000,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinAZStdString)(benchmark::State& state)
{
AZStd::string m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{

@ -1741,7 +1741,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1749,7 +1749,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1757,7 +1757,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1765,7 +1765,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1773,7 +1773,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1781,7 +1781,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1789,7 +1789,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1797,7 +1797,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1805,7 +1805,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1813,7 +1813,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(SMALL_NUMBER_OF_JOBS);
}
@ -1821,7 +1821,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(MEDIUM_NUMBER_OF_JOBS);
}
@ -1829,7 +1829,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(LARGE_NUMBER_OF_JOBS);
}
@ -1837,7 +1837,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1845,7 +1845,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1853,7 +1853,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1861,7 +1861,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1869,7 +1869,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1877,7 +1877,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1885,7 +1885,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1893,7 +1893,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1901,7 +1901,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@ -1909,7 +1909,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(SMALL_NUMBER_OF_JOBS);
}
@ -1917,7 +1917,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(MEDIUM_NUMBER_OF_JOBS);
}
@ -1925,7 +1925,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(LARGE_NUMBER_OF_JOBS);
}

@ -54,7 +54,7 @@ namespace Benchmark
{
// Runtime performance is not actually being measured by this test.
// This function only exist to calculate AZ::Crc32 values at compile time
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
[[maybe_unused]] constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values();
}

@ -63,7 +63,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathFrustum, SphereIntersect)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& data : m_dataArray)
{
@ -75,7 +75,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathFrustum, AabbIntersect)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& data : m_dataArray)
{

@ -68,7 +68,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -92,7 +92,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -108,7 +108,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -124,7 +124,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromRowMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromColumnMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -162,7 +162,7 @@ namespace Benchmark
{
float storeValues[9];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -176,7 +176,7 @@ namespace Benchmark
{
float storeValues[9];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -188,7 +188,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -200,7 +200,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -212,7 +212,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -224,7 +224,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -236,7 +236,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromMatrix4x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -248,7 +248,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -260,7 +260,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -272,7 +272,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -284,7 +284,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateCrossProduct)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -296,7 +296,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -308,7 +308,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -321,7 +321,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -336,7 +336,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -351,7 +351,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -363,7 +363,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -387,7 +387,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -399,7 +399,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -411,7 +411,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, TransposedMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -423,7 +423,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, MultiplyVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -435,7 +435,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorSum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -447,7 +447,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorDifference)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiplyScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -471,7 +471,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorDivideScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -483,7 +483,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -494,7 +494,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -506,7 +506,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, RetrieveScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -518,7 +518,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, ExtractScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -530,7 +530,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, MultiplyByScaleX2)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -542,7 +542,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetPolarDecomposition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -557,7 +557,7 @@ namespace Benchmark
AZ::Matrix3x3 orthogonalOut;
AZ::Matrix3x3 symmetricOut;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -568,7 +568,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -580,7 +580,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -592,7 +592,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -603,7 +603,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -615,7 +615,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -627,7 +627,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -639,7 +639,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetDeterminant)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -651,7 +651,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetAdjugate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{

@ -86,7 +86,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -98,7 +98,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -110,7 +110,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -122,7 +122,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromRowMajorFloat12)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -134,7 +134,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -146,7 +146,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat12)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -158,7 +158,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -170,7 +170,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat16)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -182,7 +182,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -194,7 +194,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -206,7 +206,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -230,7 +230,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternionAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -242,7 +242,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -254,7 +254,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3AndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -266,7 +266,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -278,7 +278,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -290,7 +290,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -302,7 +302,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateLookAt)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -316,7 +316,7 @@ namespace Benchmark
{
float testFloats[12];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -330,7 +330,7 @@ namespace Benchmark
{
float testFloats[12];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -344,7 +344,7 @@ namespace Benchmark
{
float testFloats[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -356,7 +356,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -368,7 +368,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -381,7 +381,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRow)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -393,7 +393,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRowAsVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -405,7 +405,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -418,7 +418,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector3AndFloat)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -431,7 +431,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -444,7 +444,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -472,7 +472,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetColumn)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -484,7 +484,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -497,7 +497,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -526,7 +526,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -539,7 +539,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -551,7 +551,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -564,7 +564,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -577,7 +577,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -589,7 +589,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -602,7 +602,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -615,7 +615,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -627,7 +627,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -640,7 +640,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -653,7 +653,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -665,7 +665,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -678,7 +678,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -691,7 +691,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -707,7 +707,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -720,7 +720,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -732,7 +732,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyEqualsMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -745,7 +745,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, TransformPointVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -757,7 +757,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, TransformVectorVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -769,7 +769,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Multiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -781,7 +781,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -793,7 +793,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -806,7 +806,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranspose3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -818,7 +818,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Transpose3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -831,7 +831,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -843,7 +843,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, InvertFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -856,7 +856,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -868,7 +868,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, InvertFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -881,7 +881,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, RetrieveScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -893,7 +893,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, ExtractScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -906,7 +906,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, MultiplyByScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -919,7 +919,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -931,7 +931,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -943,7 +943,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -956,7 +956,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsCloseExactAndDifferent)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -971,7 +971,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorEqualEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -983,7 +983,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorNotEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -995,7 +995,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1007,7 +1007,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1019,7 +1019,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1032,7 +1032,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1045,7 +1045,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRotationPartFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1058,7 +1058,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetDeterminant3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -1070,7 +1070,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{

@ -64,7 +64,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -76,7 +76,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -88,7 +88,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetRowX4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -106,7 +106,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -124,7 +124,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromRowMajorFloat16)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromColumnMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateProjection)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -172,7 +172,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateProjectionFov)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -184,7 +184,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateInterpolated)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -198,7 +198,7 @@ namespace Benchmark
{
float storeValues[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -212,7 +212,7 @@ namespace Benchmark
{
float storeValues[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -224,7 +224,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -236,7 +236,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -248,7 +248,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -260,7 +260,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -272,7 +272,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -284,7 +284,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -296,7 +296,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -308,7 +308,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -321,7 +321,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -353,7 +353,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -365,7 +365,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -377,7 +377,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -389,7 +389,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -401,7 +401,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -463,7 +463,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -475,7 +475,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -487,7 +487,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, TransposedMultiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -499,7 +499,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, Multiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -511,7 +511,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -524,7 +524,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -536,7 +536,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -552,7 +552,7 @@ namespace Benchmark
AZ::Matrix4x4 mat = AZ::Matrix4x4::CreateRotationX(1.0f);
mat.SetElement(0, 1, 23.1234f);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -564,7 +564,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -576,7 +576,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetRotationPartFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{

@ -47,7 +47,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, CreateFromPositionRotationAndHalfLengths)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -60,7 +60,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetPosition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -72,7 +72,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetPosition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -84,7 +84,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -96,7 +96,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -108,7 +108,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -120,7 +120,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -172,7 +172,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -184,7 +184,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -196,7 +196,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -208,7 +208,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -242,7 +242,7 @@ namespace Benchmark
AZ::Vector3 max(120.0f, 300.0f, 50.0f);
AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(min, max);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -256,7 +256,7 @@ namespace Benchmark
{
AZ::Transform transform = AZ::Transform::CreateRotationY(AZ::DegToRad(90.0f));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -268,7 +268,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, Equal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@ -280,7 +280,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{

@ -73,7 +73,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, CreateFromNormalAndDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -85,7 +85,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -97,7 +97,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetNormal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -109,7 +109,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, CreateFromNormalAndPoint)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -128,7 +128,7 @@ namespace Benchmark
coeff.push_back(unif(rng));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -148,7 +148,7 @@ namespace Benchmark
coeff.push_back(unif(rng));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -179,7 +179,7 @@ namespace Benchmark
vecs.push_back(AZ::Vector4(unif(rng), unif(rng), unif(rng), unif(rng)));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -192,7 +192,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetNormal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -205,7 +205,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetPlaneEquationCoefficients)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -236,7 +236,7 @@ namespace Benchmark
trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng))));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -254,7 +254,7 @@ namespace Benchmark
trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng))));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -265,7 +265,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetPointDist)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -277,7 +277,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -291,7 +291,7 @@ namespace Benchmark
{
AZ::Vector3 rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -305,7 +305,7 @@ namespace Benchmark
{
float rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@ -319,7 +319,7 @@ namespace Benchmark
{
AZ::Vector3 rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters - 1; ++i)
{
@ -333,7 +333,7 @@ namespace Benchmark
{
float rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters - 1; ++i)
{
@ -345,7 +345,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{

@ -68,7 +68,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SplatFloatConstruction)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NonNormalized4FloatsConstruction)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -92,7 +92,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateFromIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -104,7 +104,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -116,7 +116,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -128,7 +128,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -140,7 +140,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -155,7 +155,7 @@ namespace Benchmark
const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized();
const AZ::Vector3 vec2 = AZ::Vector3(-2.0f, 7.0f, -1.0f).GetNormalized();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -170,7 +170,7 @@ namespace Benchmark
const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized();
const AZ::Vector3 vec2 = AZ::Vector3(-1.0f, -2.0f, -3.0f).GetNormalized();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -182,7 +182,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -194,7 +194,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -206,7 +206,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetW)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -230,7 +230,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -243,7 +243,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -256,7 +256,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -269,7 +269,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetW)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -282,7 +282,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetSplat)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -295,7 +295,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetAll)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -310,7 +310,7 @@ namespace Benchmark
{
AZ::Vector3 vec(5.0f, 6.0f, 7.0f);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -324,7 +324,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetArray)(benchmark::State& state)
{
const float quatArray[4] = { 5.0f, 6.0f, 7.0f, 8.0f };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetElements)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -353,7 +353,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -374,7 +374,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetConjugate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -386,7 +386,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -398,7 +398,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -410,7 +410,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -422,7 +422,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -434,7 +434,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -446,7 +446,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -458,7 +458,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -470,7 +470,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -482,7 +482,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -494,7 +494,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -506,7 +506,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -518,7 +518,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -530,7 +530,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NLerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -542,7 +542,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -554,7 +554,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorEquality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -566,7 +566,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorInequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -578,7 +578,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorNegate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -590,7 +590,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorSum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -602,7 +602,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorSub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -614,7 +614,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -626,7 +626,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorMultiplyScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -638,7 +638,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, TransformVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -653,7 +653,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, IsClose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -665,7 +665,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, IsIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -677,7 +677,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -689,7 +689,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -701,7 +701,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -715,7 +715,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -729,7 +729,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, ConvertToAxisAngle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@ -744,7 +744,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, AggregateMultiply)(::benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 position = AZ::Vector3::CreateZero();
for (auto& quatData : m_quatDataArray)

@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumPoint)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -103,7 +103,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumSphere)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -120,7 +120,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumSphere)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -137,7 +137,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumAabb)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -154,7 +154,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumAabb)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{

@ -78,7 +78,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@ -90,7 +90,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -102,7 +102,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -114,7 +114,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -126,7 +126,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -138,7 +138,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromQuaternionAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -150,7 +150,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -162,7 +162,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3AndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateLookAt)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -223,7 +223,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasis)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -235,7 +235,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -247,7 +247,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -259,7 +259,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -271,7 +271,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -287,7 +287,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -299,7 +299,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetTranslationWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -312,7 +312,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetTranslationWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -325,7 +325,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetRotation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetRotation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -350,7 +350,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -362,7 +362,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, ExtractUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -388,7 +388,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorMultiplyTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -400,7 +400,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorMultiplyEqualsTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -413,7 +413,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformPointVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -425,7 +425,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformPointVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -437,7 +437,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -449,7 +449,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetInverse)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -461,7 +461,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, Invert)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -511,7 +511,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsCloseExactAndDifferent)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -526,7 +526,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorEqualEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -538,7 +538,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorNotEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -550,7 +550,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -562,7 +562,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -574,7 +574,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -587,7 +587,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@ -600,7 +600,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{

@ -58,7 +58,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector2 v1, v2;
float x = 0.0f, y = 0.0f;
@ -84,7 +84,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector2 v1, v2;
float x = 0.0f, y = 0.0f;
@ -111,7 +111,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -123,7 +123,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -135,7 +135,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -147,7 +147,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -159,7 +159,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -171,7 +171,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -183,7 +183,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -195,7 +195,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -207,7 +207,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -219,7 +219,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -231,7 +231,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -243,7 +243,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -267,7 +267,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -291,7 +291,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -315,7 +315,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -327,7 +327,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -339,7 +339,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -351,7 +351,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -363,7 +363,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -387,7 +387,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -399,7 +399,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -411,7 +411,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -423,7 +423,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -435,7 +435,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -447,7 +447,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -471,7 +471,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -483,7 +483,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -495,7 +495,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -507,7 +507,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -521,7 +521,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -533,7 +533,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -545,7 +545,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAtan2)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -557,7 +557,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -569,7 +569,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -581,7 +581,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -593,7 +593,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -605,7 +605,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -617,7 +617,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -629,7 +629,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{

@ -58,7 +58,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 v1, v2, v3;
float x = 0.0f, y = 0.0f, z = 0.0f;
@ -98,7 +98,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 v1, v2, v3;
float x = 0.0f, y = 0.0f, z = 0.0f;
@ -138,7 +138,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -150,7 +150,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -162,7 +162,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -234,7 +234,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -246,7 +246,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -258,7 +258,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -270,7 +270,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -294,7 +294,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -318,7 +318,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -342,7 +342,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -354,7 +354,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Cross)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -366,7 +366,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -378,7 +378,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -390,7 +390,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -402,7 +402,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -462,7 +462,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -522,7 +522,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -534,7 +534,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -546,7 +546,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -560,7 +560,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -572,7 +572,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -584,7 +584,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -596,7 +596,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -608,7 +608,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -620,7 +620,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -632,7 +632,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -644,7 +644,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -656,7 +656,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsPerpendicular)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -668,7 +668,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetOrthogonalVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -680,7 +680,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{

@ -60,7 +60,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector4 v1, v2, v3, v4;
float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
@ -117,7 +117,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector4 v1, v2, v3, v4;
float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -234,7 +234,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -246,7 +246,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -258,7 +258,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -270,7 +270,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -282,7 +282,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -294,7 +294,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -306,7 +306,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -330,7 +330,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -354,7 +354,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -378,7 +378,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -390,7 +390,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Dot3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -402,7 +402,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetHomogenized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -462,7 +462,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -522,7 +522,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -534,7 +534,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -546,7 +546,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -558,7 +558,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -570,7 +570,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -582,7 +582,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -594,7 +594,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -608,7 +608,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -620,7 +620,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -632,7 +632,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -644,7 +644,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -656,7 +656,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -668,7 +668,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -680,7 +680,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@ -692,7 +692,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{

@ -141,7 +141,6 @@ namespace UnitTest
////////////////////////////////////////////////////////////////////////
// Create some threads and simulate concurrent allocation and deallocation
AZStd::chrono::system_clock::time_point startTime = AZStd::chrono::system_clock::now();
{
AZStd::thread m_threads[m_maxNumThreads];
for (unsigned int i = 0; i < m_maxNumThreads; ++i)
@ -156,8 +155,6 @@ namespace UnitTest
m_threads[i].join();
}
}
//AZStd::chrono::microseconds exTime = AZStd::chrono::system_clock::now() - startTime;
//AZ_Printf("UnitTest::SystemAllocatorTest::deafult","Time: %d Ms\n",exTime.count());
//////////////////////////////////////////////////////////////////////////
AllocatorInstance<SystemAllocator>::Destroy();

@ -288,7 +288,7 @@ namespace Benchmark
public:
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -335,7 +335,7 @@ namespace Benchmark
public:
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::vector<void*>& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index);
@ -424,7 +424,7 @@ namespace Benchmark
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();

@ -981,7 +981,7 @@ namespace AZ::IO
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [numChunks, &numCallbacks, &waitForReads](FileRequestHandle request)
auto callback = [&numCallbacks, &waitForReads](FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
IStreamer* streamer = Interface<IStreamer>::Get();
@ -1052,7 +1052,7 @@ namespace AZ::IO
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [numChunks, &waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request)
auto callback = [&waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
numReadCallbacks++;
@ -1076,7 +1076,7 @@ namespace AZ::IO
cancels.push_back(m_streamer->Cancel(requests[numChunks - i - 1]));
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [&numCancelCallbacks, &waitForCancels, numChunks](FileRequestHandle request)
auto callback = [&numCancelCallbacks, &waitForCancels](FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
auto result = Interface<IStreamer>::Get()->GetRequestStatus(request);
@ -1248,7 +1248,7 @@ namespace Benchmark
AZStd::unique_ptr<char[]> buffer(new char[FileSize]);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::binary_semaphore waitForReads;
AZStd::atomic<system_clock::time_point> end;

@ -677,7 +677,7 @@ namespace Benchmark
[]
{
});
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);
@ -699,7 +699,7 @@ namespace Benchmark
});
a.Precedes(b);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);
@ -729,7 +729,7 @@ namespace Benchmark
e.Follows(a, b, c, d);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);

@ -374,8 +374,6 @@ namespace AzFramework
// is double-quoted, then the double-quotes must be escaped properly otherwise
// it will be absorbed by the native argument parser and possibly evaluated as
// multiple values for arguments
AZStd::string_view escapedDoubleQuote = R"("\")";
AZStd::vector<AZStd::string> preprocessedCommandArray;
for (const auto& commandArg : commandLineArray)

@ -142,7 +142,7 @@ namespace Benchmark
BENCHMARK_F(BM_Octree, InsertDelete1000)(benchmark::State& state)
{
constexpr uint32_t EntryCount = 1000;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
InsertEntries(EntryCount);
RemoveEntries(EntryCount);
@ -152,7 +152,7 @@ namespace Benchmark
BENCHMARK_F(BM_Octree, InsertDelete10000)(benchmark::State& state)
{
constexpr uint32_t EntryCount = 10000;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
InsertEntries(EntryCount);
RemoveEntries(EntryCount);
@ -162,7 +162,7 @@ namespace Benchmark
BENCHMARK_F(BM_Octree, InsertDelete100000)(benchmark::State& state)
{
constexpr uint32_t EntryCount = 100000;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
InsertEntries(EntryCount);
RemoveEntries(EntryCount);
@ -172,7 +172,7 @@ namespace Benchmark
BENCHMARK_F(BM_Octree, InsertDelete1000000)(benchmark::State& state)
{
constexpr uint32_t EntryCount = 1000000;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
InsertEntries(EntryCount);
RemoveEntries(EntryCount);
@ -183,7 +183,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -197,7 +197,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 10000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -211,7 +211,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 100000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -225,7 +225,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -239,7 +239,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -253,7 +253,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 10000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -267,7 +267,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 100000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -281,7 +281,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -295,7 +295,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -309,7 +309,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 10000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -323,7 +323,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 100000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{
@ -337,7 +337,7 @@ namespace Benchmark
{
constexpr uint32_t EntryCount = 1000000;
InsertEntries(EntryCount);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& queryData : m_queryDataArray)
{

@ -276,7 +276,6 @@ namespace AzQtComponents
*/
void FancyDocking::updateDockingGeometry()
{
QRect totalScreenRect;
int numScreens = QApplication::screens().count();
#ifdef AZ_PLATFORM_WINDOWS
@ -286,6 +285,9 @@ namespace AzQtComponents
m_perScreenFullScreenWidgets.clear();
#endif
#if !defined(AZ_PLATFORM_WINDOWS)
QRect totalScreenRect;
#endif
for (int i = 0; i < numScreens; ++i)
{
#ifdef AZ_PLATFORM_WINDOWS

@ -52,7 +52,6 @@ namespace AZ
GemTestEnvironment::GemTestEnvironment()
{
m_parameters = new Parameters;
}
void GemTestEnvironment::AddDynamicModulePaths(const AZStd::vector<AZStd::string>& dynamicModulePaths)
@ -84,6 +83,8 @@ namespace AZ
AZ::AllocatorInstance<AZ::SystemAllocator>::Create();
m_parameters = new Parameters;
AddGemsAndComponents();
PreCreateApplication();

@ -8,14 +8,13 @@
#pragma once
#include <AzCore/Component/EntityId.h>
#include <AzCore/Interface/Interface.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
/*!
* EditorEntityAPI
* Handles basic Entity operations

@ -8,20 +8,19 @@
#pragma once
#include <AzCore/base.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Component/ComponentBus.h>
#include <AzCore/Component/Entity.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
class EntityCompositionNotifications
: public AZ::EBusTraits
{
public:
/*!
* Notification that the specified entities are about to have their composition changed due to user interaction in the editor
*

@ -8,40 +8,40 @@
#pragma once
#include <AzCore/base.h>
#include <AzCore/Component/ComponentBus.h>
#include <AzCore/Component/Entity.h>
#include <AzCore/Debug/Budget.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/Math/Aabb.h>
#include <AzCore/Math/Uuid.h>
#include <AzCore/Component/Entity.h>
#include <AzCore/Component/EntityId.h>
#include <AzCore/Component/ComponentBus.h>
#include <AzCore/Outcome/Outcome.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/Slice/SliceComponent.h>
#include <AzCore/Outcome/Outcome.h>
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
#include <AzToolsFramework/SourceControl/SourceControlAPI.h>
#include <AzFramework/Entity/EntityContextBus.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/SourceControl/SourceControlAPI.h>
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
namespace AZ
{
class Entity;
class Vector2;
class Entity;
}
} // namespace AZ
class QMenu;
class QWidget;
struct IEditor;
class QApplication;
class QDockWidget;
class QMainWindow;
struct IEditor;
class QMenu;
class QWidget;
namespace AzToolsFramework
{
struct ViewPaneOptions;
class PreemptiveUndoCache;
class EntityPropertyEditor;
class PreemptiveUndoCache;
namespace UndoSystem
{
@ -54,10 +54,7 @@ namespace AzToolsFramework
class AssetSelectionModel;
}
using EntityIdList = AZStd::vector<AZ::EntityId>;
using EntityList = AZStd::vector<AZ::Entity*>;
using ClassDataList = AZStd::vector<const AZ::SerializeContext::ClassData*>;
using EntityIdSet = AZStd::unordered_set<AZ::EntityId>;
//! Return true to accept this type of component.
using ComponentFilter = AZStd::function<bool(const AZ::SerializeContext::ClassData&)>;

@ -10,10 +10,10 @@
#include <AzCore/EBus/EBus.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
//! Notifications about entity transform changes from the editor.
class EditorTransformChangeNotifications : public AZ::EBusTraits
{

@ -0,0 +1,20 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/Component/Entity.h>
#include <AzCore/Component/EntityId.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
using EntityIdSet = AZStd::unordered_set<AZ::EntityId>;
using EntityList = AZStd::vector<AZ::Entity*>;
} // namespace AZ

@ -12,6 +12,7 @@
#include <AzFramework/Entity/SliceEntityOwnershipServiceBus.h>
#include <AzFramework/Slice/SliceEntityBus.h>
#include <AzFramework/Spawnable/SpawnableEntitiesContainer.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h>
#include <AzToolsFramework/Entity/SliceEditorEntityOwnershipServiceBus.h>
#include <AzToolsFramework/Prefab/Spawnable/InMemorySpawnableAssetContainer.h>
@ -97,7 +98,6 @@ namespace AzToolsFramework
, private AzFramework::SliceEntityRequestBus::MultiHandler
{
public:
using EntityList = AzFramework::EntityList;
using OnEntitiesAddedCallback = AzFramework::OnEntitiesAddedCallback;
using OnEntitiesRemovedCallback = AzFramework::OnEntitiesRemovedCallback;
using ValidateEntitiesCallback = AzFramework::ValidateEntitiesCallback;

@ -9,13 +9,13 @@
#pragma once
#include <AzFramework/Entity/SliceEntityOwnershipService.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Entity/SliceEditorEntityOwnershipServiceBus.h>
#include <QString>
namespace AzToolsFramework
{
using EntityIdSet = AZStd::unordered_set<AZ::EntityId>;
using EntityIdToEntityIdMap = AZStd::unordered_map<AZ::EntityId, AZ::EntityId>;
class SliceEditorEntityOwnershipService

@ -8,10 +8,11 @@
#pragma once
#include <AzCore/EBus/EBus.h>
#include <AzCore/Asset/AssetCommon.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/Slice/SliceComponent.h>
#include <AzFramework/Slice/SliceInstantiationTicket.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AZ
{
@ -20,9 +21,6 @@ namespace AZ
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
using EntityList = AZStd::vector<AZ::Entity*>;
/**
* Indicates how an entity was removed from its slice instance, so the said entity can be restored properly.
*/

@ -8,17 +8,17 @@
#pragma once
#include <AzCore/Component/Entity.h>
#include <AzCore/Component/EntityId.h>
#include <AzCore/Interface/Interface.h>
#include <AzCore/Component/Entity.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzFramework/Entity/EntityContextBus.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
//! FocusModeInterface
//! Interface to handle the Editor Focus Mode.
class FocusModeInterface

@ -18,6 +18,7 @@
#include <AzCore/std/optional.h>
#include <AzCore/std/smart_ptr/unique_ptr.h>
#include <AzCore/std/string/string.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/PrefabIdTypes.h>
namespace AZ
@ -62,7 +63,6 @@ namespace AzToolsFramework
using AliasToInstanceMap = AZStd::unordered_map<InstanceAlias, AZStd::unique_ptr<Instance>>;
using AliasToEntityMap = AZStd::unordered_map<EntityAlias, AZStd::unique_ptr<AZ::Entity>>;
using EntityList = AZStd::vector<AZ::Entity*>;
Instance();
explicit Instance(AZStd::unique_ptr<AZ::Entity> containerEntity);

@ -12,7 +12,7 @@ namespace AzToolsFramework
{
namespace Prefab
{
InstanceEntityScrubber::InstanceEntityScrubber(Instance::EntityList& entities)
InstanceEntityScrubber::InstanceEntityScrubber(EntityList& entities)
: m_entities(entities)
{}

@ -10,6 +10,7 @@
#include <AzCore/RTTI/RTTI.h>
#include <AzCore/std/containers/vector.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/Instance/Instance.h>
namespace AZ
@ -19,8 +20,6 @@ namespace AZ
namespace AzToolsFramework
{
using EntityList = AZStd::vector<AZ::Entity*>;
namespace Prefab
{
//! Collects the entities added during deserialization
@ -29,12 +28,12 @@ namespace AzToolsFramework
public:
AZ_TYPE_INFO(InstanceEntityScrubber, "{0BC12562-C240-48AD-89C6-EDF572C9B485}");
explicit InstanceEntityScrubber(Instance::EntityList& entities);
explicit InstanceEntityScrubber(EntityList& entities);
void AddEntitiesToScrub(const EntityList& entities);
private:
Instance::EntityList& m_entities;
EntityList& m_entities;
};
}
}

@ -154,7 +154,7 @@ namespace AzToolsFramework
continue;
}
Instance::EntityList newEntities;
EntityList newEntities;
// Climb up to the root of the instance hierarchy from this instance
InstanceOptionalConstReference rootInstance = *instanceToUpdate;

@ -284,7 +284,7 @@ namespace AzToolsFramework
}
bool LoadInstanceFromPrefabDom(
Instance& instance, Instance::EntityList& newlyAddedEntities, const PrefabDom& prefabDom, LoadFlags flags)
Instance& instance, EntityList& newlyAddedEntities, const PrefabDom& prefabDom, LoadFlags flags)
{
// When entities are rebuilt they are first destroyed. As a result any assets they were exclusively holding on to will
// be released and reloaded once the entities are built up again. By suspending asset release temporarily the asset reload

@ -133,7 +133,7 @@ namespace AzToolsFramework
* @return bool on whether the operation succeeded.
*/
bool LoadInstanceFromPrefabDom(
Instance& instance, Instance::EntityList& newlyAddedEntities, const PrefabDom& prefabDom,
Instance& instance, EntityList& newlyAddedEntities, const PrefabDom& prefabDom,
LoadFlags flags = LoadFlags::None);
inline PrefabDomPath GetPrefabDomInstancePath(const char* instanceName)

@ -12,6 +12,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/std/string/string_view.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/Instance/Instance.h>
#include <AzToolsFramework/Prefab/PrefabFocusHandler.h>
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
@ -22,8 +23,6 @@ class QString;
namespace AzToolsFramework
{
using EntityList = AZStd::vector<AZ::Entity*>;
namespace Prefab
{
class Instance;

@ -13,10 +13,10 @@
#include <AzCore/Math/Vector3.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
namespace UndoSystem
{
class URSequencePoint;

@ -9,7 +9,6 @@
#pragma once
#include <AzCore/Asset/AssetCommon.h>
#include <AzCore/Component/EntityId.h>
#include <AzCore/EBus/EBus.h>
#include <AzCore/IO/Path/Path.h>
#include <AzCore/Math/Vector3.h>
@ -18,10 +17,10 @@
#include <AzCore/std/string/string.h>
#include <AzCore/std/string/string_view.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
namespace AzToolsFramework
{
using EntityIdList = AZStd::vector<AZ::EntityId>;
namespace Prefab
{
using CreatePrefabResult = AZ::Outcome<AZ::EntityId, AZStd::string>;

@ -319,7 +319,7 @@ namespace AzToolsFramework
}
auto newInstance = AZStd::make_unique<Instance>(parent);
Instance::EntityList newEntities;
EntityList newEntities;
if (!PrefabDomUtils::LoadInstanceFromPrefabDom(*newInstance, newEntities, instantiatingTemplate->get().GetPrefabDom()))
{
AZ_Error("Prefab", false,

@ -15,6 +15,7 @@
#include <AzCore/std/containers/unordered_set.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/std/string/string.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/Instance/Instance.h>
#include <AzToolsFramework/Prefab/Instance/InstanceEntityMapper.h>
#include <AzToolsFramework/Prefab/Instance/InstanceUpdateExecutor.h>
@ -36,8 +37,6 @@ namespace AZ
namespace AzToolsFramework
{
using EntityList = AZStd::vector<AZ::Entity*>;
namespace Prefab
{
using InstanceList = AZStd::vector<AzToolsFramework::Prefab::Instance*>;

@ -10,6 +10,7 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Outcome/Outcome.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/Instance/Instance.h>
#include <AzToolsFramework/Prefab/Spawnable/ComponentRequirementsValidator.h>
#include <AzToolsFramework/Prefab/Spawnable/EditorOnlyEntityHandler/EditorOnlyEntityHandler.h>
@ -50,7 +51,6 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils
static void Reflect(AZ::ReflectContext* context);
protected:
using EntityList = AZStd::vector<AZ::Entity*>;
static void GetEntitiesFromInstance(AzToolsFramework::Prefab::Instance& instance, EntityList& hierarchyEntities);
static bool ReadComponentAttribute(

@ -9,23 +9,18 @@
#pragma once
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/UserSettings/UserSettings.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserSourceDropBus.h>
#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
#include <AzToolsFramework/Prefab/PrefabSystemComponentInterface.h>
#include <AzToolsFramework/UI/Prefab/LevelRootUiHandler.h>
#include <AzToolsFramework/UI/Prefab/PrefabIntegrationBus.h>
#include <AzToolsFramework/UI/Prefab/PrefabIntegrationInterface.h>
#include <AzToolsFramework/UI/Prefab/PrefabSaveLoadHandler.h>
#include <AzToolsFramework/UI/Prefab/PrefabUiHandler.h>
#include <AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h>
#include <AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h>
#include <AzQtComponents/Components/Widgets/Card.h>
namespace AzToolsFramework
{
class ContainerEntityInterface;
@ -35,30 +30,13 @@ namespace AzToolsFramework
{
class PrefabFocusPublicInterface;
class PrefabLoaderInterface;
//! Structure for saving/retrieving user settings related to prefab workflows.
class PrefabUserSettings
: public AZ::UserSettings
{
public:
AZ_CLASS_ALLOCATOR(PrefabUserSettings, AZ::SystemAllocator, 0);
AZ_RTTI(PrefabUserSettings, "{E17A6128-E2C3-4501-B1AD-B8BB0D315602}", AZ::UserSettings);
AZStd::string m_saveLocation;
bool m_autoNumber = false; //!< Should the name of the prefab file be automatically numbered. e.g PrefabName_001.prefab vs PrefabName.prefab.
PrefabUserSettings() = default;
static void Reflect(AZ::ReflectContext* context);
};
class PrefabPublicInterface;
class PrefabIntegrationManager final
: public EditorContextMenuBus::Handler
, public EditorEventsBus::Handler
, public AssetBrowser::AssetBrowserSourceDropBus::Handler
, public PrefabInstanceContainerNotificationBus::Handler
, public PrefabIntegrationInterface
, public QObject
, private EditorEntityContextNotificationBus::Handler
{
public:
@ -77,9 +55,6 @@ namespace AzToolsFramework
// EditorEventsBus overrides ...
void OnEscape() override;
// EntityOutlinerSourceDropHandlingBus overrides ...
void HandleSourceFileType(AZStd::string_view sourceFilePath, AZ::EntityId parentId, AZ::Vector3 position) const override;
// EditorEntityContextNotificationBus overrides ...
void OnStartPlayInEditorBegin() override;
void OnStopPlayInEditor() override;
@ -94,6 +69,9 @@ namespace AzToolsFramework
void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference) override;
private:
// Handles the UI for prefab save operations.
PrefabSaveHandler m_prefabSaveHandler;
// Used to handle the UI for the level root.
LevelRootUiHandler m_levelRootUiHandler;
@ -120,27 +98,6 @@ namespace AzToolsFramework
void InitializeShortcuts();
void UninitializeShortcuts();
// Prompt and resolve dialogs
static bool QueryUserForPrefabSaveLocation(
const AZStd::string& suggestedName, const char* initialTargetDirectory, AZ::u32 prefabUserSettingsId, QWidget* activeWindow,
AZStd::string& outPrefabName, AZStd::string& outPrefabFilePath);
static bool QueryUserForPrefabFilePath(AZStd::string& outPrefabFilePath);
static bool QueryUserForProceduralPrefabAsset(AZStd::string& outPrefabAssetPath);
static void WarnUserOfError(AZStd::string_view title, AZStd::string_view message);
// Path and filename generation
static void GenerateSuggestedFilenameFromEntities(const EntityIdList& entities, AZStd::string& outName);
static bool AppendEntityToSuggestedFilename(AZStd::string& filename, AZ::EntityId entityId);
enum class PrefabSaveResult
{
Continue,
Retry,
Cancel
};
static PrefabSaveResult IsPrefabPathValidForAssets(QWidget* activeWindow, QString prefabPath, AZStd::string& retrySavePath);
static void GenerateSuggestedPrefabPath(const AZStd::string& prefabName, const AZStd::string& targetDirectory, AZStd::string& suggestedFullPath);
// Reference detection
static void GatherAllReferencedEntitiesAndCompare(const EntityIdSet& entities, EntityIdSet& entitiesAndReferencedEntities,
bool& hasExternalReferences);
@ -148,20 +105,10 @@ namespace AzToolsFramework
static bool QueryAndPruneMissingExternalReferences(EntityIdSet& entities, EntityIdSet& selectedAndReferencedEntities,
bool& useReferencedEntities, bool defaultMoveExternalRefs = false);
// Settings management
static void SetPrefabSaveLocation(const AZStd::string& path, AZ::u32 settingsId);
static bool GetPrefabSaveLocation(AZStd::string& path, AZ::u32 settingsId);
static AZ::u32 GetSliceFlags(const AZ::Edit::ElementData* editData, const AZ::Edit::ClassData* classData);
AZStd::shared_ptr<QDialog> ConstructClosePrefabDialog(TemplateId templateId);
AZStd::unique_ptr<AzQtComponents::Card> ConstructUnsavedPrefabsCard(TemplateId templateId);
AZStd::unique_ptr<QDialog> ConstructSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference);
void SavePrefabsInDialog(QDialog* unsavedPrefabsDialog);
AZStd::vector<AZStd::unique_ptr<QAction>> m_actions;
static const AZStd::string s_prefabFileExtension;
static AzFramework::EntityContextId s_editorEntityContextId;
static ContainerEntityInterface* s_containerEntityInterface;
@ -169,7 +116,6 @@ namespace AzToolsFramework
static PrefabFocusPublicInterface* s_prefabFocusPublicInterface;
static PrefabLoaderInterface* s_prefabLoaderInterface;
static PrefabPublicInterface* s_prefabPublicInterface;
static PrefabSystemComponentInterface* s_prefabSystemComponentInterface;
ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr;
};

@ -0,0 +1,722 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzToolsFramework/UI/Prefab/PrefabSaveLoadHandler.h>
#include <AzCore/IO/FileIO.h>
#include <AzCore/std/smart_ptr/make_shared.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
#include <AzToolsFramework/AssetBrowser/Entries/SourceAssetBrowserEntry.h>
#include <AzToolsFramework/Prefab/PrefabLoaderInterface.h>
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
#include <AzToolsFramework/Prefab/PrefabSystemComponentInterface.h>
#include <AzToolsFramework/Prefab/Procedural/ProceduralPrefabAsset.h>
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
#include <AzQtComponents/Components/FlowLayout.h>
#include <AzQtComponents/Components/StyleManager.h>
#include <AzQtComponents/Components/Widgets/CardHeader.h>
#include <AzQtComponents/Components/Widgets/CheckBox.h>
#include <QCheckBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QFileInfo>
#include <QFrame>
#include <QHBoxLayout>
#include <QLabel>
#include <QMessageBox>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QWidget>
namespace AzToolsFramework
{
namespace Prefab
{
PrefabLoaderInterface* PrefabSaveHandler::s_prefabLoaderInterface = nullptr;
PrefabPublicInterface* PrefabSaveHandler::s_prefabPublicInterface = nullptr;
PrefabSystemComponentInterface* PrefabSaveHandler::s_prefabSystemComponentInterface = nullptr;
const AZStd::string PrefabSaveHandler::s_prefabFileExtension = ".prefab";
static const char* const ClosePrefabDialog = "ClosePrefabDialog";
static const char* const FooterSeparatorLine = "FooterSeparatorLine";
static const char* const PrefabSavedMessageFrame = "PrefabSavedMessageFrame";
static const char* const PrefabSavePreferenceHint = "PrefabSavePreferenceHint";
static const char* const PrefabSaveWarningFrame = "PrefabSaveWarningFrame";
static const char* const SaveDependentPrefabsCard = "SaveDependentPrefabsCard";
static const char* const SavePrefabDialog = "SavePrefabDialog";
static const char* const UnsavedPrefabFileName = "UnsavedPrefabFileName";
void PrefabUserSettings::Reflect(AZ::ReflectContext* context)
{
AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context);
if (serializeContext)
{
serializeContext->Class<PrefabUserSettings>()
->Version(1)
->Field("m_saveLocation", &PrefabUserSettings::m_saveLocation)
->Field("m_autoNumber", &PrefabUserSettings::m_autoNumber);
}
}
PrefabSaveHandler::PrefabSaveHandler()
{
s_prefabLoaderInterface = AZ::Interface<PrefabLoaderInterface>::Get();
if (s_prefabLoaderInterface == nullptr)
{
AZ_Assert(false, "Prefab - could not get PrefabLoaderInterface on PrefabSaveHandler construction.");
return;
}
s_prefabPublicInterface = AZ::Interface<PrefabPublicInterface>::Get();
if (s_prefabPublicInterface == nullptr)
{
AZ_Assert(false, "Prefab - could not get PrefabPublicInterface on PrefabSaveHandler construction.");
return;
}
s_prefabSystemComponentInterface = AZ::Interface<PrefabSystemComponentInterface>::Get();
if (s_prefabSystemComponentInterface == nullptr)
{
AZ_Assert(false, "Prefab - could not get PrefabSystemComponentInterface on PrefabSaveHandler construction.");
return;
}
AssetBrowser::AssetBrowserSourceDropBus::Handler::BusConnect(s_prefabFileExtension);
}
PrefabSaveHandler::~PrefabSaveHandler()
{
AssetBrowser::AssetBrowserSourceDropBus::Handler::BusDisconnect();
}
bool PrefabSaveHandler::GetPrefabSaveLocation(AZStd::string& path, AZ::u32 settingsId)
{
auto settings = AZ::UserSettings::Find<PrefabUserSettings>(settingsId, AZ::UserSettings::CT_LOCAL);
if (settings)
{
path = settings->m_saveLocation;
return true;
}
return false;
}
void PrefabSaveHandler::SetPrefabSaveLocation(const AZStd::string& path, AZ::u32 settingsId)
{
auto settings = AZ::UserSettings::CreateFind<PrefabUserSettings>(settingsId, AZ::UserSettings::CT_LOCAL);
settings->m_saveLocation = path;
}
void PrefabSaveHandler::HandleSourceFileType(
AZStd::string_view sourceFilePath, AZ::EntityId parentId, AZ::Vector3 position) const
{
auto instantiatePrefabOutcome = s_prefabPublicInterface->InstantiatePrefab(sourceFilePath, parentId, position);
if (!instantiatePrefabOutcome.IsSuccess())
{
WarningDialog("Prefab Instantiation Error", instantiatePrefabOutcome.GetError());
}
}
int PrefabSaveHandler::ExecuteClosePrefabDialog(TemplateId templateId)
{
if (s_prefabSystemComponentInterface->AreDirtyTemplatesPresent(templateId))
{
auto prefabSaveSelectionDialog = ConstructClosePrefabDialog(templateId);
int prefabSaveSelection = prefabSaveSelectionDialog->exec();
if (prefabSaveSelection == QDialog::Accepted)
{
SavePrefabsInDialog(prefabSaveSelectionDialog.get());
}
return prefabSaveSelection;
}
return QDialogButtonBox::DestructiveRole;
}
void PrefabSaveHandler::ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
{
auto prefabTemplate = s_prefabSystemComponentInterface->FindTemplate(templateId);
AZ::IO::Path prefabTemplatePath = prefabTemplate->get().GetFilePath();
if (s_prefabSystemComponentInterface->IsTemplateDirty(templateId))
{
if (s_prefabLoaderInterface->SaveTemplate(templateId) == false)
{
AZ_Error("Prefab", false, "Template '%s' could not be saved successfully.", prefabTemplatePath.c_str());
return;
}
}
if (s_prefabSystemComponentInterface->AreDirtyTemplatesPresent(templateId))
{
if (useSaveAllPrefabsPreference)
{
SaveAllPrefabsPreference saveAllPrefabsPreference = s_prefabLoaderInterface->GetSaveAllPrefabsPreference();
if (saveAllPrefabsPreference == SaveAllPrefabsPreference::SaveAll)
{
s_prefabSystemComponentInterface->SaveAllDirtyTemplates(templateId);
return;
}
else if (saveAllPrefabsPreference == SaveAllPrefabsPreference::SaveNone)
{
return;
}
}
AZStd::unique_ptr<QDialog> savePrefabDialog = ConstructSavePrefabDialog(templateId, useSaveAllPrefabsPreference);
if (savePrefabDialog)
{
int prefabSaveSelection = savePrefabDialog->exec();
if (prefabSaveSelection == QDialog::Accepted)
{
SavePrefabsInDialog(savePrefabDialog.get());
}
}
}
}
bool PrefabSaveHandler::QueryUserForPrefabFilePath(AZStd::string& outPrefabFilePath)
{
AssetSelectionModel selection;
// Note, string filter will match every source file CONTAINING ".prefab".
// If this causes issues, we will need to create a new filter class for regex matching.
// We'll need to check if the file contents are actually a prefab later in the flow anyways,
// so this should not be an issue.
StringFilter* stringFilter = new StringFilter();
stringFilter->SetName("Prefab");
stringFilter->SetFilterString(".prefab");
stringFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down);
auto stringFilterPtr = FilterConstType(stringFilter);
EntryTypeFilter* sourceFilter = new EntryTypeFilter();
sourceFilter->SetName("Source");
sourceFilter->SetEntryType(AssetBrowserEntry::AssetEntryType::Source);
sourceFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down);
auto sourceFilterPtr = FilterConstType(sourceFilter);
CompositeFilter* compositeFilter = new CompositeFilter(CompositeFilter::LogicOperatorType::AND);
compositeFilter->SetName("Prefab");
compositeFilter->AddFilter(sourceFilterPtr);
compositeFilter->AddFilter(stringFilterPtr);
auto compositeFilterPtr = FilterConstType(compositeFilter);
selection.SetDisplayFilter(compositeFilterPtr);
selection.SetSelectionFilter(compositeFilterPtr);
AssetBrowserComponentRequestBus::Broadcast(
&AssetBrowserComponentRequests::PickAssets, selection, AzToolsFramework::GetActiveWindow());
if (!selection.IsValid())
{
// User closed the dialog without selecting, just return.
return false;
}
auto source = azrtti_cast<const SourceAssetBrowserEntry*>(selection.GetResult());
if (source == nullptr)
{
AZ_Assert(false, "Prefab - Incorrect entry type selected during prefab instantiation. Expected source.");
return false;
}
outPrefabFilePath = source->GetFullPath();
return true;
}
bool PrefabSaveHandler::QueryUserForProceduralPrefabAsset(AZStd::string& outPrefabAssetPath)
{
using namespace AzToolsFramework;
auto selection = AssetBrowser::AssetSelectionModel::AssetTypeSelection(azrtti_typeid<AZ::Prefab::ProceduralPrefabAsset>());
EditorRequests::Bus::Broadcast(&AzToolsFramework::EditorRequests::BrowseForAssets, selection);
if (!selection.IsValid())
{
return false;
}
auto product = azrtti_cast<const ProductAssetBrowserEntry*>(selection.GetResult());
if (product == nullptr)
{
return false;
}
outPrefabAssetPath = product->GetRelativePath();
return true;
}
PrefabSaveHandler::PrefabSaveResult PrefabSaveHandler::IsPrefabPathValidForAssets(
QWidget* activeWindow, QString prefabPath, AZStd::string& retrySavePath)
{
bool assetSetFoldersRetrieved = false;
AZStd::vector<AZStd::string> assetSafeFolders;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
assetSetFoldersRetrieved, &AzToolsFramework::AssetSystemRequestBus::Events::GetAssetSafeFolders, assetSafeFolders);
if (!assetSetFoldersRetrieved)
{
// If the asset safe list couldn't be retrieved, don't block the user but warn them.
AZ_Warning("Prefab", false, "Unable to verify that the prefab file to create is in a valid path.");
}
else
{
AZ::IO::FixedMaxPath lexicallyNormalPath = AZ::IO::PathView(prefabPath.toUtf8().constData()).LexicallyNormal();
bool isPathSafeForAssets = false;
for (const AZStd::string& assetSafeFolder : assetSafeFolders)
{
AZ::IO::PathView assetSafeFolderView(assetSafeFolder);
// Check if the prefabPath is relative to the safe asset directory.
// The Path classes are being used to make this check case insensitive.
if (lexicallyNormalPath.IsRelativeTo(assetSafeFolderView))
{
isPathSafeForAssets = true;
break;
}
}
if (!isPathSafeForAssets)
{
// Put an error in the console, so the log files have info about this error, or the user can look up the error after
// dismissing it.
AZStd::string errorMessage =
"You can only save prefabs to either your game project folder or the Gems folder. Update the location and try "
"again.\n\n"
"You can also review and update your save locations in the AssetProcessorPlatformConfig.ini file.";
AZ_Error("Prefab", false, errorMessage.c_str());
// Display a pop-up, the logs are easy to miss. This will make sure a user who encounters this error immediately knows
// their prefab save has failed.
QMessageBox msgBox(activeWindow);
msgBox.setIcon(QMessageBox::Icon::Warning);
msgBox.setTextFormat(Qt::RichText);
msgBox.setWindowTitle(QObject::tr("Invalid save location"));
msgBox.setText(QObject::tr(errorMessage.c_str()));
msgBox.setStandardButtons(QMessageBox::Cancel | QMessageBox::Retry);
msgBox.setDefaultButton(QMessageBox::Retry);
const int response = msgBox.exec();
switch (response)
{
case QMessageBox::Retry:
// If the user wants to retry, they probably want to save to a valid location,
// so set the suggested save path to a known valid location.
if (assetSafeFolders.size() > 0)
{
retrySavePath = assetSafeFolders[0];
}
return PrefabSaveResult::Retry;
case QMessageBox::Cancel:
default:
return PrefabSaveResult::Cancel;
}
}
}
// Valid prefab save location, continue with the save attempt.
return PrefabSaveResult::Continue;
}
void PrefabSaveHandler::GenerateSuggestedPrefabPath(
const AZStd::string& prefabName, const AZStd::string& targetDirectory, AZStd::string& suggestedFullPath)
{
// Generate full suggested path from prefabName - if given NewPrefab as prefabName,
// NewPrefab_001.prefab would be tried, and if that already existed we would suggest
// the first unused number value (NewPrefab_002.prefab etc.)
AZStd::string normalizedTargetDirectory = targetDirectory;
AZ::StringFunc::Path::Normalize(normalizedTargetDirectory);
// Convert spaces in entity names to underscores
AZStd::string prefabNameFiltered = prefabName;
AZ::StringFunc::Replace(prefabNameFiltered, ' ', '_');
auto settings = AZ::UserSettings::CreateFind<PrefabUserSettings>(AZ_CRC("PrefabUserSettings"), AZ::UserSettings::CT_LOCAL);
if (settings->m_autoNumber)
{
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
const AZ::u32 maxPrefabNumber = 1000;
for (AZ::u32 prefabNumber = 1; prefabNumber < maxPrefabNumber; ++prefabNumber)
{
AZStd::string possiblePath;
AZ::StringFunc::Path::Join(
normalizedTargetDirectory.c_str(),
AZStd::string::format("%s_%3.3u%s", prefabNameFiltered.c_str(), prefabNumber, s_prefabFileExtension.c_str())
.c_str(),
possiblePath);
if (!fileIO || !fileIO->Exists(possiblePath.c_str()))
{
suggestedFullPath = possiblePath;
break;
}
}
}
else
{
// use the entity name as the file name regardless of it already existing, the OS will ask the user to overwrite the file in
// that case.
AZ::StringFunc::Path::Join(
normalizedTargetDirectory.c_str(),
AZStd::string::format("%s%s", prefabNameFiltered.c_str(), s_prefabFileExtension.c_str()).c_str(), suggestedFullPath);
}
}
bool PrefabSaveHandler::QueryUserForPrefabSaveLocation(
const AZStd::string& suggestedName,
const char* initialTargetDirectory,
AZ::u32 prefabUserSettingsId,
QWidget* activeWindow,
AZStd::string& outPrefabName,
AZStd::string& outPrefabFilePath)
{
AZStd::string saveAsInitialSuggestedDirectory;
if (!GetPrefabSaveLocation(saveAsInitialSuggestedDirectory, prefabUserSettingsId))
{
saveAsInitialSuggestedDirectory = initialTargetDirectory;
}
AZStd::string saveAsInitialSuggestedFullPath;
GenerateSuggestedPrefabPath(suggestedName, saveAsInitialSuggestedDirectory, saveAsInitialSuggestedFullPath);
QString saveAs;
AZStd::string targetPath;
QFileInfo prefabSaveFileInfo;
QString prefabName;
while (true)
{
{
AZ_PROFILE_FUNCTION(AzToolsFramework);
saveAs = QFileDialog::getSaveFileName(
nullptr, QString("Save As..."), saveAsInitialSuggestedFullPath.c_str(), QString("Prefabs (*.prefab)"));
}
prefabSaveFileInfo = saveAs;
prefabName = prefabSaveFileInfo.baseName();
if (saveAs.isEmpty())
{
return false;
}
targetPath = saveAs.toUtf8().constData();
if (AzFramework::StringFunc::Utf8::CheckNonAsciiChar(targetPath))
{
WarningDialog(
"Prefab Creation Failed.",
"Unicode file name is not supported. \r\n"
"Please use ASCII characters to name your prefab.");
return false;
}
PrefabSaveResult saveResult = IsPrefabPathValidForAssets(activeWindow, saveAs, saveAsInitialSuggestedFullPath);
if (saveResult == PrefabSaveResult::Cancel)
{
// The error was already reported if this failed.
return false;
}
else if (saveResult == PrefabSaveResult::Continue)
{
// The prefab save name is valid, continue with the save attempt.
break;
}
}
// If the prefab already exists, notify the user and bail
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
if (fileIO && fileIO->Exists(targetPath.c_str()))
{
const AZStd::string message = AZStd::string::format(
"You are attempting to overwrite an existing prefab: \"%s\".\r\n\r\n"
"This will damage instances or cascades of this prefab. \r\n\r\n"
"Instead, either push entities/fields to the prefab, or save to a different location.",
targetPath.c_str());
WarningDialog("Prefab Already Exists", message);
return false;
}
// We prevent users from creating a new prefab with the same relative path that's already
// been used by an existing prefab in other places (e.g. Gems) because the AssetProcessor
// generates asset ids based on relative paths. This is unnecessary once AssetProcessor
// starts to generate UUID to every asset regardless of paths.
{
AZStd::string prefabRelativeName;
bool relativePathFound;
AssetSystemRequestBus::BroadcastResult(
relativePathFound, &AssetSystemRequestBus::Events::GetRelativeProductPathFromFullSourceOrProductPath, targetPath,
prefabRelativeName);
AZ::Data::AssetId prefabAssetId;
AZ::Data::AssetCatalogRequestBus::BroadcastResult(
prefabAssetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, prefabRelativeName.c_str(),
AZ::Data::s_invalidAssetType, false);
if (prefabAssetId.IsValid())
{
const AZStd::string message = AZStd::string::format(
"A prefab with the relative path \"%s\" already exists in the Asset Database. \r\n\r\n"
"Overriding it will damage instances or cascades of this prefab. \r\n\r\n"
"Instead, either push entities/fields to the prefab, or save to a different location.",
prefabRelativeName.c_str());
WarningDialog("Prefab Path Error", message);
return false;
}
}
AZStd::string saveDir(prefabSaveFileInfo.absoluteDir().absolutePath().toUtf8().constData());
SetPrefabSaveLocation(saveDir, prefabUserSettingsId);
outPrefabName = prefabName.toUtf8().constData();
outPrefabFilePath = targetPath.c_str();
return true;
}
void PrefabSaveHandler::GenerateSuggestedFilenameFromEntities(const EntityIdList& entityIds, AZStd::string& outName)
{
AZ_PROFILE_FUNCTION(AzToolsFramework);
AZStd::string suggestedName;
for (const AZ::EntityId& entityId : entityIds)
{
if (!AppendEntityToSuggestedFilename(suggestedName, entityId))
{
break;
}
}
if (suggestedName.size() == 0 || AzFramework::StringFunc::Utf8::CheckNonAsciiChar(suggestedName))
{
suggestedName = "NewPrefab";
}
outName = suggestedName;
}
bool PrefabSaveHandler::AppendEntityToSuggestedFilename(AZStd::string& filename, AZ::EntityId entityId)
{
// When naming a prefab after its entities, we stop appending additional names once we've reached this cutoff length
size_t prefabNameCutoffLength = 32;
AzToolsFramework::EntityIdSet usedNameEntities;
if (usedNameEntities.find(entityId) == usedNameEntities.end())
{
AZ::Entity* entity = nullptr;
AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId);
if (entity)
{
AZStd::string entityNameFiltered = entity->GetName();
// Convert spaces in entity names to underscores
for (size_t i = 0; i < entityNameFiltered.size(); ++i)
{
char& character = entityNameFiltered.at(i);
if (character == ' ')
{
character = '_';
}
}
filename.append(entityNameFiltered);
usedNameEntities.insert(entityId);
if (filename.size() > prefabNameCutoffLength)
{
return false;
}
}
}
return true;
}
void PrefabSaveHandler::SavePrefabsInDialog(QDialog* unsavedPrefabsDialog)
{
QList<QLabel*> unsavedPrefabFileLabels = unsavedPrefabsDialog->findChildren<QLabel*>(UnsavedPrefabFileName);
if (unsavedPrefabFileLabels.size() > 0)
{
for (const QLabel* unsavedPrefabFileLabel : unsavedPrefabFileLabels)
{
AZStd::string unsavedPrefabFileName = unsavedPrefabFileLabel->property("FilePath").toString().toUtf8().data();
AzToolsFramework::Prefab::TemplateId unsavedPrefabTemplateId =
s_prefabSystemComponentInterface->GetTemplateIdFromFilePath(unsavedPrefabFileName.data());
[[maybe_unused]] bool isTemplateSavedSuccessfully = s_prefabLoaderInterface->SaveTemplate(unsavedPrefabTemplateId);
AZ_Error("Prefab", isTemplateSavedSuccessfully, "Prefab '%s' could not be saved successfully.", unsavedPrefabFileName.c_str());
}
}
}
AZStd::unique_ptr<QDialog> PrefabSaveHandler::ConstructSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
{
AZStd::unique_ptr<QDialog> savePrefabDialog = AZStd::make_unique<QDialog>(AzToolsFramework::GetActiveWindow());
savePrefabDialog->setWindowTitle("Unsaved files detected");
// Main Content section begins.
savePrefabDialog->setObjectName(SavePrefabDialog);
QBoxLayout* contentLayout = new QVBoxLayout(savePrefabDialog.get());
QFrame* prefabSavedMessageFrame = new QFrame(savePrefabDialog.get());
QHBoxLayout* prefabSavedMessageLayout = new QHBoxLayout(savePrefabDialog.get());
prefabSavedMessageFrame->setObjectName(PrefabSavedMessageFrame);
prefabSavedMessageFrame->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
// Add a checkMark icon next to the level entities saved message.
QPixmap checkMarkIcon(QString(":/Notifications/checkmark.svg"));
QLabel* prefabSavedSuccessfullyIconContainer = new QLabel(savePrefabDialog.get());
prefabSavedSuccessfullyIconContainer->setPixmap(checkMarkIcon);
prefabSavedSuccessfullyIconContainer->setFixedWidth(checkMarkIcon.width());
// Add a message that level entities are saved successfully.
auto prefabTemplate = s_prefabSystemComponentInterface->FindTemplate(templateId);
AZ::IO::Path prefabTemplatePath = prefabTemplate->get().GetFilePath();
QLabel* prefabSavedSuccessfullyLabel = new QLabel(
QString("Prefab '<b>%1</b>' has been saved. Do you want to save the below dependent prefabs too?").arg(prefabTemplatePath.c_str()),
savePrefabDialog.get());
prefabSavedMessageLayout->addWidget(prefabSavedSuccessfullyIconContainer);
prefabSavedMessageLayout->addWidget(prefabSavedSuccessfullyLabel);
prefabSavedMessageFrame->setLayout(prefabSavedMessageLayout);
contentLayout->addWidget(prefabSavedMessageFrame);
AZStd::unique_ptr<AzQtComponents::Card> unsavedPrefabsContainer = ConstructUnsavedPrefabsCard(templateId);
contentLayout->addWidget(unsavedPrefabsContainer.release());
contentLayout->addStretch();
// Footer section begins.
QHBoxLayout* footerLayout = new QHBoxLayout(savePrefabDialog.get());
if (useSaveAllPrefabsPreference)
{
QFrame* footerSeparatorLine = new QFrame(savePrefabDialog.get());
footerSeparatorLine->setObjectName(FooterSeparatorLine);
footerSeparatorLine->setFrameShape(QFrame::HLine);
contentLayout->addWidget(footerSeparatorLine);
QLabel* prefabSavePreferenceHint = new QLabel(
"<u>You can prevent this window from showing in the future by updating your global save preferences.</u>",
savePrefabDialog.get());
prefabSavePreferenceHint->setToolTip(
"Go to 'Edit > Editor Settings > Global Preferences... > Global save preferences' to update your preference");
prefabSavePreferenceHint->setObjectName(PrefabSavePreferenceHint);
footerLayout->addWidget(prefabSavePreferenceHint);
}
QDialogButtonBox* prefabSaveConfirmationButtons =
new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::No, savePrefabDialog.get());
footerLayout->addWidget(prefabSaveConfirmationButtons);
contentLayout->addLayout(footerLayout);
connect(prefabSaveConfirmationButtons, &QDialogButtonBox::accepted, savePrefabDialog.get(), &QDialog::accept);
connect(prefabSaveConfirmationButtons, &QDialogButtonBox::rejected, savePrefabDialog.get(), &QDialog::reject);
AzQtComponents::StyleManager::setStyleSheet(savePrefabDialog->parentWidget(), QStringLiteral("style:Editor.qss"));
savePrefabDialog->setLayout(contentLayout);
return AZStd::move(savePrefabDialog);
}
AZStd::shared_ptr<QDialog> PrefabSaveHandler::ConstructClosePrefabDialog(TemplateId templateId)
{
AZStd::shared_ptr<QDialog> closePrefabDialog = AZStd::make_shared<QDialog>(AzToolsFramework::GetActiveWindow());
closePrefabDialog->setWindowTitle("Unsaved files detected");
AZStd::weak_ptr<QDialog> closePrefabDialogWeakPtr(closePrefabDialog);
closePrefabDialog->setObjectName(ClosePrefabDialog);
// Main Content section begins.
QVBoxLayout* contentLayout = new QVBoxLayout(closePrefabDialog.get());
QFrame* prefabSaveWarningFrame = new QFrame(closePrefabDialog.get());
QHBoxLayout* levelEntitiesSaveQuestionLayout = new QHBoxLayout(closePrefabDialog.get());
prefabSaveWarningFrame->setObjectName(PrefabSaveWarningFrame);
// Add a warning icon next to save prefab warning.
prefabSaveWarningFrame->setLayout(levelEntitiesSaveQuestionLayout);
QPixmap warningIcon(QString(":/Notifications/warning.svg"));
QLabel* warningIconContainer = new QLabel(closePrefabDialog.get());
warningIconContainer->setPixmap(warningIcon);
warningIconContainer->setFixedWidth(warningIcon.width());
levelEntitiesSaveQuestionLayout->addWidget(warningIconContainer);
// Ask user if they want to save entities in level.
QLabel* prefabSaveQuestionLabel = new QLabel("Do you want to save the below unsaved prefabs?", closePrefabDialog.get());
levelEntitiesSaveQuestionLayout->addWidget(prefabSaveQuestionLabel);
contentLayout->addWidget(prefabSaveWarningFrame);
auto templateToSave = s_prefabSystemComponentInterface->FindTemplate(templateId);
AZ::IO::Path templateToSaveFilePath = templateToSave->get().GetFilePath();
AZStd::unique_ptr<AzQtComponents::Card> unsavedPrefabsCard = ConstructUnsavedPrefabsCard(templateId);
contentLayout->addWidget(unsavedPrefabsCard.release());
contentLayout->addStretch();
QHBoxLayout* footerLayout = new QHBoxLayout(closePrefabDialog.get());
QDialogButtonBox* prefabSaveConfirmationButtons = new QDialogButtonBox(
QDialogButtonBox::Save | QDialogButtonBox::Discard | QDialogButtonBox::Cancel, closePrefabDialog.get());
footerLayout->addWidget(prefabSaveConfirmationButtons);
contentLayout->addLayout(footerLayout);
QObject::connect(prefabSaveConfirmationButtons, &QDialogButtonBox::accepted, closePrefabDialog.get(), &QDialog::accept);
QObject::connect(prefabSaveConfirmationButtons, &QDialogButtonBox::rejected, closePrefabDialog.get(), &QDialog::reject);
QObject::connect(
prefabSaveConfirmationButtons, &QDialogButtonBox::clicked, closePrefabDialog.get(),
[closePrefabDialogWeakPtr, prefabSaveConfirmationButtons](QAbstractButton* button)
{
int prefabSaveSelection = prefabSaveConfirmationButtons->buttonRole(button);
closePrefabDialogWeakPtr.lock()->done(prefabSaveSelection);
});
AzQtComponents::StyleManager::setStyleSheet(closePrefabDialog.get(), QStringLiteral("style:Editor.qss"));
closePrefabDialog->setLayout(contentLayout);
return closePrefabDialog;
}
AZStd::unique_ptr<AzQtComponents::Card> PrefabSaveHandler::ConstructUnsavedPrefabsCard(TemplateId templateId)
{
FlowLayout* unsavedPrefabsLayout = new FlowLayout(nullptr);
AZStd::set<AZ::IO::PathView> dirtyTemplatePaths = s_prefabSystemComponentInterface->GetDirtyTemplatePaths(templateId);
for (AZ::IO::PathView dirtyTemplatePath : dirtyTemplatePaths)
{
QLabel* prefabNameLabel =
new QLabel(QString("<u>%1</u>").arg(dirtyTemplatePath.Filename().Native().data()), AzToolsFramework::GetActiveWindow());
prefabNameLabel->setObjectName(UnsavedPrefabFileName);
prefabNameLabel->setWordWrap(true);
prefabNameLabel->setToolTip(dirtyTemplatePath.Native().data());
prefabNameLabel->setProperty("FilePath", dirtyTemplatePath.Native().data());
unsavedPrefabsLayout->addWidget(prefabNameLabel);
}
AZStd::unique_ptr<AzQtComponents::Card> unsavedPrefabsContainer = AZStd::make_unique<AzQtComponents::Card>(AzToolsFramework::GetActiveWindow());
unsavedPrefabsContainer->setObjectName(SaveDependentPrefabsCard);
unsavedPrefabsContainer->setTitle("Unsaved Prefabs");
unsavedPrefabsContainer->header()->setHasContextMenu(false);
unsavedPrefabsContainer->header()->setIcon(QIcon(QStringLiteral(":/Entity/prefab_edit.svg")));
QFrame* unsavedPrefabsFrame = new QFrame(unsavedPrefabsContainer.get());
unsavedPrefabsFrame->setLayout(unsavedPrefabsLayout);
QScrollArea* unsavedPrefabsScrollArea = new QScrollArea(unsavedPrefabsContainer.get());
unsavedPrefabsScrollArea->setWidget(unsavedPrefabsFrame);
unsavedPrefabsScrollArea->setWidgetResizable(true);
unsavedPrefabsContainer->setContentWidget(unsavedPrefabsScrollArea);
return AZStd::move(unsavedPrefabsContainer);
}
}
}

@ -0,0 +1,101 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/UserSettings/UserSettings.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserSourceDropBus.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Prefab/PrefabIdTypes.h>
#include <AzQtComponents/Components/Widgets/Card.h>
namespace AzToolsFramework
{
namespace Prefab
{
class PrefabLoaderInterface;
class PrefabPublicInterface;
class PrefabSystemComponentInterface;
//! Structure for saving/retrieving user settings related to prefab workflows.
class PrefabUserSettings : public AZ::UserSettings
{
public:
AZ_CLASS_ALLOCATOR(PrefabUserSettings, AZ::SystemAllocator, 0);
AZ_RTTI(PrefabUserSettings, "{E17A6128-E2C3-4501-B1AD-B8BB0D315602}", AZ::UserSettings);
AZStd::string m_saveLocation;
bool m_autoNumber =
false; //!< Should the name of the prefab file be automatically numbered. e.g PrefabName_001.prefab vs PrefabName.prefab.
PrefabUserSettings() = default;
static void Reflect(AZ::ReflectContext* context);
};
//! Class to handle dialogs and windows related to prefab save operations.
class PrefabSaveHandler final
: public QObject
, public AssetBrowser::AssetBrowserSourceDropBus::Handler
{
public:
AZ_CLASS_ALLOCATOR(PrefabSaveHandler, AZ::SystemAllocator, 0);
PrefabSaveHandler();
~PrefabSaveHandler();
// Settings management
static bool GetPrefabSaveLocation(AZStd::string& path, AZ::u32 settingsId);
static void SetPrefabSaveLocation(const AZStd::string& path, AZ::u32 settingsId);
// EntityOutlinerSourceDropHandlingBus overrides ...
void HandleSourceFileType(AZStd::string_view sourceFilePath, AZ::EntityId parentId, AZ::Vector3 position) const override;
// Dialogs
int ExecuteClosePrefabDialog(TemplateId templateId);
void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference);
static bool QueryUserForPrefabFilePath(AZStd::string& outPrefabFilePath);
static bool QueryUserForProceduralPrefabAsset(AZStd::string& outPrefabAssetPath);
static bool QueryUserForPrefabSaveLocation(
const AZStd::string& suggestedName,
const char* initialTargetDirectory,
AZ::u32 prefabUserSettingsId,
QWidget* activeWindow,
AZStd::string& outPrefabName,
AZStd::string& outPrefabFilePath);
// Path and filename generation
enum class PrefabSaveResult
{
Continue,
Retry,
Cancel
};
static void GenerateSuggestedFilenameFromEntities(const EntityIdList& entities, AZStd::string& outName);
static bool AppendEntityToSuggestedFilename(AZStd::string& filename, AZ::EntityId entityId);
static PrefabSaveResult IsPrefabPathValidForAssets(QWidget* activeWindow, QString prefabPath, AZStd::string& retrySavePath);
static void GenerateSuggestedPrefabPath(
const AZStd::string& prefabName, const AZStd::string& targetDirectory, AZStd::string& suggestedFullPath);
private:
AZStd::shared_ptr<QDialog> ConstructClosePrefabDialog(TemplateId templateId);
AZStd::unique_ptr<AzQtComponents::Card> ConstructUnsavedPrefabsCard(TemplateId templateId);
AZStd::unique_ptr<QDialog> ConstructSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference);
void SavePrefabsInDialog(QDialog* unsavedPrefabsDialog);
static const AZStd::string s_prefabFileExtension;
static PrefabLoaderInterface* s_prefabLoaderInterface;
static PrefabPublicInterface* s_prefabPublicInterface;
static PrefabSystemComponentInterface* s_prefabSystemComponentInterface;
};
}
}

@ -11,11 +11,12 @@
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <QApplication>
#include <QMessageBox>
namespace AzToolsFramework
{
/// Gets the currently active window, or the Editor's main window if there is no active window.
/// Can be used to guarantee that modal dialogs have a valid parent in every context.
//! Gets the currently active window, or the Editor's main window if there is no active window.
//! Can be used to guarantee that modal dialogs have a valid parent in every context.
inline QWidget* GetActiveWindow()
{
QWidget* activeWindow = QApplication::activeWindow();
@ -26,5 +27,12 @@ namespace AzToolsFramework
return activeWindow;
}
//! Create a simple modal dialog with a warning message.
inline void WarningDialog(AZStd::string_view title, AZStd::string_view message)
{
QMessageBox::warning(GetActiveWindow(), QString(title.data()), QString(message.data()), QMessageBox::Ok, QMessageBox::Ok);
}
} // namespace AzToolsFramework

@ -20,6 +20,7 @@
#include <AzToolsFramework/Commands/EntityManipulatorCommand.h>
#include <AzToolsFramework/API/ViewportEditorModeTrackerNotificationBus.h>
#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
#include <AzToolsFramework/Entity/EntityTypes.h>
#include <AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h>
#include <AzToolsFramework/Manipulators/BaseManipulator.h>
#include <AzToolsFramework/ToolsComponents/EditorLockComponentBus.h>
@ -36,8 +37,6 @@ namespace AzToolsFramework
{
class EditorVisibleEntityDataCacheInterface;
using EntityIdSet = AZStd::unordered_set<AZ::EntityId>; //!< Alias for unordered_set of EntityIds.
//! Entity related data required by manipulators during action.
struct EntityIdManipulatorLookup
{

@ -153,6 +153,7 @@ set(FILES
Entity/SliceEditorEntityOwnershipService.h
Entity/SliceEditorEntityOwnershipService.cpp
Entity/SliceEditorEntityOwnershipServiceBus.h
Entity/EntityTypes.h
Entity/EntityUtilityComponent.h
Entity/EntityUtilityComponent.cpp
Entity/ReadOnly/ReadOnlyEntityInterface.h
@ -758,6 +759,8 @@ set(FILES
UI/Prefab/PrefabIntegrationManager.h
UI/Prefab/PrefabIntegrationManager.cpp
UI/Prefab/PrefabIntegrationInterface.h
UI/Prefab/PrefabSaveLoadHandler.h
UI/Prefab/PrefabSaveLoadHandler.cpp
UI/Prefab/PrefabUiHandler.h
UI/Prefab/PrefabUiHandler.cpp
UI/Prefab/PrefabViewportFocusPathHandler.h

@ -21,7 +21,7 @@ namespace Benchmark
CreateFakePaths(numInstances);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -60,7 +60,7 @@ namespace Benchmark
{
const unsigned int numEntities = static_cast<unsigned int>(state.range());
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -100,7 +100,7 @@ namespace Benchmark
// plus the instance receiving them
CreateFakePaths(numInstancesToAdd + 1);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -150,7 +150,7 @@ namespace Benchmark
// plus the root instance
CreateFakePaths(numInstances + 1);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();

@ -24,7 +24,7 @@ namespace Benchmark
m_pathString);
TemplateId templateToInstantiateId = firstInstance->GetTemplateId();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();

@ -19,7 +19,7 @@ namespace Benchmark
const unsigned int numTemplates = static_cast<unsigned int>(state.range());
CreateFakePaths(numTemplates);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();

@ -24,7 +24,7 @@ namespace Benchmark
const auto& nestedTemplatePath = m_paths.front();
const auto& enclosingTemplatePath = m_paths.back();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -85,7 +85,7 @@ namespace Benchmark
const unsigned int numInstances = maxDepth;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -137,7 +137,7 @@ namespace Benchmark
const unsigned int numInstances = numRootInstances * maxDepth;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@ -197,7 +197,7 @@ namespace Benchmark
const unsigned int numInstances = (1 << maxDepth) - 1;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();

@ -22,7 +22,7 @@ namespace Benchmark
SetUpSpawnableAsset(entityCountInSourcePrefab);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset);
@ -59,7 +59,7 @@ namespace Benchmark
SetUpSpawnableAsset(entityCountInSpawnable);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset);
@ -94,7 +94,7 @@ namespace Benchmark
SetUpSpawnableAsset(entityCountInSpawnable);
auto spawner = AzFramework::SpawnableEntitiesInterface::Get();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset);

@ -27,7 +27,7 @@ namespace Benchmark
auto& prefabDom = m_prefabSystemComponent->FindTemplateDom(instance->GetTemplateId());
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
// Create a vector to store spawnables so that they don't get destroyed immediately after construction.
AZStd::vector<AZStd::unique_ptr<AzFramework::Spawnable>> spawnables;

@ -176,7 +176,7 @@ namespace UnitTest
TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload3)
{
Instance instance;
Instance::EntityList entityList;
AzToolsFramework::EntityList entityList;
(PrefabDomUtils::LoadInstanceFromPrefabDom(instance, entityList, m_prefabDom));
CheckInstance(instance);

@ -124,7 +124,16 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC
# After ensuring that we correctly support DPI scaling, this should be switched to "PerMonitor"
set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DPI_AWARE "OFF")
if(LY_DEFAULT_PROJECT_PATH)
set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"")
if (TARGET ${project_name})
get_target_property(project_game_launcher_additional_args ${project_name} GAMELAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS)
if (project_game_launcher_additional_args)
# Avoid pushing param-NOTFOUND into the argument in case this property wasn't found
set(additional_game_vs_debugger_args "${project_game_launcher_additional_args}")
endif()
endif()
set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS
"--project-path=\"${LY_DEFAULT_PROJECT_PATH}\" ${additional_game_vs_debugger_args}")
endif()
# Associate the Clients Gem Variant with each projects GameLauncher
@ -173,7 +182,16 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC
)
if(LY_DEFAULT_PROJECT_PATH)
set_property(TARGET ${project_name}.ServerLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"")
if (TARGET ${project_name})
get_target_property(project_server_launcher_additional_args ${project_name} SERVERLAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS)
if (project_server_launcher_additional_args)
# Avoid pushing param-NOTFOUND into the argument in case this property wasn't found
set(additional_server_vs_debugger_args "${project_server_launcher_additional_args}")
endif()
endif()
set_property(TARGET ${project_name}.ServerLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS
"--project-path=\"${LY_DEFAULT_PROJECT_PATH}\" ${additional_server_vs_debugger_args}")
endif()
# Associate the Servers Gem Variant with each projects ServerLauncher

@ -47,8 +47,6 @@ extern HMODULE gDLLHandle;
static HWND hwndException = 0;
static bool g_bUserDialog = true; // true=on crash show dialog box, false=supress user interaction
static int PrintException(EXCEPTION_POINTERS* pex);
static bool IsFloatingPointException(EXCEPTION_POINTERS* pex);
extern LONG WINAPI CryEngineExceptionFilterWER(struct _EXCEPTION_POINTERS* pExceptionPointers);
@ -667,8 +665,6 @@ INT_PTR CALLBACK DebugCallStack::ExceptionDialogProc(HWND hwndDlg, UINT message,
{
static EXCEPTION_POINTERS* pex;
static char errorString[32768] = "";
switch (message)
{
case WM_INITDIALOG:

@ -2620,26 +2620,7 @@ namespace
UnixTimeToFileTime(unixtime, &filetime);
FileTimeToSystemTime(&filetime, systemtime);
}
time_t UnixTimeFromFileTime(const FILETIME* filetime)
{
LONGLONG longlong = filetime->dwHighDateTime;
longlong <<= 32;
longlong |= filetime->dwLowDateTime;
longlong -= 116444736000000000;
return longlong / 10000000;
}
time_t UnixTimeFromSystemTime(const SYSTEMTIME* systemtime)
{
// convert systemtime to filetime
FILETIME filetime;
SystemTimeToFileTime(systemtime, &filetime);
// convert filetime to unixtime
time_t unixtime = UnixTimeFromFileTime(&filetime);
return unixtime;
}
};
}
void CLocalizedStringsManager::LocalizeTime(time_t t, bool bMakeLocalTime, bool bShowSeconds, AZStd::string& outTimeString)
{

@ -553,7 +553,7 @@ namespace AZ
// Create a new unmodified prefab Instance for the nested slice instance.
auto nestedInstance = AZStd::make_unique<AzToolsFramework::Prefab::Instance>(AZStd::move(instanceAlias));
AzToolsFramework::Prefab::Instance::EntityList newEntities;
AzToolsFramework::EntityList newEntities;
if (!AzToolsFramework::Prefab::PrefabDomUtils::LoadInstanceFromPrefabDom(
*nestedInstance, newEntities, nestedTemplate->get().GetPrefabDom()))
{

@ -186,7 +186,7 @@ namespace TestImpact
void TestRunCompleteCallback(const Client::TestRunBase& testRun, size_t numTestRunsCompleted, size_t totalNumTestRuns)
{
const auto progress =
AZStd::string::format("(%03u/%03u)", numTestRunsCompleted, totalNumTestRuns, testRun.GetTargetName().c_str());
AZStd::string::format("(%03zu/%03zu)", numTestRunsCompleted, totalNumTestRuns);
AZStd::string result;
switch (testRun.GetResult())

@ -391,57 +391,57 @@ namespace TestImpact
// SequenceReport overrides ...
AZStd::chrono::milliseconds GetDuration() const override
{
return GetDuration() + m_draftedTestRunReport.GetDuration();
return SequenceReportBase<Type, PolicyStateType>::GetDuration() + m_draftedTestRunReport.GetDuration();
}
TestSequenceResult GetResult() const override
{
return CalculateMultiTestSequenceResult({ GetResult(), m_draftedTestRunReport.GetResult() });
return CalculateMultiTestSequenceResult({ SequenceReportBase<Type, PolicyStateType>::GetResult(), m_draftedTestRunReport.GetResult() });
}
size_t GetTotalNumTestRuns() const override
{
return GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
}
size_t GetTotalNumPassingTests() const override
{
return GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
}
size_t GetTotalNumFailingTests() const override
{
return GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
}
size_t GetTotalNumDisabledTests() const override
{
return GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
}
size_t GetTotalNumPassingTestRuns() const override
{
return GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
}
size_t GetTotalNumFailingTestRuns() const override
{
return GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
}
size_t GetTotalNumExecutionFailureTestRuns() const override
{
return GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
}
size_t GetTotalNumTimedOutTestRuns() const override
{
return GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
}
size_t GetTotalNumUnexecutedTestRuns() const override
{
return GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
}
private:
AZStd::vector<AZStd::string> m_draftedTestRuns;

@ -24,13 +24,13 @@ namespace TestImpact
using value_type = AZ::IO::Path::value_type;
constexpr RepoPath() = default;
constexpr RepoPath(const RepoPath&) = default;
constexpr RepoPath(RepoPath&&) noexcept = default;
constexpr RepoPath(const string_type& path) noexcept;
constexpr RepoPath(const string_view_type& path) noexcept;
constexpr RepoPath(const value_type* path) noexcept;
constexpr RepoPath(const AZ::IO::PathView& path);
constexpr RepoPath(const AZ::IO::Path& path);
RepoPath(const RepoPath&) = default;
RepoPath(RepoPath&&) noexcept = default;
RepoPath(const string_type& path) noexcept;
RepoPath(const string_view_type& path) noexcept;
RepoPath(const value_type* path) noexcept;
RepoPath(const AZ::IO::PathView& path);
RepoPath(const AZ::IO::Path& path);
RepoPath& operator=(const RepoPath&) noexcept = default;
RepoPath& operator=(const string_type&) noexcept;
@ -52,11 +52,11 @@ namespace TestImpact
// Wrappers around the AZ::IO::Path concatenation operator
friend RepoPath operator/(const RepoPath& lhs, const AZ::IO::PathView& rhs);
friend RepoPath operator/(const RepoPath& lhs, AZStd::string_view rhs);
friend RepoPath operator/(const RepoPath& lhs, const typename value_type* rhs);
friend RepoPath operator/(const RepoPath& lhs, const value_type* rhs);
friend RepoPath operator/(const RepoPath& lhs, const RepoPath& rhs);
RepoPath& operator/=(const AZ::IO::PathView& rhs);
RepoPath& operator/=(AZStd::string_view rhs);
RepoPath& operator/=(const typename value_type* rhs);
RepoPath& operator/=(const value_type* rhs);
RepoPath& operator/=(const RepoPath& rhs);
friend bool operator==(const RepoPath& lhs, const RepoPath& rhs) noexcept;
@ -67,27 +67,27 @@ namespace TestImpact
AZ::IO::Path m_path;
};
constexpr RepoPath::RepoPath(const string_type& path) noexcept
inline RepoPath::RepoPath(const string_type& path) noexcept
: m_path(AZ::IO::Path(path).MakePreferred())
{
}
constexpr RepoPath::RepoPath(const string_view_type& path) noexcept
inline RepoPath::RepoPath(const string_view_type& path) noexcept
: m_path(AZ::IO::Path(path).MakePreferred())
{
}
constexpr RepoPath::RepoPath(const value_type* path) noexcept
inline RepoPath::RepoPath(const value_type* path) noexcept
: m_path(AZ::IO::Path(path).MakePreferred())
{
}
constexpr RepoPath::RepoPath(const AZ::IO::PathView& path)
inline RepoPath::RepoPath(const AZ::IO::PathView& path)
: m_path(AZ::IO::Path(path).MakePreferred())
{
}
constexpr RepoPath::RepoPath(const AZ::IO::Path& path)
inline RepoPath::RepoPath(const AZ::IO::Path& path)
: m_path(AZ::IO::Path(path).MakePreferred())
{
}

@ -69,6 +69,7 @@ namespace TestImpact
const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node)
AZ_POP_DISABLE_WARNING
{
AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used
const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value();
return AZStd::chrono::milliseconds(static_cast<AZStd::sys_time_t>(AZStd::stof(duration) * 1000.f));
};
@ -86,6 +87,7 @@ namespace TestImpact
const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node)
AZ_POP_DISABLE_WARNING
{
AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used
const AZStd::string status = node->first_attribute(Keys[StatusKey])->value();
if (status == Keys[RunKey])
{

@ -24,8 +24,8 @@ namespace TestImpact
public:
Pipe(SECURITY_ATTRIBUTES& sa, HANDLE& stdChannel);
Pipe(Pipe&& other) = delete;
Pipe(Pipe& other) = delete;
Pipe& operator=(Pipe& other) = delete;
Pipe(const Pipe& other) = delete;
Pipe& operator=(const Pipe& other) = delete;
Pipe& operator=(Pipe&& other) = delete;
//! Releases the child end of the pipe (not needed once parent has their end).

@ -58,14 +58,14 @@ namespace TestImpact
//! @param payloadMapProducer The client callback to be called when all jobs have finished to transform the work produced by each job into the desired output.
//! @param jobCallback The client callback to be called when each job changes state.
//! @return The result of the run sequence and the jobs with their associated payloads.
AZStd::pair<ProcessSchedulerResult, AZStd::vector<typename JobT>> Execute(
AZStd::pair<ProcessSchedulerResult, AZStd::vector<JobT>> Execute(
const AZStd::vector<typename JobT::Info>& jobs,
PayloadMapProducer<JobT> payloadMapProducer,
StdOutputRouting stdOutRouting,
StdErrorRouting stdErrRouting,
AZStd::optional<AZStd::chrono::milliseconds> jobTimeout,
AZStd::optional<AZStd::chrono::milliseconds> runnerTimeout,
JobCallback<typename JobT> jobCallback);
JobCallback<JobT> jobCallback);
private:
ProcessScheduler m_processScheduler;
@ -82,17 +82,17 @@ namespace TestImpact
}
template<typename JobT>
AZStd::pair<ProcessSchedulerResult, AZStd::vector<typename JobT>> JobRunner<JobT>::Execute(
AZStd::pair<ProcessSchedulerResult, AZStd::vector<JobT>> JobRunner<JobT>::Execute(
const AZStd::vector<typename JobT::Info>& jobInfos,
PayloadMapProducer<JobT> payloadMapProducer,
StdOutputRouting stdOutRouting,
StdErrorRouting stdErrRouting,
AZStd::optional<AZStd::chrono::milliseconds> jobTimeout,
AZStd::optional<AZStd::chrono::milliseconds> runnerTimeout,
JobCallback<typename JobT> jobCallback)
JobCallback<JobT> jobCallback)
{
AZStd::vector<ProcessInfo> processes;
AZStd::unordered_map<JobT::Info::IdType, AZStd::pair<JobMeta, const typename JobT::Info*>> metas;
AZStd::unordered_map<typename JobT::Info::IdType, AZStd::pair<JobMeta, const typename JobT::Info*>> metas;
AZStd::vector<JobT> jobs;
jobs.reserve(jobInfos.size());
processes.reserve(jobInfos.size());

@ -162,7 +162,7 @@ namespace TestImpact
{
}
[[nodiscard]] ProcessCallbackResult operator()(const typename JobInfo& jobInfo, const TestImpact::JobMeta& meta)
[[nodiscard]] ProcessCallbackResult operator()(const JobInfo& jobInfo, const TestImpact::JobMeta& meta)
{
const auto id = jobInfo.GetId().m_value;
const auto& args = jobInfo.GetCommand().m_args;
@ -189,7 +189,7 @@ namespace TestImpact
private:
const AZStd::vector<const TestTarget*>& m_testTargets;
TestEngineJobMap<typename IdType>* m_engineJobs;
TestEngineJobMap<IdType>* m_engineJobs;
Policy::ExecutionFailure m_executionFailurePolicy;
Policy::TestFailure m_testFailurePolicy;
AZStd::optional<TestEngineJobCompleteCallback>* m_callback;
@ -239,8 +239,7 @@ namespace TestImpact
const RepoPath& testRunnerBinary,
const RepoPath& instrumentBinary,
size_t maxConcurrentRuns)
: m_maxConcurrentRuns(maxConcurrentRuns)
, m_testJobInfoGenerator(AZStd::make_unique<TestJobInfoGenerator>(
: m_testJobInfoGenerator(AZStd::make_unique<TestJobInfoGenerator>(
sourceDir, targetBinaryDir, cacheDir, artifactDir, testRunnerBinary, instrumentBinary))
, m_testEnumerator(AZStd::make_unique<TestEnumerator>(maxConcurrentRuns))
, m_instrumentedTestRunner(AZStd::make_unique<InstrumentedTestRunner>(maxConcurrentRuns))

@ -117,7 +117,6 @@ namespace TestImpact
//! Cleans up the artifacts directory of any artifacts from previous runs.
void DeleteArtifactXmls() const;
size_t m_maxConcurrentRuns = 0;
AZStd::unique_ptr<TestJobInfoGenerator> m_testJobInfoGenerator;
AZStd::unique_ptr<TestEnumerator> m_testEnumerator;
AZStd::unique_ptr<InstrumentedTestRunner> m_instrumentedTestRunner;

@ -6,6 +6,7 @@
*
*/
#include <AzCore/std/typetraits/disjunction.h>
#include <TestImpactFramework/TestImpactClientSequenceReportSerializer.h>
#include <TestImpactFramework/TestImpactSequenceReportException.h>
#include <TestImpactFramework/TestImpactUtils.h>
@ -735,7 +736,11 @@ namespace TestImpact
};
}
template<typename PolicyStateType>
template<typename PolicyStateType, typename = AZStd::enable_if_t<AZStd::disjunction_v<
AZStd::is_same<PolicyStateType, SequencePolicyState>,
AZStd::is_same<PolicyStateType, SafeImpactAnalysisSequencePolicyState>,
AZStd::is_same<PolicyStateType, ImpactAnalysisSequencePolicyState>
>>>
PolicyStateType DeserializePolicyStateType(const rapidjson::Value& serialPolicyStateType)
{
if constexpr (AZStd::is_same_v<PolicyStateType, SequencePolicyState>)
@ -750,10 +755,6 @@ namespace TestImpact
{
return DeserializeImpactAnalysisSequencePolicyStateMembers(serialPolicyStateType);
}
else
{
static_assert(false, "Template paramater must be a valid policy state type");
}
}
template<typename SequenceReportBaseType>
@ -775,7 +776,7 @@ namespace TestImpact
serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::MaxConcurrency]].GetUint64(),
testTargetTimeout ? AZStd::optional<AZStd::chrono::milliseconds>{ testTargetTimeout } : AZStd::nullopt,
globalTimeout ? AZStd::optional<AZStd::chrono::milliseconds>{ globalTimeout } : AZStd::nullopt,
DeserializePolicyStateType<SequenceReportBaseType::PolicyState>(serialSequenceReportBase),
DeserializePolicyStateType<typename SequenceReportBaseType::PolicyState>(serialSequenceReportBase),
SuiteTypeFromString(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::Suite]].GetString()),
DeserializeTestSelection(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRuns]]),
DeserializeTestRunReport(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRunReport]]));

@ -113,7 +113,7 @@ namespace AZ
if (!memoryView.IsValid())
{
RHI::ResultCode::OutOfMemory;
return RHI::ResultCode::OutOfMemory;
}
buffer->SetDescriptor(descriptor);

@ -108,6 +108,7 @@ ly_add_target(
BUILD_DEPENDENCIES
PUBLIC
AZ::AzCore
AZ::AzTest
AZ::AzFramework
Gem::Atom_RHI.Reflect
Gem::Atom_RHI_Vulkan.Reflect
@ -130,6 +131,7 @@ ly_add_target(
PRIVATE
Gem::Atom_RHI_Vulkan.Private.Static
Gem::Atom_RHI.Public
${VULKAN_VALIDATION_LAYER}
)
ly_add_target(

@ -8,7 +8,7 @@
#pragma once
#include <AzCore/base.h>
#include <Azcore/PlatformIncl.h>
#include <AzCore/PlatformIncl.h>
#include <AzCore/std/algorithm.h>
#include <vulkan/vulkan.h>
#include <limits.h>

@ -7,3 +7,4 @@
#
set(PAL_TRAIT_ATOM_RHI_VULKAN_SUPPORTED TRUE)
set(VULKAN_VALIDATION_LAYER 3rdParty::vulkan-validationlayers)

@ -9,6 +9,7 @@
#include <RHI/Instance.h>
#include <Atom/RHI.Loader/FunctionLoader.h>
#include <AzCore/Debug/Trace.h>
#include <AzTest/Utils.h>
namespace AZ
{
@ -45,8 +46,21 @@ namespace AZ
bool Instance::Init(const Descriptor& descriptor)
{
m_descriptor = descriptor;
m_descriptor = descriptor;
if (GetValidationMode() != RHI::ValidationMode::Disabled)
{
//This env var (VK_LAYER_PATH) is used by the drivers to look for VkLayer_khronos_validation.dll
AZ::Test::SetEnv("VK_LAYER_PATH", AZ::Test::GetCurrentExecutablePath().c_str(), 1);
RawStringList validationLayers = Debug::GetValidationLayers();
m_descriptor.m_optionalLayers.insert(m_descriptor.m_requiredLayers.end(), validationLayers.begin(), validationLayers.end());
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
}
#if defined(AZ_VULKAN_USE_DEBUG_LABELS)
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
#endif
m_functionLoader = FunctionLoader::Create();
if (!m_functionLoader->Init())
{
@ -88,17 +102,6 @@ namespace AZ
instanceCreateInfo.pApplicationInfo = &appInfo;
StringList instanceLayerNames = GetInstanceLayerNames();
if (GetValidationMode() != RHI::ValidationMode::Disabled)
{
RawStringList validationLayers = Debug::GetValidationLayers();
m_descriptor.m_optionalLayers.insert(m_descriptor.m_requiredLayers.end(), validationLayers.begin(), validationLayers.end());
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
}
#if defined(AZ_VULKAN_USE_DEBUG_LABELS)
m_descriptor.m_optionalExtensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
#endif
RawStringList optionalLayers = FilterList(m_descriptor.m_optionalLayers, instanceLayerNames);
m_descriptor.m_requiredLayers.insert(m_descriptor.m_requiredLayers.end(), optionalLayers.begin(), optionalLayers.end());

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

Loading…
Cancel
Save