From 6993ed5c5282b8af4113a37d0d041567eb048be1 Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Thu, 8 Dec 2022 14:23:49 +0000 Subject: [PATCH] Reduce binaries sizes 2/n Observed about 50MB reduction in overall binaries size (directory build)) when building all targets with MSVC (Visual Studio 2022 17.3.0 preview 6) using Debug 64 configuration. Signed-off-by: Kamil Kopryk --- .../source/cmdlist/cmdlist_hw_immediate.h | 2 +- level_zero/core/source/event/event.h | 4 +- level_zero/core/source/image/image_formats.h | 446 ++++++++-------- opencl/source/built_ins/built_in_ops_vme.h | 6 +- opencl/source/tracing/tracing_notify.h | 6 +- .../context/driver_diagnostics_tests.h | 2 +- .../offline_compiler/source/ocloc_interface.h | 18 +- shared/offline_compiler/source/queries.h | 4 +- shared/source/aub_mem_dump/aub_mem_dump.h | 2 +- .../aub_mem_dump/page_table_entry_bits.h | 10 +- shared/source/built_ins/built_in_ops_base.h | 40 +- shared/source/built_ins/built_ins.h | 4 +- .../built_ins/builtinops/built_in_ops.h | 4 +- .../walker_partition_interface.h | 26 +- .../source/command_stream/csr_definitions.h | 16 +- .../command_stream/csr_properties_flags.h | 8 +- .../command_stream/scratch_space_controller.h | 2 +- .../compiler_interface/compiler_options.h | 64 +-- .../compiler_warnings/compiler_warnings.h | 2 +- .../intermediate_representations.h | 6 +- .../compiler_interface/oclc_extensions.h | 4 +- shared/source/device_binary_format/ar/ar.h | 10 +- shared/source/device_binary_format/elf/elf.h | 66 +-- .../source/device_binary_format/elf/ocl_elf.h | 14 +- .../device_binary_format/elf/zebin_elf.h | 494 +++++++++--------- .../elf/zeinfo_enum_lookup.h | 206 ++++---- .../device_binary_format/zebin_decoder.h | 2 +- .../direct_submission/direct_submission_hw.h | 4 +- .../direct_submission_hw_diagnostic_mode.h | 6 +- .../source/gmm_helper/cache_settings_helper.h | 2 +- shared/source/helpers/engine_node_helper.h | 4 +- shared/source/helpers/get_info.h | 4 +- shared/source/helpers/hw_walk_order.h | 24 +- shared/source/helpers/kmd_notify_properties.h | 4 +- shared/source/helpers/neo_driver_version.h | 4 +- .../source/helpers/pipeline_select_helper.h | 8 +- shared/source/helpers/register_offsets.h | 62 +-- shared/source/helpers/string_helpers.h | 4 +- shared/source/indirect_heap/indirect_heap.h | 2 +- shared/source/kernel/grf_config.h | 8 +- shared/source/kernel/implicit_args.h | 2 +- shared/source/kernel/kernel_arg_metadata.h | 34 +- shared/source/kernel/kernel_properties.h | 14 +- .../unified_memory/usm_memory_support.h | 10 +- .../common/helpers/cmd_buffer_validator.h | 4 +- .../test/common/helpers/memory_management.h | 10 +- shared/test/common/helpers/ult_limits.h | 2 +- .../common/mocks/mock_graphics_allocation.h | 4 +- shared/test/common/mocks/mock_wddm.h | 2 +- .../test_configuration/aub_tests/test_mode.h | 2 +- .../test_configuration/unit_tests/test_mode.h | 2 +- .../xe_hpc_core/pvc/product_configs_pvc.h | 2 +- .../xe_hpg_core/dg2/product_configs_dg2.h | 2 +- 53 files changed, 847 insertions(+), 847 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h index 15fe1a8010..c14a34dcdc 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h @@ -19,7 +19,7 @@ namespace L0 { struct EventPool; struct Event; -constexpr size_t maxImmediateCommandSize = 4 * MemoryConstants::kiloByte; +inline constexpr size_t maxImmediateCommandSize = 4 * MemoryConstants::kiloByte; template struct CommandListCoreFamilyImmediate : public CommandListCoreFamily { diff --git a/level_zero/core/source/event/event.h b/level_zero/core/source/event/event.h index 41985182b4..a129925a05 100644 --- a/level_zero/core/source/event/event.h +++ b/level_zero/core/source/event/event.h @@ -30,8 +30,8 @@ struct DriverHandleImp; struct Device; namespace EventPacketsCount { -constexpr uint32_t maxKernelSplit = 3; -constexpr uint32_t eventPackets = maxKernelSplit * NEO ::TimestampPacketSizeControl::preferredPacketCount; +inline constexpr uint32_t maxKernelSplit = 3; +inline constexpr uint32_t eventPackets = maxKernelSplit * NEO ::TimestampPacketSizeControl::preferredPacketCount; } // namespace EventPacketsCount struct Event : _ze_event_handle_t { diff --git a/level_zero/core/source/image/image_formats.h b/level_zero/core/source/image/image_formats.h index 7781ea5a62..57686a2de5 100644 --- a/level_zero/core/source/image/image_formats.h +++ b/level_zero/core/source/image/image_formats.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,237 +13,237 @@ namespace L0 { namespace ImageFormats { -constexpr uint32_t ZE_IMAGE_FORMAT_RENDER_LAYOUT_MAX = 43u; +inline constexpr uint32_t ZE_IMAGE_FORMAT_RENDER_LAYOUT_MAX = 43u; using FormatTypes = std::array; -constexpr std::array surfaceFormatsForRedescribe = { +inline constexpr std::array surfaceFormatsForRedescribe = { {{GMM_FORMAT_R8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1}, {GMM_FORMAT_R16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_UINT, 0, 1, 2, 2}, {GMM_FORMAT_R32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_UINT, 0, 1, 4, 4}, {GMM_FORMAT_R32G32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_UINT, 0, 2, 4, 8}, {GMM_FORMAT_R32G32B32A32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UINT, 0, 4, 4, 16}}}; -constexpr FormatTypes layout8 = {{{GMM_FORMAT_R8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1}, - {GMM_FORMAT_R8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_SINT, 0, 1, 1, 1}, - {GMM_FORMAT_R8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UNORM, 0, 1, 1, 1}, - {GMM_FORMAT_R8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_SNORM, 0, 1, 1, 1}, - {GMM_FORMAT_R8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1}}}; -constexpr FormatTypes layout88 = {{{GMM_FORMAT_R8G8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UINT, 0, 2, 1, 2}, - {GMM_FORMAT_R8G8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_SINT, 0, 2, 1, 2}, - {GMM_FORMAT_R8G8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UNORM, 0, 2, 1, 2}, - {GMM_FORMAT_R8G8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_SNORM, 0, 2, 1, 2}, - {GMM_FORMAT_R8G8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UINT, 0, 2, 1, 2}}}; -constexpr FormatTypes layout8888 = {{{GMM_FORMAT_R8G8B8A8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UINT, 0, 4, 1, 4}, - {GMM_FORMAT_R8G8B8A8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SINT, 0, 4, 1, 4}, - {GMM_FORMAT_R8G8B8A8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_R8G8B8A8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SNORM, 0, 4, 1, 4}, - {GMM_FORMAT_R8G8B8A8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UINT, 0, 4, 1, 4}}}; -constexpr FormatTypes layout16 = {{{GMM_FORMAT_R16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_UINT, 0, 1, 2, 2}, - {GMM_FORMAT_R16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_SINT, 0, 1, 2, 2}, - {GMM_FORMAT_R16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_UNORM, 0, 1, 2, 2}, - {GMM_FORMAT_R16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_SNORM, 0, 1, 2, 2}, - {GMM_FORMAT_R16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_FLOAT, 0, 1, 2, 2}}}; -constexpr FormatTypes layout1616 = {{{GMM_FORMAT_R16G16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_UINT, 0, 2, 2, 4}, - {GMM_FORMAT_R16G16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_SINT, 0, 2, 2, 4}, - {GMM_FORMAT_R16G16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_UNORM, 0, 2, 2, 4}, - {GMM_FORMAT_R16G16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_SNORM, 0, 2, 2, 4}, - {GMM_FORMAT_R16G16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_FLOAT, 0, 2, 2, 4}}}; -constexpr FormatTypes layout16161616 = {{{GMM_FORMAT_R16G16B16A16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UINT, 0, 4, 2, 8}, - {GMM_FORMAT_R16G16B16A16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SINT, 0, 4, 2, 8}, - {GMM_FORMAT_R16G16B16A16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_R16G16B16A16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SNORM, 0, 4, 2, 8}, - {GMM_FORMAT_R16G16B16A16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_FLOAT, 0, 4, 2, 8}}}; -constexpr FormatTypes layout32 = {{{GMM_FORMAT_R32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_UINT, 0, 1, 4, 4}, - {GMM_FORMAT_R32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_SINT, 0, 1, 4, 4}, - {GMM_FORMAT_R32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_UNORM, 0, 1, 4, 4}, - {GMM_FORMAT_R32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_SNORM, 0, 1, 4, 4}, - {GMM_FORMAT_R32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_FLOAT, 0, 1, 4, 4}}}; -constexpr FormatTypes layout3232 = {{{GMM_FORMAT_R32G32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_UINT, 0, 2, 4, 8}, - {GMM_FORMAT_R32G32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_SINT, 0, 2, 4, 8}, - {GMM_FORMAT_R32G32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_UNORM, 0, 2, 4, 8}, - {GMM_FORMAT_R32G32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_SNORM, 0, 2, 4, 8}, - {GMM_FORMAT_R32G32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_FLOAT, 0, 2, 4, 8}}}; -constexpr FormatTypes layout32323232 = {{{GMM_FORMAT_R32G32B32A32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UINT, 0, 4, 4, 16}, - {GMM_FORMAT_R32G32B32A32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SINT, 0, 4, 4, 16}, - {GMM_FORMAT_R32G32B32A32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UNORM, 0, 4, 4, 16}, - {GMM_FORMAT_R32G32B32A32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SNORM, 0, 4, 4, 16}, - {GMM_FORMAT_R32G32B32A32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_FLOAT, 0, 4, 4, 16}}}; -constexpr FormatTypes layout1010102 = {{{GMM_FORMAT_R10G10B10A2_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UINT, 0, 4, 1, 4}, - {GMM_FORMAT_R10G10B10A2_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_SINT, 0, 4, 1, 4}, - {GMM_FORMAT_R10G10B10A2_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_R10G10B10A2_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_SNORM, 0, 4, 1, 4}, - {GMM_FORMAT_R10G10B10A2_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UINT, 0, 4, 1, 4}}}; -constexpr FormatTypes layout111110 = {{{GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, - {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, - {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, - {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, - {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}}}; -constexpr FormatTypes layout565 = {{{GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, - {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, - {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, - {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, - {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}}}; -constexpr FormatTypes layout5551 = {{{GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, - {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, - {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, - {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, - {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}}}; -constexpr FormatTypes layout4444 = {{{GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, - {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, - {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, - {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, - {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}}}; -constexpr FormatTypes layoutY8 = {{{GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, - {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, - {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, - {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, - {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutNV12 = {{{GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutYUYV = {{{GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}}}; -constexpr FormatTypes layoutVYUY = {{{GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}}}; -constexpr FormatTypes layoutYVYU = {{{GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}}}; -constexpr FormatTypes layoutUYVY = {{{GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}}}; -constexpr FormatTypes layoutAYUV = {{{GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}}}; -constexpr FormatTypes layoutY410 = {{{GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, - {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}}}; -constexpr FormatTypes layoutY16 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutP010 = {{{GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; -constexpr FormatTypes layoutP012 = {{{GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; -constexpr FormatTypes layoutP016 = {{{GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, - {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; -constexpr FormatTypes layoutY216 = {{{GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; -constexpr FormatTypes layoutP216 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutP8 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutYUY2 = {{{GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, - {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}}}; -constexpr FormatTypes layoutA8P8 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutIA44 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutAI44 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutY416 = {{{GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; -constexpr FormatTypes layoutY210 = {{{GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, - {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; -constexpr FormatTypes layoutI420 = {{{GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutYV12 = {{{GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, - {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; -constexpr FormatTypes layout400P = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layout422H = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layout422V = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layout444P = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, - {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; -constexpr FormatTypes layoutRGBP = {{{GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}}}; -constexpr FormatTypes layoutBGRP = {{{GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, - {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}}}; +inline constexpr FormatTypes layout8 = {{{GMM_FORMAT_R8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1}, + {GMM_FORMAT_R8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_SINT, 0, 1, 1, 1}, + {GMM_FORMAT_R8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UNORM, 0, 1, 1, 1}, + {GMM_FORMAT_R8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_SNORM, 0, 1, 1, 1}, + {GMM_FORMAT_R8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layout88 = {{{GMM_FORMAT_R8G8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UINT, 0, 2, 1, 2}, + {GMM_FORMAT_R8G8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_SINT, 0, 2, 1, 2}, + {GMM_FORMAT_R8G8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UNORM, 0, 2, 1, 2}, + {GMM_FORMAT_R8G8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_SNORM, 0, 2, 1, 2}, + {GMM_FORMAT_R8G8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8_UINT, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layout8888 = {{{GMM_FORMAT_R8G8B8A8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UINT, 0, 4, 1, 4}, + {GMM_FORMAT_R8G8B8A8_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SINT, 0, 4, 1, 4}, + {GMM_FORMAT_R8G8B8A8_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_R8G8B8A8_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SNORM, 0, 4, 1, 4}, + {GMM_FORMAT_R8G8B8A8_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UINT, 0, 4, 1, 4}}}; +inline constexpr FormatTypes layout16 = {{{GMM_FORMAT_R16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_UINT, 0, 1, 2, 2}, + {GMM_FORMAT_R16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_SINT, 0, 1, 2, 2}, + {GMM_FORMAT_R16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_UNORM, 0, 1, 2, 2}, + {GMM_FORMAT_R16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_SNORM, 0, 1, 2, 2}, + {GMM_FORMAT_R16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16_FLOAT, 0, 1, 2, 2}}}; +inline constexpr FormatTypes layout1616 = {{{GMM_FORMAT_R16G16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_UINT, 0, 2, 2, 4}, + {GMM_FORMAT_R16G16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_SINT, 0, 2, 2, 4}, + {GMM_FORMAT_R16G16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_UNORM, 0, 2, 2, 4}, + {GMM_FORMAT_R16G16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_SNORM, 0, 2, 2, 4}, + {GMM_FORMAT_R16G16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16_FLOAT, 0, 2, 2, 4}}}; +inline constexpr FormatTypes layout16161616 = {{{GMM_FORMAT_R16G16B16A16_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UINT, 0, 4, 2, 8}, + {GMM_FORMAT_R16G16B16A16_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SINT, 0, 4, 2, 8}, + {GMM_FORMAT_R16G16B16A16_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_R16G16B16A16_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SNORM, 0, 4, 2, 8}, + {GMM_FORMAT_R16G16B16A16_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_FLOAT, 0, 4, 2, 8}}}; +inline constexpr FormatTypes layout32 = {{{GMM_FORMAT_R32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_UINT, 0, 1, 4, 4}, + {GMM_FORMAT_R32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_SINT, 0, 1, 4, 4}, + {GMM_FORMAT_R32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_UNORM, 0, 1, 4, 4}, + {GMM_FORMAT_R32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_SNORM, 0, 1, 4, 4}, + {GMM_FORMAT_R32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32_FLOAT, 0, 1, 4, 4}}}; +inline constexpr FormatTypes layout3232 = {{{GMM_FORMAT_R32G32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_UINT, 0, 2, 4, 8}, + {GMM_FORMAT_R32G32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_SINT, 0, 2, 4, 8}, + {GMM_FORMAT_R32G32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_UNORM, 0, 2, 4, 8}, + {GMM_FORMAT_R32G32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_SNORM, 0, 2, 4, 8}, + {GMM_FORMAT_R32G32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32_FLOAT, 0, 2, 4, 8}}}; +inline constexpr FormatTypes layout32323232 = {{{GMM_FORMAT_R32G32B32A32_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UINT, 0, 4, 4, 16}, + {GMM_FORMAT_R32G32B32A32_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SINT, 0, 4, 4, 16}, + {GMM_FORMAT_R32G32B32A32_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UNORM, 0, 4, 4, 16}, + {GMM_FORMAT_R32G32B32A32_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SNORM, 0, 4, 4, 16}, + {GMM_FORMAT_R32G32B32A32_FLOAT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_FLOAT, 0, 4, 4, 16}}}; +inline constexpr FormatTypes layout1010102 = {{{GMM_FORMAT_R10G10B10A2_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UINT, 0, 4, 1, 4}, + {GMM_FORMAT_R10G10B10A2_SINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_SINT, 0, 4, 1, 4}, + {GMM_FORMAT_R10G10B10A2_UNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_R10G10B10A2_SNORM_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_SNORM, 0, 4, 1, 4}, + {GMM_FORMAT_R10G10B10A2_UINT_TYPE, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UINT, 0, 4, 1, 4}}}; +inline constexpr FormatTypes layout111110 = {{{GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, + {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, + {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, + {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}, + {GMM_FORMAT_R11G11B10_FLOAT, NEO::GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT, 0, 3, 0, 4}}}; +inline constexpr FormatTypes layout565 = {{{GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, + {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, + {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, + {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}, + {GMM_FORMAT_B5G6R5_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM, 0, 3, 0, 2}}}; +inline constexpr FormatTypes layout5551 = {{{GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, + {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, + {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, + {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}, + {GMM_FORMAT_B5G5R5A1_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM, 0, 4, 0, 2}}}; +inline constexpr FormatTypes layout4444 = {{{GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, + {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, + {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, + {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}, + {GMM_FORMAT_B4G4R4A4_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM, 0, 4, 1, 2}}}; +inline constexpr FormatTypes layoutY8 = {{{GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, + {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, + {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, + {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}, + {GMM_FORMAT_Y8_UNORM, NEO::GFX3DSTATE_SURFACEFORMAT_Y8_UNORM, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutNV12 = {{{GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_NV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutYUYV = {{{GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layoutVYUY = {{{GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUVY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layoutYVYU = {{{GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPUV, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layoutUYVY = {{{GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_SWAPY, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layoutAYUV = {{{GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_AYUV, NEO::GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM, 0, 4, 1, 4}}}; +inline constexpr FormatTypes layoutY410 = {{{GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}, + {GMM_FORMAT_Y410, NEO::GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM, 0, 4, 1, 4}}}; +inline constexpr FormatTypes layoutY16 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutP010 = {{{GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P010, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; +inline constexpr FormatTypes layoutP012 = {{{GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P012, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; +inline constexpr FormatTypes layoutP016 = {{{GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}, + {GMM_FORMAT_P016, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_16, 0, 2, 1, 1}}}; +inline constexpr FormatTypes layoutY216 = {{{GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y216, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; +inline constexpr FormatTypes layoutP216 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutP8 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutYUY2 = {{{GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}, + {GMM_FORMAT_YCRCB_NORMAL, NEO::GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL, 0, 2, 1, 2}}}; +inline constexpr FormatTypes layoutA8P8 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutIA44 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutAI44 = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutY416 = {{{GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y416, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; +inline constexpr FormatTypes layoutY210 = {{{GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}, + {GMM_FORMAT_Y210, NEO::GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM, 0, 4, 2, 8}}}; +inline constexpr FormatTypes layoutI420 = {{{GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_I420, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutYV12 = {{{GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}, + {GMM_FORMAT_YV12, NEO::GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layout400P = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layout422H = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layout422V = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layout444P = {{{GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}, + {GMM_FORMAT_INVALID, NEO::NUM_GFX3DSTATE_SURFACEFORMATS, 0, 1, 1, 1}}}; +inline constexpr FormatTypes layoutRGBP = {{{GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_RGBP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}}}; +inline constexpr FormatTypes layoutBGRP = {{{GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}, + {GMM_FORMAT_BGRP, NEO::GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 3, 1, 3}}}; -constexpr std::array formats = {layout8, layout16, layout32, layout88, layout8888, layout1616, layout16161616, layout3232, layout32323232, layout1010102, - layout111110, layout565, layout5551, layout4444, layoutY8, layoutNV12, layoutYUYV, layoutVYUY, layoutYVYU, layoutUYVY, - layoutAYUV, layoutP010, layoutY410, layoutP012, layoutY16, layoutP016, layoutY216, layoutP216, layoutP8, layoutYUY2, - layoutA8P8, layoutIA44, layoutAI44, layoutY416, layoutY210, layoutI420, layoutYV12, layout400P, layout422H, layout422V, - layout444P, layoutRGBP, layoutBGRP}; +inline constexpr std::array formats = {layout8, layout16, layout32, layout88, layout8888, layout1616, layout16161616, layout3232, layout32323232, layout1010102, + layout111110, layout565, layout5551, layout4444, layoutY8, layoutNV12, layoutYUYV, layoutVYUY, layoutYVYU, layoutUYVY, + layoutAYUV, layoutP010, layoutY410, layoutP012, layoutY16, layoutP016, layoutY216, layoutP216, layoutP8, layoutYUY2, + layoutA8P8, layoutIA44, layoutAI44, layoutY416, layoutY210, layoutI420, layoutYV12, layout400P, layout422H, layout422V, + layout444P, layoutRGBP, layoutBGRP}; } // namespace ImageFormats } // namespace L0 diff --git a/opencl/source/built_ins/built_in_ops_vme.h b/opencl/source/built_ins/built_in_ops_vme.h index b304fa95dd..edcbbab6a8 100644 --- a/opencl/source/built_ins/built_in_ops_vme.h +++ b/opencl/source/built_ins/built_in_ops_vme.h @@ -13,8 +13,8 @@ namespace EBuiltInOps { using Type = uint32_t; -constexpr Type VmeBlockMotionEstimateIntel{MaxCoreValue + 1}; -constexpr Type VmeBlockAdvancedMotionEstimateCheckIntel{MaxCoreValue + 2}; -constexpr Type VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel{MaxCoreValue + 3}; +inline constexpr Type VmeBlockMotionEstimateIntel{MaxCoreValue + 1}; +inline constexpr Type VmeBlockAdvancedMotionEstimateCheckIntel{MaxCoreValue + 2}; +inline constexpr Type VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel{MaxCoreValue + 3}; } // namespace EBuiltInOps } // namespace NEO diff --git a/opencl/source/tracing/tracing_notify.h b/opencl/source/tracing/tracing_notify.h index 59514e2e43..6f24e6e596 100644 --- a/opencl/source/tracing/tracing_notify.h +++ b/opencl/source/tracing/tracing_notify.h @@ -50,10 +50,10 @@ typedef enum _tracing_notify_state_t { TRACING_NOTIFY_STATE_EXIT_CALLED = 2, } tracing_notify_state_t; -constexpr size_t TRACING_MAX_HANDLE_COUNT = 16; +inline constexpr size_t TRACING_MAX_HANDLE_COUNT = 16; -constexpr uint32_t TRACING_STATE_ENABLED_BIT = 0x80000000u; -constexpr uint32_t TRACING_STATE_LOCKED_BIT = 0x40000000u; +inline constexpr uint32_t TRACING_STATE_ENABLED_BIT = 0x80000000u; +inline constexpr uint32_t TRACING_STATE_LOCKED_BIT = 0x40000000u; extern std::atomic tracingState; extern TracingHandle *tracingHandle[TRACING_MAX_HANDLE_COUNT]; diff --git a/opencl/test/unit_test/context/driver_diagnostics_tests.h b/opencl/test/unit_test/context/driver_diagnostics_tests.h index ea3f3b7291..774f98789d 100644 --- a/opencl/test/unit_test/context/driver_diagnostics_tests.h +++ b/opencl/test/unit_test/context/driver_diagnostics_tests.h @@ -24,7 +24,7 @@ using namespace NEO; -constexpr int maxHintCounter = 6; +inline constexpr int maxHintCounter = 6; bool containsHint(const char *providedHint, char *userData); diff --git a/shared/offline_compiler/source/ocloc_interface.h b/shared/offline_compiler/source/ocloc_interface.h index 3970c4bce0..29b649c064 100644 --- a/shared/offline_compiler/source/ocloc_interface.h +++ b/shared/offline_compiler/source/ocloc_interface.h @@ -17,15 +17,15 @@ void printOclocCmdLine(const std::vector &args); void printHelp(OclocArgHelper *helper); namespace CommandNames { -constexpr NEO::ConstStringRef compile = "compile"; -constexpr NEO::ConstStringRef link = "link"; -constexpr NEO::ConstStringRef disassemble = "disasm"; -constexpr NEO::ConstStringRef assemble = "asm"; -constexpr NEO::ConstStringRef multi = "multi"; -constexpr NEO::ConstStringRef validate = "validate"; -constexpr NEO::ConstStringRef query = "query"; -constexpr NEO::ConstStringRef ids = "ids"; -constexpr NEO::ConstStringRef concat = "concat"; +inline constexpr NEO::ConstStringRef compile = "compile"; +inline constexpr NEO::ConstStringRef link = "link"; +inline constexpr NEO::ConstStringRef disassemble = "disasm"; +inline constexpr NEO::ConstStringRef assemble = "asm"; +inline constexpr NEO::ConstStringRef multi = "multi"; +inline constexpr NEO::ConstStringRef validate = "validate"; +inline constexpr NEO::ConstStringRef query = "query"; +inline constexpr NEO::ConstStringRef ids = "ids"; +inline constexpr NEO::ConstStringRef concat = "concat"; } // namespace CommandNames namespace Commands { int compile(OclocArgHelper *argHelper, const std::vector &args); diff --git a/shared/offline_compiler/source/queries.h b/shared/offline_compiler/source/queries.h index 4e7bb86311..3bef83ea6a 100644 --- a/shared/offline_compiler/source/queries.h +++ b/shared/offline_compiler/source/queries.h @@ -11,7 +11,7 @@ namespace NEO { namespace Queries { -constexpr ConstStringRef queryNeoRevision = "NEO_REVISION"; -constexpr ConstStringRef queryOCLDriverVersion = "OCL_DRIVER_VERSION"; +inline constexpr ConstStringRef queryNeoRevision = "NEO_REVISION"; +inline constexpr ConstStringRef queryOCLDriverVersion = "OCL_DRIVER_VERSION"; }; // namespace Queries } // namespace NEO diff --git a/shared/source/aub_mem_dump/aub_mem_dump.h b/shared/source/aub_mem_dump/aub_mem_dump.h index c476b2d8ac..754104019d 100644 --- a/shared/source/aub_mem_dump/aub_mem_dump.h +++ b/shared/source/aub_mem_dump/aub_mem_dump.h @@ -19,7 +19,7 @@ class AubHelper; namespace AubMemDump { #include "aub_services.h" -constexpr uint32_t rcsRegisterBase = 0x2000; +inline constexpr uint32_t rcsRegisterBase = 0x2000; #ifndef BIT #define BIT(x) (((uint64_t)1) << (x)) diff --git a/shared/source/aub_mem_dump/page_table_entry_bits.h b/shared/source/aub_mem_dump/page_table_entry_bits.h index b66206eb9c..5ac34b7c59 100644 --- a/shared/source/aub_mem_dump/page_table_entry_bits.h +++ b/shared/source/aub_mem_dump/page_table_entry_bits.h @@ -11,9 +11,9 @@ #include namespace PageTableEntry { -constexpr uint32_t presentBit = 0; -constexpr uint32_t writableBit = 1; -constexpr uint32_t userSupervisorBit = 2; -constexpr uint32_t localMemoryBit = 11; -constexpr uint64_t nonValidBits = std::numeric_limits::max(); +inline constexpr uint32_t presentBit = 0; +inline constexpr uint32_t writableBit = 1; +inline constexpr uint32_t userSupervisorBit = 2; +inline constexpr uint32_t localMemoryBit = 11; +inline constexpr uint64_t nonValidBits = std::numeric_limits::max(); } // namespace PageTableEntry diff --git a/shared/source/built_ins/built_in_ops_base.h b/shared/source/built_ins/built_in_ops_base.h index 3a18bc1985..32f00df5f6 100644 --- a/shared/source/built_ins/built_in_ops_base.h +++ b/shared/source/built_ins/built_in_ops_base.h @@ -14,24 +14,24 @@ namespace EBuiltInOps { using Type = uint32_t; -constexpr Type AuxTranslation{0}; -constexpr Type CopyBufferToBuffer{1}; -constexpr Type CopyBufferToBufferStateless{2}; -constexpr Type CopyBufferRect{3}; -constexpr Type CopyBufferRectStateless{4}; -constexpr Type FillBuffer{5}; -constexpr Type FillBufferStateless{6}; -constexpr Type CopyBufferToImage3d{7}; -constexpr Type CopyBufferToImage3dStateless{8}; -constexpr Type CopyImage3dToBuffer{9}; -constexpr Type CopyImage3dToBufferStateless{10}; -constexpr Type CopyImageToImage1d{11}; -constexpr Type CopyImageToImage2d{12}; -constexpr Type CopyImageToImage3d{13}; -constexpr Type FillImage1d{14}; -constexpr Type FillImage2d{15}; -constexpr Type FillImage3d{16}; -constexpr Type QueryKernelTimestamps{17}; +inline constexpr Type AuxTranslation{0}; +inline constexpr Type CopyBufferToBuffer{1}; +inline constexpr Type CopyBufferToBufferStateless{2}; +inline constexpr Type CopyBufferRect{3}; +inline constexpr Type CopyBufferRectStateless{4}; +inline constexpr Type FillBuffer{5}; +inline constexpr Type FillBufferStateless{6}; +inline constexpr Type CopyBufferToImage3d{7}; +inline constexpr Type CopyBufferToImage3dStateless{8}; +inline constexpr Type CopyImage3dToBuffer{9}; +inline constexpr Type CopyImage3dToBufferStateless{10}; +inline constexpr Type CopyImageToImage1d{11}; +inline constexpr Type CopyImageToImage2d{12}; +inline constexpr Type CopyImageToImage3d{13}; +inline constexpr Type FillImage1d{14}; +inline constexpr Type FillImage2d{15}; +inline constexpr Type FillImage3d{16}; +inline constexpr Type QueryKernelTimestamps{17}; constexpr bool isStateless(Type type) { constexpr std::array statelessBuiltins{{CopyBufferToBufferStateless, CopyBufferRectStateless, FillBufferStateless, CopyBufferToImage3dStateless, CopyImage3dToBufferStateless}}; @@ -43,7 +43,7 @@ constexpr bool isStateless(Type type) { return false; } -constexpr Type MaxBaseValue{17}; -constexpr Type COUNT{64}; +inline constexpr Type MaxBaseValue{17}; +inline constexpr Type COUNT{64}; } // namespace EBuiltInOps } // namespace NEO diff --git a/shared/source/built_ins/built_ins.h b/shared/source/built_ins/built_ins.h index 3058c940c0..e45f8fef93 100644 --- a/shared/source/built_ins/built_ins.h +++ b/shared/source/built_ins/built_ins.h @@ -25,14 +25,14 @@ class Device; class SipKernel; class MemoryManager; -constexpr ConstStringRef mediaKernelsBuildOptionsList[] = { +inline constexpr ConstStringRef mediaKernelsBuildOptionsList[] = { "-D cl_intel_device_side_advanced_vme_enable", "-D cl_intel_device_side_avc_vme_enable", "-D cl_intel_device_side_vme_enable", "-D cl_intel_media_block_io", CompilerOptions::fastRelaxedMath}; -constexpr CompilerOptions::ConstConcatenation<> mediaKernelsBuildOptions{mediaKernelsBuildOptionsList}; +inline constexpr CompilerOptions::ConstConcatenation<> mediaKernelsBuildOptions{mediaKernelsBuildOptionsList}; struct BuiltinCode { enum class ECodeType { diff --git a/shared/source/built_ins/builtinops/built_in_ops.h b/shared/source/built_ins/builtinops/built_in_ops.h index d363fee759..fa31b6e064 100644 --- a/shared/source/built_ins/builtinops/built_in_ops.h +++ b/shared/source/built_ins/builtinops/built_in_ops.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,6 @@ namespace NEO { namespace EBuiltInOps { -constexpr Type MaxCoreValue{MaxBaseValue}; +inline constexpr Type MaxCoreValue{MaxBaseValue}; } } // namespace NEO \ No newline at end of file diff --git a/shared/source/command_container/walker_partition_interface.h b/shared/source/command_container/walker_partition_interface.h index 3de29af39c..2f888d80e4 100644 --- a/shared/source/command_container/walker_partition_interface.h +++ b/shared/source/command_container/walker_partition_interface.h @@ -34,17 +34,17 @@ struct WalkerPartitionArgs { bool forceExecutionOnSingleTile = false; }; -constexpr uint32_t wparidCCSOffset = 0x221C; -constexpr uint32_t addressOffsetCCSOffset = 0x23B4; -constexpr uint32_t predicationMaskCCSOffset = 0x21FC; +inline constexpr uint32_t wparidCCSOffset = 0x221C; +inline constexpr uint32_t addressOffsetCCSOffset = 0x23B4; +inline constexpr uint32_t predicationMaskCCSOffset = 0x21FC; -constexpr uint32_t generalPurposeRegister0 = 0x2600; -constexpr uint32_t generalPurposeRegister1 = 0x2608; -constexpr uint32_t generalPurposeRegister2 = 0x2610; -constexpr uint32_t generalPurposeRegister3 = 0x2618; -constexpr uint32_t generalPurposeRegister4 = 0x2620; -constexpr uint32_t generalPurposeRegister5 = 0x2628; -constexpr uint32_t generalPurposeRegister6 = 0x2630; +inline constexpr uint32_t generalPurposeRegister0 = 0x2600; +inline constexpr uint32_t generalPurposeRegister1 = 0x2608; +inline constexpr uint32_t generalPurposeRegister2 = 0x2610; +inline constexpr uint32_t generalPurposeRegister3 = 0x2618; +inline constexpr uint32_t generalPurposeRegister4 = 0x2620; +inline constexpr uint32_t generalPurposeRegister5 = 0x2628; +inline constexpr uint32_t generalPurposeRegister6 = 0x2630; struct BatchBufferControlData { uint32_t partitionCount = 0u; @@ -52,18 +52,18 @@ struct BatchBufferControlData { uint32_t inTileCount = 0u; uint32_t finalSyncTileCount = 0u; }; -constexpr size_t dynamicPartitioningFieldsForCleanupCount = sizeof(BatchBufferControlData) / sizeof(uint32_t) - 1; +inline constexpr size_t dynamicPartitioningFieldsForCleanupCount = sizeof(BatchBufferControlData) / sizeof(uint32_t) - 1; struct StaticPartitioningControlSection { uint32_t synchronizeBeforeWalkerCounter = 0; uint32_t synchronizeAfterWalkerCounter = 0; uint32_t finalSyncTileCounter = 0; }; -constexpr size_t staticPartitioningFieldsForCleanupCount = sizeof(StaticPartitioningControlSection) / sizeof(uint32_t) - 1; +inline constexpr size_t staticPartitioningFieldsForCleanupCount = sizeof(StaticPartitioningControlSection) / sizeof(uint32_t) - 1; struct BarrierControlSection { uint32_t crossTileSyncCount = 0u; uint32_t finalSyncTileCount = 0; }; -constexpr size_t barrierControlSectionFieldsForCleanupCount = sizeof(BarrierControlSection) / sizeof(uint32_t) - 1; +inline constexpr size_t barrierControlSectionFieldsForCleanupCount = sizeof(BarrierControlSection) / sizeof(uint32_t) - 1; } // namespace WalkerPartition diff --git a/shared/source/command_stream/csr_definitions.h b/shared/source/command_stream/csr_definitions.h index 3fbb959c37..b64301a5ac 100644 --- a/shared/source/command_stream/csr_definitions.h +++ b/shared/source/command_stream/csr_definitions.h @@ -29,23 +29,23 @@ namespace CSRequirements { // then command buffer is aligned to cacheline that can take up to 63 bytes // to be sure everything fits minimal size is at 2 x cacheline. -constexpr auto minCommandQueueCommandStreamSize = 2 * MemoryConstants::cacheLineSize; -constexpr auto csOverfetchSize = MemoryConstants::pageSize; +inline constexpr auto minCommandQueueCommandStreamSize = 2 * MemoryConstants::cacheLineSize; +inline constexpr auto csOverfetchSize = MemoryConstants::pageSize; } // namespace CSRequirements namespace TimeoutControls { -constexpr int64_t maxTimeout = std::numeric_limits::max(); +inline constexpr int64_t maxTimeout = std::numeric_limits::max(); } namespace QueueSliceCount { -constexpr uint64_t defaultSliceCount = 0; +inline constexpr uint64_t defaultSliceCount = 0; } namespace L3CachingSettings { -constexpr uint32_t l3CacheOn = 0u; -constexpr uint32_t l3CacheOff = 1u; -constexpr uint32_t l3AndL1On = 2u; -constexpr uint32_t NotApplicable = 3u; +inline constexpr uint32_t l3CacheOn = 0u; +inline constexpr uint32_t l3CacheOff = 1u; +inline constexpr uint32_t l3AndL1On = 2u; +inline constexpr uint32_t NotApplicable = 3u; } // namespace L3CachingSettings struct DispatchBcsFlags { diff --git a/shared/source/command_stream/csr_properties_flags.h b/shared/source/command_stream/csr_properties_flags.h index bc324e501b..59ec6645f5 100644 --- a/shared/source/command_stream/csr_properties_flags.h +++ b/shared/source/command_stream/csr_properties_flags.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,9 +11,9 @@ namespace NEO { namespace AdditionalKernelExecInfo { -constexpr uint32_t DisableOverdispatch = 0u; -constexpr uint32_t NotSet = 1u; -constexpr uint32_t NotApplicable = 2u; +inline constexpr uint32_t DisableOverdispatch = 0u; +inline constexpr uint32_t NotSet = 1u; +inline constexpr uint32_t NotApplicable = 2u; } // namespace AdditionalKernelExecInfo } // namespace NEO \ No newline at end of file diff --git a/shared/source/command_stream/scratch_space_controller.h b/shared/source/command_stream/scratch_space_controller.h index 56ae9e21c3..d11c392cd0 100644 --- a/shared/source/command_stream/scratch_space_controller.h +++ b/shared/source/command_stream/scratch_space_controller.h @@ -23,7 +23,7 @@ class OsContext; class CommandStreamReceiver; namespace ScratchSpaceConstants { -constexpr size_t scratchSpaceOffsetFor64Bit = 4096u; +inline constexpr size_t scratchSpaceOffsetFor64Bit = 4096u; } using ResidencyContainer = std::vector; diff --git a/shared/source/compiler_interface/compiler_options.h b/shared/source/compiler_interface/compiler_options.h index 7a71d0a536..d64063f305 100644 --- a/shared/source/compiler_interface/compiler_options.h +++ b/shared/source/compiler_interface/compiler_options.h @@ -15,39 +15,39 @@ namespace NEO { namespace CompilerOptions { -constexpr ConstStringRef greaterThan4gbBuffersRequired = "-cl-intel-greater-than-4GB-buffer-required"; -constexpr ConstStringRef hasBufferOffsetArg = "-cl-intel-has-buffer-offset-arg"; -constexpr ConstStringRef kernelDebugEnable = "-cl-kernel-debug-enable"; -constexpr ConstStringRef arch32bit = "-m32"; -constexpr ConstStringRef arch64bit = "-m64"; -constexpr ConstStringRef debugKernelEnable = "-cl-kernel-debug-enable"; -constexpr ConstStringRef optDisable = "-cl-opt-disable"; -constexpr ConstStringRef argInfo = "-cl-kernel-arg-info"; -constexpr ConstStringRef gtpinRera = "-cl-intel-gtpin-rera"; -constexpr ConstStringRef finiteMathOnly = "-cl-finite-math-only"; -constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math"; -constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type"; -constexpr ConstStringRef createLibrary = "-create-library"; -constexpr ConstStringRef generateDebugInfo = "-g"; -constexpr ConstStringRef generateSourcePath = "-s"; -constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode"; -constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size"; -constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem"; -constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem"; -constexpr ConstStringRef allowZebin = "-cl-intel-allow-zebin"; -constexpr ConstStringRef disableZebin = "-cl-intel-disable-zebin"; -constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1"; -constexpr ConstStringRef optLevel = "-ze-opt-level=O"; -constexpr ConstStringRef excludeIrFromZebin = "-exclude-ir-from-zebin"; -constexpr ConstStringRef noRecompiledFromIr = "-Wno-recompiled-from-ir"; -constexpr ConstStringRef defaultGrf = "-cl-intel-128-GRF-per-thread"; -constexpr ConstStringRef largeGrf = "-cl-intel-256-GRF-per-thread"; -constexpr ConstStringRef autoGrf = "-cl-intel-enable-auto-large-GRF-mode"; -constexpr ConstStringRef numThreadsPerEu = "-cl-intel-reqd-eu-thread-count"; -constexpr ConstStringRef useCMCompiler = "-cmc"; +inline constexpr ConstStringRef greaterThan4gbBuffersRequired = "-cl-intel-greater-than-4GB-buffer-required"; +inline constexpr ConstStringRef hasBufferOffsetArg = "-cl-intel-has-buffer-offset-arg"; +inline constexpr ConstStringRef kernelDebugEnable = "-cl-kernel-debug-enable"; +inline constexpr ConstStringRef arch32bit = "-m32"; +inline constexpr ConstStringRef arch64bit = "-m64"; +inline constexpr ConstStringRef debugKernelEnable = "-cl-kernel-debug-enable"; +inline constexpr ConstStringRef optDisable = "-cl-opt-disable"; +inline constexpr ConstStringRef argInfo = "-cl-kernel-arg-info"; +inline constexpr ConstStringRef gtpinRera = "-cl-intel-gtpin-rera"; +inline constexpr ConstStringRef finiteMathOnly = "-cl-finite-math-only"; +inline constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math"; +inline constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type"; +inline constexpr ConstStringRef createLibrary = "-create-library"; +inline constexpr ConstStringRef generateDebugInfo = "-g"; +inline constexpr ConstStringRef generateSourcePath = "-s"; +inline constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode"; +inline constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size"; +inline constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem"; +inline constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem"; +inline constexpr ConstStringRef allowZebin = "-cl-intel-allow-zebin"; +inline constexpr ConstStringRef disableZebin = "-cl-intel-disable-zebin"; +inline constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1"; +inline constexpr ConstStringRef optLevel = "-ze-opt-level=O"; +inline constexpr ConstStringRef excludeIrFromZebin = "-exclude-ir-from-zebin"; +inline constexpr ConstStringRef noRecompiledFromIr = "-Wno-recompiled-from-ir"; +inline constexpr ConstStringRef defaultGrf = "-cl-intel-128-GRF-per-thread"; +inline constexpr ConstStringRef largeGrf = "-cl-intel-256-GRF-per-thread"; +inline constexpr ConstStringRef autoGrf = "-cl-intel-enable-auto-large-GRF-mode"; +inline constexpr ConstStringRef numThreadsPerEu = "-cl-intel-reqd-eu-thread-count"; +inline constexpr ConstStringRef useCMCompiler = "-cmc"; -constexpr size_t nullterminateSize = 1U; -constexpr size_t spaceSeparatorSize = 1U; +inline constexpr size_t nullterminateSize = 1U; +inline constexpr size_t spaceSeparatorSize = 1U; template constexpr size_t length(const char (&array)[Length]) { diff --git a/shared/source/compiler_interface/compiler_warnings/compiler_warnings.h b/shared/source/compiler_interface/compiler_warnings/compiler_warnings.h index ca012cfb7c..8946f72a24 100644 --- a/shared/source/compiler_interface/compiler_warnings/compiler_warnings.h +++ b/shared/source/compiler_interface/compiler_warnings/compiler_warnings.h @@ -12,7 +12,7 @@ namespace NEO { namespace CompilerWarnings { -constexpr ConstStringRef recompiledFromIr = "warning: module got recompiled from IR because provided native binary is incompatible with underlying device and/or driver [-Wrecompiled-from-ir]"; +inline constexpr ConstStringRef recompiledFromIr = "warning: module got recompiled from IR because provided native binary is incompatible with underlying device and/or driver [-Wrecompiled-from-ir]"; } // namespace CompilerWarnings } // namespace NEO diff --git a/shared/source/compiler_interface/intermediate_representations.h b/shared/source/compiler_interface/intermediate_representations.h index 7888f123b8..287b17df35 100644 --- a/shared/source/compiler_interface/intermediate_representations.h +++ b/shared/source/compiler_interface/intermediate_representations.h @@ -15,9 +15,9 @@ namespace NEO { -constexpr ConstStringRef llvmBcMagic = "BC\xc0\xde"; -constexpr ConstStringRef spirvMagic = "\x07\x23\x02\x03"; -constexpr ConstStringRef spirvMagicInv = "\x03\x02\x23\x07"; +inline constexpr ConstStringRef llvmBcMagic = "BC\xc0\xde"; +inline constexpr ConstStringRef spirvMagic = "\x07\x23\x02\x03"; +inline constexpr ConstStringRef spirvMagicInv = "\x03\x02\x23\x07"; inline bool hasSameMagic(ConstStringRef expectedMagic, ArrayRef binary) { auto binaryMagicLen = std::min(expectedMagic.size(), binary.size()); diff --git a/shared/source/compiler_interface/oclc_extensions.h b/shared/source/compiler_interface/oclc_extensions.h index 743d8a8f10..21759ba7b6 100644 --- a/shared/source/compiler_interface/oclc_extensions.h +++ b/shared/source/compiler_interface/oclc_extensions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,7 +19,7 @@ namespace NEO { struct HardwareInfo; namespace Extensions { -constexpr const char *const sharingFormatQuery = "cl_intel_sharing_format_query "; +inline constexpr const char *const sharingFormatQuery = "cl_intel_sharing_format_query "; } extern const char *deviceExtensionsList; diff --git a/shared/source/device_binary_format/ar/ar.h b/shared/source/device_binary_format/ar/ar.h index a86afa6d94..d7fc713e76 100644 --- a/shared/source/device_binary_format/ar/ar.h +++ b/shared/source/device_binary_format/ar/ar.h @@ -12,8 +12,8 @@ namespace NEO { namespace Ar { -constexpr ConstStringRef arMagic = "!\n"; -constexpr ConstStringRef arFileEntryTrailingMagic = "\x60\x0A"; +inline constexpr ConstStringRef arMagic = "!\n"; +inline constexpr ConstStringRef arFileEntryTrailingMagic = "\x60\x0A"; struct ArFileEntryHeader { char identifier[16] = {'/', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}; @@ -27,9 +27,9 @@ struct ArFileEntryHeader { static_assert(60U == sizeof(ArFileEntryHeader), ""); namespace SpecialFileNames { -constexpr ConstStringRef longFileNamesFile = "//"; -constexpr char longFileNamePrefix = '/'; -constexpr char fileNameTerminator = '/'; +inline constexpr ConstStringRef longFileNamesFile = "//"; +inline constexpr char longFileNamePrefix = '/'; +inline constexpr char fileNameTerminator = '/'; } // namespace SpecialFileNames } // namespace Ar diff --git a/shared/source/device_binary_format/elf/elf.h b/shared/source/device_binary_format/elf/elf.h index bc1c3c1ad0..69033fa841 100644 --- a/shared/source/device_binary_format/elf/elf.h +++ b/shared/source/device_binary_format/elf/elf.h @@ -137,7 +137,7 @@ enum SYMBOL_TABLE_BIND : uint32_t { STB_GLOBAL = 1 }; -constexpr const char elfMagic[4] = {0x7f, 'E', 'L', 'F'}; +inline constexpr const char elfMagic[4] = {0x7f, 'E', 'L', 'F'}; struct ElfFileHeaderIdentity { ElfFileHeaderIdentity(ELF_IDENTIFIER_CLASS classBits) @@ -563,38 +563,38 @@ static_assert(sizeof(ElfRela) == 0xC, ""); static_assert(sizeof(ElfRela) == 0x18, ""); namespace SpecialSectionNames { -constexpr ConstStringRef bss = ".bss"; // uninitialized memory -constexpr ConstStringRef comment = ".comment"; // version control information -constexpr ConstStringRef data = ".data"; // initialized memory -constexpr ConstStringRef data1 = ".data1"; // initialized memory -constexpr ConstStringRef debug = ".debug"; // debug symbols -constexpr ConstStringRef debugInfo = ".debug_info"; // debug info -constexpr ConstStringRef dynamic = ".dynamic"; // dynamic linking information -constexpr ConstStringRef dynstr = ".dynstr"; // strings for dynamic linking -constexpr ConstStringRef dynsym = ".dynsym"; // dynamic linking symbol table -constexpr ConstStringRef fini = ".fini"; // executable instructions of program termination -constexpr ConstStringRef finiArray = ".fini_array"; // function pointers of termination array -constexpr ConstStringRef got = ".got"; // global offset table -constexpr ConstStringRef hash = ".hash"; // symnol hash table -constexpr ConstStringRef init = ".init"; // executable instructions of program initializaion -constexpr ConstStringRef initArray = ".init_array"; // function pointers of initialization array -constexpr ConstStringRef interp = ".interp"; // path name of program interpreter -constexpr ConstStringRef line = ".line"; // line number info for symbolic debugging -constexpr ConstStringRef note = ".note"; // note section -constexpr ConstStringRef plt = ".plt"; // procedure linkage table -constexpr ConstStringRef preinitArray = ".preinit_array"; // function pointers of pre-initialization array -constexpr ConstStringRef relPrefix = ".rel"; // prefix of .relNAME - relocations for NAME section -constexpr ConstStringRef relaPrefix = ".rela"; // prefix of .relaNAME - rela relocations for NAME section -constexpr ConstStringRef rodata = ".rodata"; // read-only data -constexpr ConstStringRef rodata1 = ".rodata1"; // read-only data -constexpr ConstStringRef shStrTab = ".shstrtab"; // section names (strings) -constexpr ConstStringRef strtab = ".strtab"; // strings -constexpr ConstStringRef symtab = ".symtab"; // symbol table -constexpr ConstStringRef symtabShndx = ".symtab_shndx"; // special symbol table section index array -constexpr ConstStringRef tbss = ".tbss"; // uninitialized thread-local data -constexpr ConstStringRef tadata = ".tdata"; // initialided thread-local data -constexpr ConstStringRef tdata1 = ".tdata1"; // initialided thread-local data -constexpr ConstStringRef text = ".text"; // executable instructions +inline constexpr ConstStringRef bss = ".bss"; // uninitialized memory +inline constexpr ConstStringRef comment = ".comment"; // version control information +inline constexpr ConstStringRef data = ".data"; // initialized memory +inline constexpr ConstStringRef data1 = ".data1"; // initialized memory +inline constexpr ConstStringRef debug = ".debug"; // debug symbols +inline constexpr ConstStringRef debugInfo = ".debug_info"; // debug info +inline constexpr ConstStringRef dynamic = ".dynamic"; // dynamic linking information +inline constexpr ConstStringRef dynstr = ".dynstr"; // strings for dynamic linking +inline constexpr ConstStringRef dynsym = ".dynsym"; // dynamic linking symbol table +inline constexpr ConstStringRef fini = ".fini"; // executable instructions of program termination +inline constexpr ConstStringRef finiArray = ".fini_array"; // function pointers of termination array +inline constexpr ConstStringRef got = ".got"; // global offset table +inline constexpr ConstStringRef hash = ".hash"; // symnol hash table +inline constexpr ConstStringRef init = ".init"; // executable instructions of program initializaion +inline constexpr ConstStringRef initArray = ".init_array"; // function pointers of initialization array +inline constexpr ConstStringRef interp = ".interp"; // path name of program interpreter +inline constexpr ConstStringRef line = ".line"; // line number info for symbolic debugging +inline constexpr ConstStringRef note = ".note"; // note section +inline constexpr ConstStringRef plt = ".plt"; // procedure linkage table +inline constexpr ConstStringRef preinitArray = ".preinit_array"; // function pointers of pre-initialization array +inline constexpr ConstStringRef relPrefix = ".rel"; // prefix of .relNAME - relocations for NAME section +inline constexpr ConstStringRef relaPrefix = ".rela"; // prefix of .relaNAME - rela relocations for NAME section +inline constexpr ConstStringRef rodata = ".rodata"; // read-only data +inline constexpr ConstStringRef rodata1 = ".rodata1"; // read-only data +inline constexpr ConstStringRef shStrTab = ".shstrtab"; // section names (strings) +inline constexpr ConstStringRef strtab = ".strtab"; // strings +inline constexpr ConstStringRef symtab = ".symtab"; // symbol table +inline constexpr ConstStringRef symtabShndx = ".symtab_shndx"; // special symbol table section index array +inline constexpr ConstStringRef tbss = ".tbss"; // uninitialized thread-local data +inline constexpr ConstStringRef tadata = ".tdata"; // initialided thread-local data +inline constexpr ConstStringRef tdata1 = ".tdata1"; // initialided thread-local data +inline constexpr ConstStringRef text = ".text"; // executable instructions } // namespace SpecialSectionNames } // namespace Elf diff --git a/shared/source/device_binary_format/elf/ocl_elf.h b/shared/source/device_binary_format/elf/ocl_elf.h index c0f4c9c61a..7ef06a7c85 100644 --- a/shared/source/device_binary_format/elf/ocl_elf.h +++ b/shared/source/device_binary_format/elf/ocl_elf.h @@ -49,13 +49,13 @@ static_assert(static_cast(SHT_OPENCL_SOURCE) == static_cast( static_assert(static_cast(SHT_OPENCL_SPIRV_SC_VALUES) == static_cast(SHT_OPENCL_RESERVED_END), ""); namespace SectionNamesOpenCl { -constexpr ConstStringRef buildOptions = "BuildOptions"; -constexpr ConstStringRef spirvObject = "SPIRV Object"; -constexpr ConstStringRef llvmObject = "Intel(R) OpenCL LLVM Object"; -constexpr ConstStringRef deviceDebug = "Intel(R) OpenCL Device Debug"; -constexpr ConstStringRef deviceBinary = "Intel(R) OpenCL Device Binary"; -constexpr ConstStringRef spirvSpecConstIds = "SPIRV Specialization Constants Ids"; -constexpr ConstStringRef spirvSpecConstValues = "SPIRV Specialization Constants Values"; +inline constexpr ConstStringRef buildOptions = "BuildOptions"; +inline constexpr ConstStringRef spirvObject = "SPIRV Object"; +inline constexpr ConstStringRef llvmObject = "Intel(R) OpenCL LLVM Object"; +inline constexpr ConstStringRef deviceDebug = "Intel(R) OpenCL Device Debug"; +inline constexpr ConstStringRef deviceBinary = "Intel(R) OpenCL Device Binary"; +inline constexpr ConstStringRef spirvSpecConstIds = "SPIRV Specialization Constants Ids"; +inline constexpr ConstStringRef spirvSpecConstValues = "SPIRV Specialization Constants Values"; } // namespace SectionNamesOpenCl } // namespace Elf diff --git a/shared/source/device_binary_format/elf/zebin_elf.h b/shared/source/device_binary_format/elf/zebin_elf.h index 5cf7185349..de8beabf15 100644 --- a/shared/source/device_binary_format/elf/zebin_elf.h +++ b/shared/source/device_binary_format/elf/zebin_elf.h @@ -43,28 +43,28 @@ enum RELOC_TYPE_ZEBIN : uint32_t { }; namespace SectionsNamesZebin { -constexpr ConstStringRef textPrefix = ".text."; -constexpr ConstStringRef functions = ".text.Intel_Symbol_Table_Void_Program"; -constexpr ConstStringRef dataConst = ".data.const"; -constexpr ConstStringRef dataGlobalConst = ".data.global_const"; -constexpr ConstStringRef dataGlobal = ".data.global"; -constexpr ConstStringRef dataConstString = ".data.const.string"; -constexpr ConstStringRef symtab = ".symtab"; -constexpr ConstStringRef relTablePrefix = ".rel."; -constexpr ConstStringRef relaTablePrefix = ".rela."; -constexpr ConstStringRef spv = ".spv"; -constexpr ConstStringRef debugPrefix = ".debug_"; -constexpr ConstStringRef debugInfo = ".debug_info"; -constexpr ConstStringRef debugAbbrev = ".debug_abbrev"; -constexpr ConstStringRef zeInfo = ".ze_info"; -constexpr ConstStringRef gtpinInfo = ".gtpin_info"; -constexpr ConstStringRef noteIntelGT = ".note.intelgt.compat"; -constexpr ConstStringRef buildOptions = ".misc.buildOptions"; -constexpr ConstStringRef vIsaAsmPrefix = ".visaasm."; -constexpr ConstStringRef externalFunctions = "Intel_Symbol_Table_Void_Program"; +inline constexpr ConstStringRef textPrefix = ".text."; +inline constexpr ConstStringRef functions = ".text.Intel_Symbol_Table_Void_Program"; +inline constexpr ConstStringRef dataConst = ".data.const"; +inline constexpr ConstStringRef dataGlobalConst = ".data.global_const"; +inline constexpr ConstStringRef dataGlobal = ".data.global"; +inline constexpr ConstStringRef dataConstString = ".data.const.string"; +inline constexpr ConstStringRef symtab = ".symtab"; +inline constexpr ConstStringRef relTablePrefix = ".rel."; +inline constexpr ConstStringRef relaTablePrefix = ".rela."; +inline constexpr ConstStringRef spv = ".spv"; +inline constexpr ConstStringRef debugPrefix = ".debug_"; +inline constexpr ConstStringRef debugInfo = ".debug_info"; +inline constexpr ConstStringRef debugAbbrev = ".debug_abbrev"; +inline constexpr ConstStringRef zeInfo = ".ze_info"; +inline constexpr ConstStringRef gtpinInfo = ".gtpin_info"; +inline constexpr ConstStringRef noteIntelGT = ".note.intelgt.compat"; +inline constexpr ConstStringRef buildOptions = ".misc.buildOptions"; +inline constexpr ConstStringRef vIsaAsmPrefix = ".visaasm."; +inline constexpr ConstStringRef externalFunctions = "Intel_Symbol_Table_Void_Program"; } // namespace SectionsNamesZebin -constexpr ConstStringRef IntelGtNoteOwnerName = "IntelGT"; +inline constexpr ConstStringRef IntelGtNoteOwnerName = "IntelGT"; enum IntelGTSectionType : uint32_t { ProductFamily = 1, GfxCore = 2, @@ -117,270 +117,270 @@ static_assert(sizeof(ZebinTargetFlags) == sizeof(uint32_t), ""); namespace ZebinKernelMetadata { namespace Tags { -constexpr ConstStringRef kernels("kernels"); -constexpr ConstStringRef version("version"); -constexpr ConstStringRef globalHostAccessTable("global_host_access_table"); -constexpr ConstStringRef functions("functions"); -constexpr ConstStringRef kernelMiscInfo("kernels_misc_info"); +inline constexpr ConstStringRef kernels("kernels"); +inline constexpr ConstStringRef version("version"); +inline constexpr ConstStringRef globalHostAccessTable("global_host_access_table"); +inline constexpr ConstStringRef functions("functions"); +inline constexpr ConstStringRef kernelMiscInfo("kernels_misc_info"); namespace Kernel { -constexpr ConstStringRef attributes("user_attributes"); -constexpr ConstStringRef name("name"); -constexpr ConstStringRef executionEnv("execution_env"); -constexpr ConstStringRef debugEnv("debug_env"); -constexpr ConstStringRef payloadArguments("payload_arguments"); -constexpr ConstStringRef bindingTableIndices("binding_table_indices"); -constexpr ConstStringRef perThreadPayloadArguments("per_thread_payload_arguments"); -constexpr ConstStringRef perThreadMemoryBuffers("per_thread_memory_buffers"); -constexpr ConstStringRef experimentalProperties("experimental_properties"); -constexpr ConstStringRef inlineSamplers("inline_samplers"); +inline constexpr ConstStringRef attributes("user_attributes"); +inline constexpr ConstStringRef name("name"); +inline constexpr ConstStringRef executionEnv("execution_env"); +inline constexpr ConstStringRef debugEnv("debug_env"); +inline constexpr ConstStringRef payloadArguments("payload_arguments"); +inline constexpr ConstStringRef bindingTableIndices("binding_table_indices"); +inline constexpr ConstStringRef perThreadPayloadArguments("per_thread_payload_arguments"); +inline constexpr ConstStringRef perThreadMemoryBuffers("per_thread_memory_buffers"); +inline constexpr ConstStringRef experimentalProperties("experimental_properties"); +inline constexpr ConstStringRef inlineSamplers("inline_samplers"); namespace ExecutionEnv { -constexpr ConstStringRef barrierCount("barrier_count"); -constexpr ConstStringRef disableMidThreadPreemption("disable_mid_thread_preemption"); -constexpr ConstStringRef euThreadCount("eu_thread_count"); -constexpr ConstStringRef grfCount("grf_count"); -constexpr ConstStringRef has4gbBuffers("has_4gb_buffers"); -constexpr ConstStringRef hasDpas("has_dpas"); -constexpr ConstStringRef hasFenceForImageAccess("has_fence_for_image_access"); -constexpr ConstStringRef hasGlobalAtomics("has_global_atomics"); -constexpr ConstStringRef hasMultiScratchSpaces("has_multi_scratch_spaces"); -constexpr ConstStringRef hasNoStatelessWrite("has_no_stateless_write"); -constexpr ConstStringRef hasStackCalls("has_stack_calls"); -constexpr ConstStringRef hwPreemptionMode("hw_preemption_mode"); -constexpr ConstStringRef inlineDataPayloadSize("inline_data_payload_size"); -constexpr ConstStringRef offsetToSkipPerThreadDataLoad("offset_to_skip_per_thread_data_load"); -constexpr ConstStringRef offsetToSkipSetFfidGp("offset_to_skip_set_ffid_gp"); -constexpr ConstStringRef requiredSubGroupSize("required_sub_group_size"); -constexpr ConstStringRef requiredWorkGroupSize("required_work_group_size"); -constexpr ConstStringRef requireDisableEUFusion("require_disable_eufusion"); -constexpr ConstStringRef simdSize("simd_size"); -constexpr ConstStringRef slmSize("slm_size"); -constexpr ConstStringRef subgroupIndependentForwardProgress("subgroup_independent_forward_progress"); -constexpr ConstStringRef workGroupWalkOrderDimensions("work_group_walk_order_dimensions"); -constexpr ConstStringRef threadSchedulingMode("thread_scheduling_mode"); +inline constexpr ConstStringRef barrierCount("barrier_count"); +inline constexpr ConstStringRef disableMidThreadPreemption("disable_mid_thread_preemption"); +inline constexpr ConstStringRef euThreadCount("eu_thread_count"); +inline constexpr ConstStringRef grfCount("grf_count"); +inline constexpr ConstStringRef has4gbBuffers("has_4gb_buffers"); +inline constexpr ConstStringRef hasDpas("has_dpas"); +inline constexpr ConstStringRef hasFenceForImageAccess("has_fence_for_image_access"); +inline constexpr ConstStringRef hasGlobalAtomics("has_global_atomics"); +inline constexpr ConstStringRef hasMultiScratchSpaces("has_multi_scratch_spaces"); +inline constexpr ConstStringRef hasNoStatelessWrite("has_no_stateless_write"); +inline constexpr ConstStringRef hasStackCalls("has_stack_calls"); +inline constexpr ConstStringRef hwPreemptionMode("hw_preemption_mode"); +inline constexpr ConstStringRef inlineDataPayloadSize("inline_data_payload_size"); +inline constexpr ConstStringRef offsetToSkipPerThreadDataLoad("offset_to_skip_per_thread_data_load"); +inline constexpr ConstStringRef offsetToSkipSetFfidGp("offset_to_skip_set_ffid_gp"); +inline constexpr ConstStringRef requiredSubGroupSize("required_sub_group_size"); +inline constexpr ConstStringRef requiredWorkGroupSize("required_work_group_size"); +inline constexpr ConstStringRef requireDisableEUFusion("require_disable_eufusion"); +inline constexpr ConstStringRef simdSize("simd_size"); +inline constexpr ConstStringRef slmSize("slm_size"); +inline constexpr ConstStringRef subgroupIndependentForwardProgress("subgroup_independent_forward_progress"); +inline constexpr ConstStringRef workGroupWalkOrderDimensions("work_group_walk_order_dimensions"); +inline constexpr ConstStringRef threadSchedulingMode("thread_scheduling_mode"); namespace ThreadSchedulingMode { -constexpr ConstStringRef ageBased("age_based"); -constexpr ConstStringRef roundRobin("round_robin"); -constexpr ConstStringRef roundRobinStall("round_robin_stall"); +inline constexpr ConstStringRef ageBased("age_based"); +inline constexpr ConstStringRef roundRobin("round_robin"); +inline constexpr ConstStringRef roundRobinStall("round_robin_stall"); } // namespace ThreadSchedulingMode -constexpr ConstStringRef indirectStatelessCount("indirect_stateless_count"); +inline constexpr ConstStringRef indirectStatelessCount("indirect_stateless_count"); } // namespace ExecutionEnv namespace Attributes { -constexpr ConstStringRef intelReqdSubgroupSize("intel_reqd_sub_group_size"); -constexpr ConstStringRef intelReqdWorkgroupWalkOrder("intel_reqd_workgroup_walk_order"); -constexpr ConstStringRef reqdWorkgroupSize("reqd_work_group_size"); -constexpr ConstStringRef invalidKernel("invalid_kernel"); -constexpr ConstStringRef vecTypeHint("vec_type_hint"); -constexpr ConstStringRef workgroupSizeHint("work_group_size_hint"); -constexpr ConstStringRef hintSuffix("_hint"); +inline constexpr ConstStringRef intelReqdSubgroupSize("intel_reqd_sub_group_size"); +inline constexpr ConstStringRef intelReqdWorkgroupWalkOrder("intel_reqd_workgroup_walk_order"); +inline constexpr ConstStringRef reqdWorkgroupSize("reqd_work_group_size"); +inline constexpr ConstStringRef invalidKernel("invalid_kernel"); +inline constexpr ConstStringRef vecTypeHint("vec_type_hint"); +inline constexpr ConstStringRef workgroupSizeHint("work_group_size_hint"); +inline constexpr ConstStringRef hintSuffix("_hint"); } // namespace Attributes namespace DebugEnv { -constexpr ConstStringRef debugSurfaceBTI("sip_surface_bti"); +inline constexpr ConstStringRef debugSurfaceBTI("sip_surface_bti"); } // namespace DebugEnv namespace PayloadArgument { -constexpr ConstStringRef argType("arg_type"); -constexpr ConstStringRef argIndex("arg_index"); -constexpr ConstStringRef offset("offset"); -constexpr ConstStringRef size("size"); -constexpr ConstStringRef addrmode("addrmode"); -constexpr ConstStringRef addrspace("addrspace"); -constexpr ConstStringRef accessType("access_type"); -constexpr ConstStringRef samplerIndex("sampler_index"); -constexpr ConstStringRef sourceOffset("source_offset"); -constexpr ConstStringRef slmArgAlignment("slm_alignment"); -constexpr ConstStringRef imageType("image_type"); -constexpr ConstStringRef imageTransformable("image_transformable"); -constexpr ConstStringRef samplerType("sampler_type"); -constexpr ConstStringRef addrMode("sampler_desc_addrmode"); -constexpr ConstStringRef filterMode("sampler_desc_filtermode"); -constexpr ConstStringRef normalized("sampler_desc_normalized"); -constexpr ConstStringRef isPipe("is_pipe"); -constexpr ConstStringRef isPtr("is_ptr"); +inline constexpr ConstStringRef argType("arg_type"); +inline constexpr ConstStringRef argIndex("arg_index"); +inline constexpr ConstStringRef offset("offset"); +inline constexpr ConstStringRef size("size"); +inline constexpr ConstStringRef addrmode("addrmode"); +inline constexpr ConstStringRef addrspace("addrspace"); +inline constexpr ConstStringRef accessType("access_type"); +inline constexpr ConstStringRef samplerIndex("sampler_index"); +inline constexpr ConstStringRef sourceOffset("source_offset"); +inline constexpr ConstStringRef slmArgAlignment("slm_alignment"); +inline constexpr ConstStringRef imageType("image_type"); +inline constexpr ConstStringRef imageTransformable("image_transformable"); +inline constexpr ConstStringRef samplerType("sampler_type"); +inline constexpr ConstStringRef addrMode("sampler_desc_addrmode"); +inline constexpr ConstStringRef filterMode("sampler_desc_filtermode"); +inline constexpr ConstStringRef normalized("sampler_desc_normalized"); +inline constexpr ConstStringRef isPipe("is_pipe"); +inline constexpr ConstStringRef isPtr("is_ptr"); namespace ArgType { -constexpr ConstStringRef localSize("local_size"); -constexpr ConstStringRef groupCount("group_count"); -constexpr ConstStringRef globalIdOffset("global_id_offset"); -constexpr ConstStringRef globalSize("global_size"); -constexpr ConstStringRef enqueuedLocalSize("enqueued_local_size"); -constexpr ConstStringRef privateBaseStateless("private_base_stateless"); -constexpr ConstStringRef argByvalue("arg_byvalue"); -constexpr ConstStringRef argBypointer("arg_bypointer"); -constexpr ConstStringRef bufferAddress("buffer_address"); -constexpr ConstStringRef bufferOffset("buffer_offset"); -constexpr ConstStringRef printfBuffer("printf_buffer"); -constexpr ConstStringRef workDimensions("work_dimensions"); -constexpr ConstStringRef implicitArgBuffer("implicit_arg_buffer"); -constexpr ConstStringRef syncBuffer("sync_buffer"); -constexpr ConstStringRef rtGlobalBuffer("rt_global_buffer"); +inline constexpr ConstStringRef localSize("local_size"); +inline constexpr ConstStringRef groupCount("group_count"); +inline constexpr ConstStringRef globalIdOffset("global_id_offset"); +inline constexpr ConstStringRef globalSize("global_size"); +inline constexpr ConstStringRef enqueuedLocalSize("enqueued_local_size"); +inline constexpr ConstStringRef privateBaseStateless("private_base_stateless"); +inline constexpr ConstStringRef argByvalue("arg_byvalue"); +inline constexpr ConstStringRef argBypointer("arg_bypointer"); +inline constexpr ConstStringRef bufferAddress("buffer_address"); +inline constexpr ConstStringRef bufferOffset("buffer_offset"); +inline constexpr ConstStringRef printfBuffer("printf_buffer"); +inline constexpr ConstStringRef workDimensions("work_dimensions"); +inline constexpr ConstStringRef implicitArgBuffer("implicit_arg_buffer"); +inline constexpr ConstStringRef syncBuffer("sync_buffer"); +inline constexpr ConstStringRef rtGlobalBuffer("rt_global_buffer"); namespace Image { -constexpr ConstStringRef width("image_width"); -constexpr ConstStringRef height("image_height"); -constexpr ConstStringRef depth("image_depth"); -constexpr ConstStringRef channelDataType("image_channel_data_type"); -constexpr ConstStringRef channelOrder("image_channel_order"); -constexpr ConstStringRef arraySize("image_array_size"); -constexpr ConstStringRef numSamples("image_num_samples"); -constexpr ConstStringRef numMipLevels("image_num_mip_levels"); -constexpr ConstStringRef flatBaseOffset("flat_image_baseoffset"); -constexpr ConstStringRef flatWidth("flat_image_width"); -constexpr ConstStringRef flatHeight("flat_image_height"); -constexpr ConstStringRef flatPitch("flat_image_pitch"); +inline constexpr ConstStringRef width("image_width"); +inline constexpr ConstStringRef height("image_height"); +inline constexpr ConstStringRef depth("image_depth"); +inline constexpr ConstStringRef channelDataType("image_channel_data_type"); +inline constexpr ConstStringRef channelOrder("image_channel_order"); +inline constexpr ConstStringRef arraySize("image_array_size"); +inline constexpr ConstStringRef numSamples("image_num_samples"); +inline constexpr ConstStringRef numMipLevels("image_num_mip_levels"); +inline constexpr ConstStringRef flatBaseOffset("flat_image_baseoffset"); +inline constexpr ConstStringRef flatWidth("flat_image_width"); +inline constexpr ConstStringRef flatHeight("flat_image_height"); +inline constexpr ConstStringRef flatPitch("flat_image_pitch"); } // namespace Image namespace Sampler { -constexpr ConstStringRef snapWa("sampler_snap_wa"); -constexpr ConstStringRef normCoords("sampler_normalized"); -constexpr ConstStringRef addrMode("sampler_address"); +inline constexpr ConstStringRef snapWa("sampler_snap_wa"); +inline constexpr ConstStringRef normCoords("sampler_normalized"); +inline constexpr ConstStringRef addrMode("sampler_address"); namespace Vme { -constexpr ConstStringRef blockType("vme_mb_block_type"); -constexpr ConstStringRef subpixelMode("vme_subpixel_mode"); -constexpr ConstStringRef sadAdjustMode("vme_sad_adjust_mode"); -constexpr ConstStringRef searchPathType("vme_search_path_type"); +inline constexpr ConstStringRef blockType("vme_mb_block_type"); +inline constexpr ConstStringRef subpixelMode("vme_subpixel_mode"); +inline constexpr ConstStringRef sadAdjustMode("vme_sad_adjust_mode"); +inline constexpr ConstStringRef searchPathType("vme_search_path_type"); } // namespace Vme } // namespace Sampler } // namespace ArgType namespace ImageType { -constexpr ConstStringRef imageTypeBuffer("image_buffer"); -constexpr ConstStringRef imageType1D("image_1d"); -constexpr ConstStringRef imageType1DArray("image_1d_array"); -constexpr ConstStringRef imageType2D("image_2d"); -constexpr ConstStringRef imageType2DArray("image_2d_array"); -constexpr ConstStringRef imageType3D("image_3d"); -constexpr ConstStringRef imageTypeCube("image_cube_array"); -constexpr ConstStringRef imageTypeCubeArray("image_buffer"); -constexpr ConstStringRef imageType2DDepth("image_2d_depth"); -constexpr ConstStringRef imageType2DArrayDepth("image_2d_array_depth"); -constexpr ConstStringRef imageType2DMSAA("image_2d_msaa"); -constexpr ConstStringRef imageType2DMSAADepth("image_2d_msaa_depth"); -constexpr ConstStringRef imageType2DArrayMSAA("image_2d_array_msaa"); -constexpr ConstStringRef imageType2DArrayMSAADepth("image_2d_array_msaa_depth"); -constexpr ConstStringRef imageType2DMedia("image_2d_media"); -constexpr ConstStringRef imageType2DMediaBlock("image_2d_media_block"); +inline constexpr ConstStringRef imageTypeBuffer("image_buffer"); +inline constexpr ConstStringRef imageType1D("image_1d"); +inline constexpr ConstStringRef imageType1DArray("image_1d_array"); +inline constexpr ConstStringRef imageType2D("image_2d"); +inline constexpr ConstStringRef imageType2DArray("image_2d_array"); +inline constexpr ConstStringRef imageType3D("image_3d"); +inline constexpr ConstStringRef imageTypeCube("image_cube_array"); +inline constexpr ConstStringRef imageTypeCubeArray("image_buffer"); +inline constexpr ConstStringRef imageType2DDepth("image_2d_depth"); +inline constexpr ConstStringRef imageType2DArrayDepth("image_2d_array_depth"); +inline constexpr ConstStringRef imageType2DMSAA("image_2d_msaa"); +inline constexpr ConstStringRef imageType2DMSAADepth("image_2d_msaa_depth"); +inline constexpr ConstStringRef imageType2DArrayMSAA("image_2d_array_msaa"); +inline constexpr ConstStringRef imageType2DArrayMSAADepth("image_2d_array_msaa_depth"); +inline constexpr ConstStringRef imageType2DMedia("image_2d_media"); +inline constexpr ConstStringRef imageType2DMediaBlock("image_2d_media_block"); } // namespace ImageType namespace SamplerType { -constexpr ConstStringRef samplerTypeTexture("texture"); -constexpr ConstStringRef samplerType8x8("sample_8x8"); -constexpr ConstStringRef samplerType2DConsolve8x8("sample_8x8_2dconvolve"); -constexpr ConstStringRef samplerTypeErode8x8("sample_8x8_erode"); -constexpr ConstStringRef samplerTypeDilate8x8("sample_8x8_dilate"); -constexpr ConstStringRef samplerTypeMinMaxFilter8x8("sample_8x8_minmaxfilter"); -constexpr ConstStringRef samplerTypeCentroid8x8("sample_8x8_centroid"); -constexpr ConstStringRef samplerTypeBoolCentroid8x8("sample_8x8_bool_centroid"); -constexpr ConstStringRef samplerTypeBoolSum8x8("sample_8x8_bool_sum"); -constexpr ConstStringRef samplerTypeVD("vd"); -constexpr ConstStringRef samplerTypeVE("ve"); -constexpr ConstStringRef samplerTypeVME("vme"); +inline constexpr ConstStringRef samplerTypeTexture("texture"); +inline constexpr ConstStringRef samplerType8x8("sample_8x8"); +inline constexpr ConstStringRef samplerType2DConsolve8x8("sample_8x8_2dconvolve"); +inline constexpr ConstStringRef samplerTypeErode8x8("sample_8x8_erode"); +inline constexpr ConstStringRef samplerTypeDilate8x8("sample_8x8_dilate"); +inline constexpr ConstStringRef samplerTypeMinMaxFilter8x8("sample_8x8_minmaxfilter"); +inline constexpr ConstStringRef samplerTypeCentroid8x8("sample_8x8_centroid"); +inline constexpr ConstStringRef samplerTypeBoolCentroid8x8("sample_8x8_bool_centroid"); +inline constexpr ConstStringRef samplerTypeBoolSum8x8("sample_8x8_bool_sum"); +inline constexpr ConstStringRef samplerTypeVD("vd"); +inline constexpr ConstStringRef samplerTypeVE("ve"); +inline constexpr ConstStringRef samplerTypeVME("vme"); } // namespace SamplerType namespace MemoryAddressingMode { -constexpr ConstStringRef stateless("stateless"); -constexpr ConstStringRef stateful("stateful"); -constexpr ConstStringRef bindless("bindless"); -constexpr ConstStringRef sharedLocalMemory("slm"); +inline constexpr ConstStringRef stateless("stateless"); +inline constexpr ConstStringRef stateful("stateful"); +inline constexpr ConstStringRef bindless("bindless"); +inline constexpr ConstStringRef sharedLocalMemory("slm"); } // namespace MemoryAddressingMode namespace AddrSpace { -constexpr ConstStringRef global("global"); -constexpr ConstStringRef local("local"); -constexpr ConstStringRef constant("constant"); -constexpr ConstStringRef image("image"); -constexpr ConstStringRef sampler("sampler"); +inline constexpr ConstStringRef global("global"); +inline constexpr ConstStringRef local("local"); +inline constexpr ConstStringRef constant("constant"); +inline constexpr ConstStringRef image("image"); +inline constexpr ConstStringRef sampler("sampler"); } // namespace AddrSpace namespace AccessType { -constexpr ConstStringRef readonly("readonly"); -constexpr ConstStringRef writeonly("writeonly"); -constexpr ConstStringRef readwrite("readwrite"); +inline constexpr ConstStringRef readonly("readonly"); +inline constexpr ConstStringRef writeonly("writeonly"); +inline constexpr ConstStringRef readwrite("readwrite"); } // namespace AccessType } // namespace PayloadArgument namespace BindingTableIndex { -constexpr ConstStringRef btiValue("bti_value"); -constexpr ConstStringRef argIndex("arg_index"); +inline constexpr ConstStringRef btiValue("bti_value"); +inline constexpr ConstStringRef argIndex("arg_index"); } // namespace BindingTableIndex namespace PerThreadPayloadArgument { -constexpr ConstStringRef argType("arg_type"); -constexpr ConstStringRef offset("offset"); -constexpr ConstStringRef size("size"); +inline constexpr ConstStringRef argType("arg_type"); +inline constexpr ConstStringRef offset("offset"); +inline constexpr ConstStringRef size("size"); namespace ArgType { -constexpr ConstStringRef packedLocalIds("packed_local_ids"); -constexpr ConstStringRef localId("local_id"); +inline constexpr ConstStringRef packedLocalIds("packed_local_ids"); +inline constexpr ConstStringRef localId("local_id"); } // namespace ArgType } // namespace PerThreadPayloadArgument namespace PerThreadMemoryBuffer { -constexpr ConstStringRef allocationType("type"); -constexpr ConstStringRef memoryUsage("usage"); -constexpr ConstStringRef size("size"); -constexpr ConstStringRef isSimtThread("is_simt_thread"); -constexpr ConstStringRef slot("slot"); +inline constexpr ConstStringRef allocationType("type"); +inline constexpr ConstStringRef memoryUsage("usage"); +inline constexpr ConstStringRef size("size"); +inline constexpr ConstStringRef isSimtThread("is_simt_thread"); +inline constexpr ConstStringRef slot("slot"); namespace AllocationType { -constexpr ConstStringRef global("global"); -constexpr ConstStringRef scratch("scratch"); -constexpr ConstStringRef slm("slm"); +inline constexpr ConstStringRef global("global"); +inline constexpr ConstStringRef scratch("scratch"); +inline constexpr ConstStringRef slm("slm"); } // namespace AllocationType namespace MemoryUsage { -constexpr ConstStringRef privateSpace("private_space"); -constexpr ConstStringRef spillFillSpace("spill_fill_space"); -constexpr ConstStringRef singleSpace("single_space"); +inline constexpr ConstStringRef privateSpace("private_space"); +inline constexpr ConstStringRef spillFillSpace("spill_fill_space"); +inline constexpr ConstStringRef singleSpace("single_space"); } // namespace MemoryUsage } // namespace PerThreadMemoryBuffer namespace ExperimentalProperties { -constexpr ConstStringRef hasNonKernelArgLoad("has_non_kernel_arg_load"); -constexpr ConstStringRef hasNonKernelArgStore("has_non_kernel_arg_store"); -constexpr ConstStringRef hasNonKernelArgAtomic("has_non_kernel_arg_atomic"); +inline constexpr ConstStringRef hasNonKernelArgLoad("has_non_kernel_arg_load"); +inline constexpr ConstStringRef hasNonKernelArgStore("has_non_kernel_arg_store"); +inline constexpr ConstStringRef hasNonKernelArgAtomic("has_non_kernel_arg_atomic"); } // namespace ExperimentalProperties namespace InlineSamplers { -constexpr ConstStringRef samplerIndex("sampler_index"); -constexpr ConstStringRef addrMode("addrmode"); -constexpr ConstStringRef filterMode("filtermode"); -constexpr ConstStringRef normalized("normalized"); +inline constexpr ConstStringRef samplerIndex("sampler_index"); +inline constexpr ConstStringRef addrMode("addrmode"); +inline constexpr ConstStringRef filterMode("filtermode"); +inline constexpr ConstStringRef normalized("normalized"); namespace AddrMode { -constexpr ConstStringRef none("none"); -constexpr ConstStringRef repeat("repeat"); -constexpr ConstStringRef clamp_edge("clamp_edge"); -constexpr ConstStringRef clamp_border("clamp_border"); -constexpr ConstStringRef mirror("mirror"); +inline constexpr ConstStringRef none("none"); +inline constexpr ConstStringRef repeat("repeat"); +inline constexpr ConstStringRef clamp_edge("clamp_edge"); +inline constexpr ConstStringRef clamp_border("clamp_border"); +inline constexpr ConstStringRef mirror("mirror"); } // namespace AddrMode namespace FilterMode { -constexpr ConstStringRef nearest("nearest"); -constexpr ConstStringRef linear("linear"); +inline constexpr ConstStringRef nearest("nearest"); +inline constexpr ConstStringRef linear("linear"); } // namespace FilterMode } // namespace InlineSamplers } // namespace Kernel namespace GlobalHostAccessTable { -constexpr ConstStringRef deviceName("device_name"); -constexpr ConstStringRef hostName("host_name"); +inline constexpr ConstStringRef deviceName("device_name"); +inline constexpr ConstStringRef hostName("host_name"); } // namespace GlobalHostAccessTable namespace Function { -constexpr ConstStringRef name("name"); -constexpr ConstStringRef executionEnv("execution_env"); +inline constexpr ConstStringRef name("name"); +inline constexpr ConstStringRef executionEnv("execution_env"); using namespace Kernel::ExecutionEnv; } // namespace Function namespace KernelMiscInfo { -constexpr ConstStringRef name("name"); -constexpr ConstStringRef argsInfo("args_info"); +inline constexpr ConstStringRef name("name"); +inline constexpr ConstStringRef argsInfo("args_info"); namespace ArgsInfo { -constexpr ConstStringRef index("index"); -constexpr ConstStringRef name("name"); -constexpr ConstStringRef addressQualifier("address_qualifier"); -constexpr ConstStringRef accessQualifier("access_qualifier"); -constexpr ConstStringRef typeName("type_name"); -constexpr ConstStringRef typeQualifiers("type_qualifiers"); +inline constexpr ConstStringRef index("index"); +inline constexpr ConstStringRef name("name"); +inline constexpr ConstStringRef addressQualifier("address_qualifier"); +inline constexpr ConstStringRef accessQualifier("access_qualifier"); +inline constexpr ConstStringRef typeName("type_name"); +inline constexpr ConstStringRef typeQualifiers("type_qualifiers"); } // namespace ArgsInfo } // namespace KernelMiscInfo @@ -433,34 +433,34 @@ using ThreadSchedulingModeT = ThreadSchedulingMode; using IndirectStatelessCountT = int32_t; namespace Defaults { -constexpr BarrierCountT barrierCount = 0; -constexpr DisableMidThreadPreemptionT disableMidThreadPreemption = false; -constexpr EuThreadCountT euThreadCount = 0; -constexpr Has4GBBuffersT has4GBBuffers = false; -constexpr HasDpasT hasDpas = false; -constexpr HasFenceForImageAccessT hasFenceForImageAccess = false; -constexpr HasGlobalAtomicsT hasGlobalAtomics = false; -constexpr HasMultiScratchSpacesT hasMultiScratchSpaces = false; -constexpr HasNonKernelArgAtomicT hasNonKernelArgAtomic = false; -constexpr HasNonKernelArgLoadT hasNonKernelArgLoad = false; -constexpr HasNonKernelArgStoreT hasNonKernelArgStore = false; -constexpr HasNoStatelessWriteT hasNoStatelessWrite = false; -constexpr HasStackCallsT hasStackCalls = false; -constexpr HwPreemptionModeT hwPreemptionMode = -1; -constexpr InlineDataPayloadSizeT inlineDataPayloadSize = 0; -constexpr OffsetToSkipPerThreadDataLoadT offsetToSkipPerThreadDataLoad = 0; -constexpr OffsetToSkipSetFfidGpT offsetToSkipSetFfidGp = 0; -constexpr RequiredSubGroupSizeT requiredSubGroupSize = 0; -constexpr RequiredWorkGroupSizeT requiredWorkGroupSize = {0, 0, 0}; -constexpr RequireDisableEUFusionT requireDisableEUFusion = false; -constexpr SlmSizeT slmSize = 0; -constexpr SubgroupIndependentForwardProgressT subgroupIndependentForwardProgress = false; -constexpr WorkgroupWalkOrderDimensionsT workgroupWalkOrderDimensions = {0, 1, 2}; -constexpr ThreadSchedulingModeT threadSchedulingMode = ThreadSchedulingModeUnknown; -constexpr IndirectStatelessCountT indirectStatelessCount = 0; +inline constexpr BarrierCountT barrierCount = 0; +inline constexpr DisableMidThreadPreemptionT disableMidThreadPreemption = false; +inline constexpr EuThreadCountT euThreadCount = 0; +inline constexpr Has4GBBuffersT has4GBBuffers = false; +inline constexpr HasDpasT hasDpas = false; +inline constexpr HasFenceForImageAccessT hasFenceForImageAccess = false; +inline constexpr HasGlobalAtomicsT hasGlobalAtomics = false; +inline constexpr HasMultiScratchSpacesT hasMultiScratchSpaces = false; +inline constexpr HasNonKernelArgAtomicT hasNonKernelArgAtomic = false; +inline constexpr HasNonKernelArgLoadT hasNonKernelArgLoad = false; +inline constexpr HasNonKernelArgStoreT hasNonKernelArgStore = false; +inline constexpr HasNoStatelessWriteT hasNoStatelessWrite = false; +inline constexpr HasStackCallsT hasStackCalls = false; +inline constexpr HwPreemptionModeT hwPreemptionMode = -1; +inline constexpr InlineDataPayloadSizeT inlineDataPayloadSize = 0; +inline constexpr OffsetToSkipPerThreadDataLoadT offsetToSkipPerThreadDataLoad = 0; +inline constexpr OffsetToSkipSetFfidGpT offsetToSkipSetFfidGp = 0; +inline constexpr RequiredSubGroupSizeT requiredSubGroupSize = 0; +inline constexpr RequiredWorkGroupSizeT requiredWorkGroupSize = {0, 0, 0}; +inline constexpr RequireDisableEUFusionT requireDisableEUFusion = false; +inline constexpr SlmSizeT slmSize = 0; +inline constexpr SubgroupIndependentForwardProgressT subgroupIndependentForwardProgress = false; +inline constexpr WorkgroupWalkOrderDimensionsT workgroupWalkOrderDimensions = {0, 1, 2}; +inline constexpr ThreadSchedulingModeT threadSchedulingMode = ThreadSchedulingModeUnknown; +inline constexpr IndirectStatelessCountT indirectStatelessCount = 0; } // namespace Defaults -constexpr ConstStringRef required[] = { +inline constexpr ConstStringRef required[] = { Tags::Kernel::ExecutionEnv::grfCount, Tags::Kernel::ExecutionEnv::simdSize}; @@ -508,10 +508,10 @@ using WorkgroupSizeHint = std::array; using VecTypeHintT = ConstStringRef; namespace Defaults { -constexpr IntelReqdSubgroupSizeT intelReqdSubgroupSize = 0; -constexpr IntelReqdWorkgroupWalkOrder intelReqdWorkgroupWalkOrder = {0, 0, 0}; -constexpr ReqdWorkgroupSizeT reqdWorkgroupSize = {0, 0, 0}; -constexpr WorkgroupSizeHint workgroupSizeHint = {0, 0, 0}; +inline constexpr IntelReqdSubgroupSizeT intelReqdSubgroupSize = 0; +inline constexpr IntelReqdWorkgroupWalkOrder intelReqdWorkgroupWalkOrder = {0, 0, 0}; +inline constexpr ReqdWorkgroupSizeT reqdWorkgroupSize = {0, 0, 0}; +inline constexpr WorkgroupSizeHint workgroupSizeHint = {0, 0, 0}; } // namespace Defaults struct AttributesBaseT { @@ -529,7 +529,7 @@ namespace DebugEnv { using DebugSurfaceBTIT = int32_t; namespace Defaults { -constexpr DebugSurfaceBTIT debugSurfaceBTI = -1; +inline constexpr DebugSurfaceBTIT debugSurfaceBTI = -1; } // namespace Defaults struct DebugEnvBaseT { @@ -674,10 +674,10 @@ using SlmAlignmentT = uint8_t; using SamplerIndexT = int32_t; namespace Defaults { -constexpr ArgIndexT argIndex = -1; -constexpr SlmAlignmentT slmArgAlignment = 16U; -constexpr SamplerIndexT samplerIndex = -1; -constexpr SourceOffseT sourceOffset = -1; +inline constexpr ArgIndexT argIndex = -1; +inline constexpr SlmAlignmentT slmArgAlignment = 16U; +inline constexpr SamplerIndexT samplerIndex = -1; +inline constexpr SourceOffseT sourceOffset = -1; } // namespace Defaults struct PayloadArgumentBaseT { @@ -733,8 +733,8 @@ using IsSimtThreadT = bool; using Slot = int32_t; namespace Defaults { -constexpr IsSimtThreadT isSimtThread = false; -constexpr Slot slot = 0U; +inline constexpr IsSimtThreadT isSimtThread = false; +inline constexpr Slot slot = 0U; } // namespace Defaults struct PerThreadMemoryBufferBaseT { @@ -770,10 +770,10 @@ using FilterModeT = FilterMode; using NormalizedT = bool; namespace Defaults { -constexpr SamplerIndexT samplerIndex = -1; -constexpr AddrModeT addrMode = AddrMode::Unknown; -constexpr FilterModeT filterMode = FilterMode::Unknown; -constexpr NormalizedT normalized = false; +inline constexpr SamplerIndexT samplerIndex = -1; +inline constexpr AddrModeT addrMode = AddrMode::Unknown; +inline constexpr FilterModeT filterMode = FilterMode::Unknown; +inline constexpr NormalizedT normalized = false; }; // namespace Defaults struct InlineSamplerBaseT { diff --git a/shared/source/device_binary_format/elf/zeinfo_enum_lookup.h b/shared/source/device_binary_format/elf/zeinfo_enum_lookup.h index a02f41a728..e0f7b64314 100644 --- a/shared/source/device_binary_format/elf/zeinfo_enum_lookup.h +++ b/shared/source/device_binary_format/elf/zeinfo_enum_lookup.h @@ -21,54 +21,54 @@ using namespace Tags::Kernel::PayloadArgument::ArgType::Sampler; using namespace Tags::Kernel::PayloadArgument::ArgType::Sampler::Vme; using ArgType = Types::Kernel::ArgType; -constexpr ConstStringRef name = "argument type"; -constexpr LookupArray lookup({{{packedLocalIds, ArgType::ArgTypePackedLocalIds}, - {localId, ArgType::ArgTypeLocalId}, - {localSize, ArgType::ArgTypeLocalSize}, - {groupCount, ArgType::ArgTypeGroupCount}, - {globalSize, ArgType::ArgTypeGlobalSize}, - {enqueuedLocalSize, ArgType::ArgTypeEnqueuedLocalSize}, - {globalIdOffset, ArgType::ArgTypeGlobalIdOffset}, - {privateBaseStateless, ArgType::ArgTypePrivateBaseStateless}, - {argByvalue, ArgType::ArgTypeArgByvalue}, - {argBypointer, ArgType::ArgTypeArgBypointer}, - {bufferAddress, ArgType::ArgTypeBufferAddress}, - {bufferOffset, ArgType::ArgTypeBufferOffset}, - {printfBuffer, ArgType::ArgTypePrintfBuffer}, - {workDimensions, ArgType::ArgTypeWorkDimensions}, - {implicitArgBuffer, ArgType::ArgTypeImplicitArgBuffer}, - {width, ArgType::ArgTypeImageWidth}, - {height, ArgType::ArgTypeImageHeight}, - {depth, ArgType::ArgTypeImageDepth}, - {channelDataType, ArgType::ArgTypeImageChannelDataType}, - {channelOrder, ArgType::ArgTypeImageChannelOrder}, - {arraySize, ArgType::ArgTypeImageArraySize}, - {numSamples, ArgType::ArgTypeImageNumSamples}, - {numMipLevels, ArgType::ArgTypeImageMipLevels}, - {flatBaseOffset, ArgType::ArgTypeImageFlatBaseOffset}, - {flatWidth, ArgType::ArgTypeImageFlatWidth}, - {flatHeight, ArgType::ArgTypeImageFlatHeight}, - {flatPitch, ArgType::ArgTypeImageFlatPitch}, - {snapWa, ArgType::ArgTypeSamplerSnapWa}, - {normCoords, ArgType::ArgTypeSamplerNormCoords}, - {addrMode, ArgType::ArgTypeSamplerAddrMode}, - {blockType, ArgType::ArgTypeVmeMbBlockType}, - {subpixelMode, ArgType::ArgTypeVmeSubpixelMode}, - {sadAdjustMode, ArgType::ArgTypeVmeSadAdjustMode}, - {searchPathType, ArgType::ArgTypeVmeSearchPathType}, - {syncBuffer, ArgType::ArgTypeSyncBuffer}, - {rtGlobalBuffer, ArgType::ArgTypeRtGlobalBuffer}}}); +inline constexpr ConstStringRef name = "argument type"; +inline constexpr LookupArray lookup({{{packedLocalIds, ArgType::ArgTypePackedLocalIds}, + {localId, ArgType::ArgTypeLocalId}, + {localSize, ArgType::ArgTypeLocalSize}, + {groupCount, ArgType::ArgTypeGroupCount}, + {globalSize, ArgType::ArgTypeGlobalSize}, + {enqueuedLocalSize, ArgType::ArgTypeEnqueuedLocalSize}, + {globalIdOffset, ArgType::ArgTypeGlobalIdOffset}, + {privateBaseStateless, ArgType::ArgTypePrivateBaseStateless}, + {argByvalue, ArgType::ArgTypeArgByvalue}, + {argBypointer, ArgType::ArgTypeArgBypointer}, + {bufferAddress, ArgType::ArgTypeBufferAddress}, + {bufferOffset, ArgType::ArgTypeBufferOffset}, + {printfBuffer, ArgType::ArgTypePrintfBuffer}, + {workDimensions, ArgType::ArgTypeWorkDimensions}, + {implicitArgBuffer, ArgType::ArgTypeImplicitArgBuffer}, + {width, ArgType::ArgTypeImageWidth}, + {height, ArgType::ArgTypeImageHeight}, + {depth, ArgType::ArgTypeImageDepth}, + {channelDataType, ArgType::ArgTypeImageChannelDataType}, + {channelOrder, ArgType::ArgTypeImageChannelOrder}, + {arraySize, ArgType::ArgTypeImageArraySize}, + {numSamples, ArgType::ArgTypeImageNumSamples}, + {numMipLevels, ArgType::ArgTypeImageMipLevels}, + {flatBaseOffset, ArgType::ArgTypeImageFlatBaseOffset}, + {flatWidth, ArgType::ArgTypeImageFlatWidth}, + {flatHeight, ArgType::ArgTypeImageFlatHeight}, + {flatPitch, ArgType::ArgTypeImageFlatPitch}, + {snapWa, ArgType::ArgTypeSamplerSnapWa}, + {normCoords, ArgType::ArgTypeSamplerNormCoords}, + {addrMode, ArgType::ArgTypeSamplerAddrMode}, + {blockType, ArgType::ArgTypeVmeMbBlockType}, + {subpixelMode, ArgType::ArgTypeVmeSubpixelMode}, + {sadAdjustMode, ArgType::ArgTypeVmeSadAdjustMode}, + {searchPathType, ArgType::ArgTypeVmeSearchPathType}, + {syncBuffer, ArgType::ArgTypeSyncBuffer}, + {rtGlobalBuffer, ArgType::ArgTypeRtGlobalBuffer}}}); static_assert(lookup.size() == ArgType::ArgTypeMax - 1, "Every enum field must be present"); } // namespace ArgType namespace MemoryAddressingMode { namespace AddrModeTag = Tags::Kernel::PayloadArgument::MemoryAddressingMode; using AddrMode = Types::Kernel::PayloadArgument::MemoryAddressingMode; -constexpr LookupArray lookup({{{AddrModeTag::stateless, AddrMode::MemoryAddressingModeStateless}, - {AddrModeTag::stateful, AddrMode::MemoryAddressingModeStateful}, - {AddrModeTag::bindless, AddrMode::MemoryAddressingModeBindless}, - {AddrModeTag::sharedLocalMemory, AddrMode::MemoryAddressingModeSharedLocalMemory}}}); -constexpr ConstStringRef name = "addressing mode"; +inline constexpr LookupArray lookup({{{AddrModeTag::stateless, AddrMode::MemoryAddressingModeStateless}, + {AddrModeTag::stateful, AddrMode::MemoryAddressingModeStateful}, + {AddrModeTag::bindless, AddrMode::MemoryAddressingModeBindless}, + {AddrModeTag::sharedLocalMemory, AddrMode::MemoryAddressingModeSharedLocalMemory}}}); +inline constexpr ConstStringRef name = "addressing mode"; static_assert(lookup.size() == AddrMode::MemoryAddressIngModeMax - 1, "Every enum field must be present"); } // namespace MemoryAddressingMode @@ -76,12 +76,12 @@ namespace AddressSpace { using namespace Tags::Kernel::PayloadArgument::AddrSpace; using AddrSpace = Types::Kernel::PayloadArgument::AddressSpace; -constexpr ConstStringRef name = "address space"; -constexpr LookupArray lookup({{{global, AddrSpace::AddressSpaceGlobal}, - {local, AddrSpace::AddressSpaceLocal}, - {constant, AddrSpace::AddressSpaceConstant}, - {image, AddrSpace::AddressSpaceImage}, - {sampler, AddrSpace::AddressSpaceSampler}}}); +inline constexpr ConstStringRef name = "address space"; +inline constexpr LookupArray lookup({{{global, AddrSpace::AddressSpaceGlobal}, + {local, AddrSpace::AddressSpaceLocal}, + {constant, AddrSpace::AddressSpaceConstant}, + {image, AddrSpace::AddressSpaceImage}, + {sampler, AddrSpace::AddressSpaceSampler}}}); static_assert(lookup.size() == AddrSpace::AddressSpaceMax - 1, "Every enum field must be present"); } // namespace AddressSpace @@ -89,103 +89,103 @@ namespace AccessType { using namespace Tags::Kernel::PayloadArgument::AccessType; using AccessType = Types::Kernel::PayloadArgument::AccessType; -constexpr ConstStringRef name = "access type"; -constexpr LookupArray lookup({{{readonly, AccessType::AccessTypeReadonly}, - {writeonly, AccessType::AccessTypeWriteonly}, - {readwrite, AccessType::AccessTypeReadwrite}}}); +inline constexpr ConstStringRef name = "access type"; +inline constexpr LookupArray lookup({{{readonly, AccessType::AccessTypeReadonly}, + {writeonly, AccessType::AccessTypeWriteonly}, + {readwrite, AccessType::AccessTypeReadwrite}}}); static_assert(lookup.size() == AccessType::AccessTypeMax - 1, "Every enum field must be present"); } // namespace AccessType namespace AllocationType { using namespace Tags::Kernel::PerThreadMemoryBuffer::AllocationType; using AllocType = Types::Kernel::PerThreadMemoryBuffer::AllocationType; -constexpr ConstStringRef name = "allocation type"; -constexpr LookupArray lookup({{{global, AllocType::AllocationTypeGlobal}, - {scratch, AllocType::AllocationTypeScratch}, - {slm, AllocType::AllocationTypeSlm}}}); +inline constexpr ConstStringRef name = "allocation type"; +inline constexpr LookupArray lookup({{{global, AllocType::AllocationTypeGlobal}, + {scratch, AllocType::AllocationTypeScratch}, + {slm, AllocType::AllocationTypeSlm}}}); static_assert(lookup.size() == AllocType::AllocationTypeMax - 1, "Every enum field must be present"); } // namespace AllocationType namespace MemoryUsage { using namespace NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PerThreadMemoryBuffer::MemoryUsage; using MemoryUsage = NEO::Elf::ZebinKernelMetadata::Types::Kernel::PerThreadMemoryBuffer::MemoryUsage; -constexpr ConstStringRef name = "memory usage"; -constexpr LookupArray lookup({{{privateSpace, MemoryUsage::MemoryUsagePrivateSpace}, - {spillFillSpace, MemoryUsage::MemoryUsageSpillFillSpace}, - {singleSpace, MemoryUsage::MemoryUsageSingleSpace}}}); +inline constexpr ConstStringRef name = "memory usage"; +inline constexpr LookupArray lookup({{{privateSpace, MemoryUsage::MemoryUsagePrivateSpace}, + {spillFillSpace, MemoryUsage::MemoryUsageSpillFillSpace}, + {singleSpace, MemoryUsage::MemoryUsageSingleSpace}}}); static_assert(lookup.size() == MemoryUsage::MemoryUsageMax - 1, "Every enum field must be present"); } // namespace MemoryUsage namespace ImageType { using namespace Tags::Kernel::PayloadArgument::ImageType; using ImageType = Types::Kernel::PayloadArgument::ImageType; -constexpr ConstStringRef name = "image type"; -constexpr LookupArray lookup({{{imageTypeBuffer, ImageType::ImageTypeBuffer}, - {imageType1D, ImageType::ImageType1D}, - {imageType1DArray, ImageType::ImageType1DArray}, - {imageType2D, ImageType::ImageType2D}, - {imageType2DArray, ImageType::ImageType2DArray}, - {imageType3D, ImageType::ImageType3D}, - {imageTypeCube, ImageType::ImageTypeCube}, - {imageTypeCubeArray, ImageType::ImageTypeCubeArray}, - {imageType2DDepth, ImageType::ImageType2DDepth}, - {imageType2DArrayDepth, ImageType::ImageType2DArrayDepth}, - {imageType2DMSAA, ImageType::ImageType2DMSAA}, - {imageType2DMSAADepth, ImageType::ImageType2DMSAADepth}, - {imageType2DArrayMSAA, ImageType::ImageType2DArrayMSAA}, - {imageType2DArrayMSAADepth, ImageType::ImageType2DArrayMSAADepth}, - {imageType2DMedia, ImageType::ImageType2DMedia}, - {imageType2DMediaBlock, ImageType::ImageType2DMediaBlock}}}); +inline constexpr ConstStringRef name = "image type"; +inline constexpr LookupArray lookup({{{imageTypeBuffer, ImageType::ImageTypeBuffer}, + {imageType1D, ImageType::ImageType1D}, + {imageType1DArray, ImageType::ImageType1DArray}, + {imageType2D, ImageType::ImageType2D}, + {imageType2DArray, ImageType::ImageType2DArray}, + {imageType3D, ImageType::ImageType3D}, + {imageTypeCube, ImageType::ImageTypeCube}, + {imageTypeCubeArray, ImageType::ImageTypeCubeArray}, + {imageType2DDepth, ImageType::ImageType2DDepth}, + {imageType2DArrayDepth, ImageType::ImageType2DArrayDepth}, + {imageType2DMSAA, ImageType::ImageType2DMSAA}, + {imageType2DMSAADepth, ImageType::ImageType2DMSAADepth}, + {imageType2DArrayMSAA, ImageType::ImageType2DArrayMSAA}, + {imageType2DArrayMSAADepth, ImageType::ImageType2DArrayMSAADepth}, + {imageType2DMedia, ImageType::ImageType2DMedia}, + {imageType2DMediaBlock, ImageType::ImageType2DMediaBlock}}}); static_assert(lookup.size() == ImageType::ImageTypeMax - 1, "Every enum field must be present"); } // namespace ImageType namespace SamplerType { using namespace Tags::Kernel::PayloadArgument::SamplerType; using SamplerType = Types::Kernel::PayloadArgument::SamplerType; -constexpr ConstStringRef name = "sampler type"; -constexpr LookupArray lookup({{{samplerTypeTexture, SamplerType::SamplerTypeTexture}, - {samplerType8x8, SamplerType::SamplerType8x8}, - {samplerType2DConsolve8x8, SamplerType::SamplerType2DConvolve8x8}, - {samplerTypeErode8x8, SamplerType::SamplerTypeErode8x8}, - {samplerTypeDilate8x8, SamplerType::SamplerTypeDilate8x8}, - {samplerTypeMinMaxFilter8x8, SamplerType::SamplerTypeMinMaxFilter8x8}, - {samplerTypeCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8}, - {samplerTypeBoolCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8}, - {samplerTypeBoolSum8x8, SamplerType::SamplerTypeBoolSum8x8}, - {samplerTypeVME, SamplerType::SamplerTypeVME}, - {samplerTypeVE, SamplerType::SamplerTypeVE}, - {samplerTypeVD, SamplerType::SamplerTypeVD}}}); +inline constexpr ConstStringRef name = "sampler type"; +inline constexpr LookupArray lookup({{{samplerTypeTexture, SamplerType::SamplerTypeTexture}, + {samplerType8x8, SamplerType::SamplerType8x8}, + {samplerType2DConsolve8x8, SamplerType::SamplerType2DConvolve8x8}, + {samplerTypeErode8x8, SamplerType::SamplerTypeErode8x8}, + {samplerTypeDilate8x8, SamplerType::SamplerTypeDilate8x8}, + {samplerTypeMinMaxFilter8x8, SamplerType::SamplerTypeMinMaxFilter8x8}, + {samplerTypeCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8}, + {samplerTypeBoolCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8}, + {samplerTypeBoolSum8x8, SamplerType::SamplerTypeBoolSum8x8}, + {samplerTypeVME, SamplerType::SamplerTypeVME}, + {samplerTypeVE, SamplerType::SamplerTypeVE}, + {samplerTypeVD, SamplerType::SamplerTypeVD}}}); static_assert(lookup.size() == SamplerType::SamplerTypeMax - 1, "Every enum field must be present"); } // namespace SamplerType namespace ThreadSchedulingMode { using namespace Tags::Kernel::ExecutionEnv::ThreadSchedulingMode; using ThreadSchedulingMode = Types::Kernel::ExecutionEnv::ThreadSchedulingMode; -constexpr ConstStringRef name = "thread scheduling mode"; -constexpr LookupArray lookup({{{ageBased, ThreadSchedulingMode::ThreadSchedulingModeAgeBased}, - {roundRobin, ThreadSchedulingMode::ThreadSchedulingModeRoundRobin}, - {roundRobinStall, ThreadSchedulingMode::ThreadSchedulingModeRoundRobinStall}}}); +inline constexpr ConstStringRef name = "thread scheduling mode"; +inline constexpr LookupArray lookup({{{ageBased, ThreadSchedulingMode::ThreadSchedulingModeAgeBased}, + {roundRobin, ThreadSchedulingMode::ThreadSchedulingModeRoundRobin}, + {roundRobinStall, ThreadSchedulingMode::ThreadSchedulingModeRoundRobinStall}}}); static_assert(lookup.size() == ThreadSchedulingMode::ThreadSchedulingModeMax - 1, "Every enum field must be present"); } // namespace ThreadSchedulingMode namespace InlineSamplerAddrMode { using namespace Tags::Kernel::InlineSamplers::AddrMode; using AddrMode = Types::Kernel::InlineSamplers::AddrMode; -constexpr ConstStringRef name = "inline sampler addressing mode"; -constexpr LookupArray lookup({{{none, AddrMode::None}, - {repeat, AddrMode::Repeat}, - {clamp_edge, AddrMode::ClampEdge}, - {clamp_border, AddrMode::ClampBorder}, - {mirror, AddrMode::Mirror}}}); +inline constexpr ConstStringRef name = "inline sampler addressing mode"; +inline constexpr LookupArray lookup({{{none, AddrMode::None}, + {repeat, AddrMode::Repeat}, + {clamp_edge, AddrMode::ClampEdge}, + {clamp_border, AddrMode::ClampBorder}, + {mirror, AddrMode::Mirror}}}); static_assert(lookup.size() == static_cast(AddrMode::Max) - 1, "Every enum field must be present"); } // namespace InlineSamplerAddrMode namespace InlineSamplerFilterMode { using namespace Tags::Kernel::InlineSamplers::FilterMode; using FilterMode = Types::Kernel::InlineSamplers::FilterMode; -constexpr ConstStringRef name = "inline sampler filter mode"; -constexpr LookupArray lookup({{{nearest, FilterMode::Nearest}, - {linear, FilterMode::Linear}}}); +inline constexpr ConstStringRef name = "inline sampler filter mode"; +inline constexpr LookupArray lookup({{{nearest, FilterMode::Nearest}, + {linear, FilterMode::Linear}}}); static_assert(lookup.size() == FilterMode::Max - 1, "Every enum field must be present"); } // namespace InlineSamplerFilterMode diff --git a/shared/source/device_binary_format/zebin_decoder.h b/shared/source/device_binary_format/zebin_decoder.h index 78030fdeb4..d6ae0245ca 100644 --- a/shared/source/device_binary_format/zebin_decoder.h +++ b/shared/source/device_binary_format/zebin_decoder.h @@ -18,7 +18,7 @@ namespace NEO { -constexpr NEO::Elf::ZebinKernelMetadata::Types::Version zeInfoDecoderVersion{1, 26}; +inline constexpr NEO::Elf::ZebinKernelMetadata::Types::Version zeInfoDecoderVersion{1, 26}; template struct ZebinSections { diff --git a/shared/source/direct_submission/direct_submission_hw.h b/shared/source/direct_submission/direct_submission_hw.h index ffd50774c5..43586e2de8 100644 --- a/shared/source/direct_submission/direct_submission_hw.h +++ b/shared/source/direct_submission/direct_submission_hw.h @@ -45,8 +45,8 @@ enum class DirectSubmissionSfenceMode : int32_t { }; namespace UllsDefaults { -constexpr bool defaultDisableCacheFlush = true; -constexpr bool defaultDisableMonitorFence = false; +inline constexpr bool defaultDisableCacheFlush = true; +inline constexpr bool defaultDisableMonitorFence = false; } // namespace UllsDefaults struct BatchBuffer; diff --git a/shared/source/direct_submission/direct_submission_hw_diagnostic_mode.h b/shared/source/direct_submission/direct_submission_hw_diagnostic_mode.h index 0ec95d518b..f55cded187 100644 --- a/shared/source/direct_submission/direct_submission_hw_diagnostic_mode.h +++ b/shared/source/direct_submission/direct_submission_hw_diagnostic_mode.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,9 +14,9 @@ namespace NEO { #if defined(_RELEASE_INTERNAL) || (_DEBUG) -constexpr bool directSubmissionDiagnosticAvailable = true; +inline constexpr bool directSubmissionDiagnosticAvailable = true; #else -constexpr bool directSubmissionDiagnosticAvailable = false; +inline constexpr bool directSubmissionDiagnosticAvailable = false; #endif struct DirectSubmissionSingleDelta { diff --git a/shared/source/gmm_helper/cache_settings_helper.h b/shared/source/gmm_helper/cache_settings_helper.h index 027c5b1de7..6f9c3803f1 100644 --- a/shared/source/gmm_helper/cache_settings_helper.h +++ b/shared/source/gmm_helper/cache_settings_helper.h @@ -9,7 +9,7 @@ #include "shared/source/gmm_helper/gmm_lib.h" namespace CacheSettings { -constexpr uint32_t unknownMocs = GMM_RESOURCE_USAGE_UNKNOWN; +inline constexpr uint32_t unknownMocs = GMM_RESOURCE_USAGE_UNKNOWN; } // namespace CacheSettings namespace NEO { diff --git a/shared/source/helpers/engine_node_helper.h b/shared/source/helpers/engine_node_helper.h index 4f69039efc..4ad8a204a6 100644 --- a/shared/source/helpers/engine_node_helper.h +++ b/shared/source/helpers/engine_node_helper.h @@ -63,8 +63,8 @@ constexpr bool isLinkBcs(aub_stream::EngineType engineType) { return engineType >= aub_stream::ENGINE_BCS1 && engineType <= aub_stream::ENGINE_BCS8; } -constexpr uint32_t numLinkedCopyEngines = 8u; -constexpr size_t oddLinkedCopyEnginesMask = 0b010101010; +inline constexpr uint32_t numLinkedCopyEngines = 8u; +inline constexpr size_t oddLinkedCopyEnginesMask = 0b010101010; bool linkCopyEnginesSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield); diff --git a/shared/source/helpers/get_info.h b/shared/source/helpers/get_info.h index 499ec47256..3cc7bca37d 100644 --- a/shared/source/helpers/get_info.h +++ b/shared/source/helpers/get_info.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ namespace GetInfo { -constexpr size_t invalidSourceSize = std::numeric_limits::max(); +inline constexpr size_t invalidSourceSize = std::numeric_limits::max(); inline GetInfoStatus getInfo(void *destParamValue, size_t destParamValueSize, const void *srcParamValue, size_t srcParamValueSize) { diff --git a/shared/source/helpers/hw_walk_order.h b/shared/source/helpers/hw_walk_order.h index 820f91c57d..85374b88e1 100644 --- a/shared/source/helpers/hw_walk_order.h +++ b/shared/source/helpers/hw_walk_order.h @@ -13,17 +13,17 @@ namespace NEO { namespace HwWalkOrderHelper { //make sure table below matches Hardware Spec -constexpr uint32_t walkOrderPossibilties = 6u; -constexpr uint8_t X = 0; -constexpr uint8_t Y = 1; -constexpr uint8_t Z = 2; -constexpr std::array linearWalk = {X, Y, Z}; -constexpr std::array yOrderWalk = {Y, X, Z}; -constexpr std::array compatibleDimensionOrders[walkOrderPossibilties] = {linearWalk, // 0 1 2 - {X, Z, Y}, // 0 2 1 - yOrderWalk, // 1 0 2 - {Z, X, Y}, // 1 2 0 - {Y, Z, X}, // 2 0 1 - {Z, Y, X}}; // 2 1 0 +inline constexpr uint32_t walkOrderPossibilties = 6u; +inline constexpr uint8_t X = 0; +inline constexpr uint8_t Y = 1; +inline constexpr uint8_t Z = 2; +inline constexpr std::array linearWalk = {X, Y, Z}; +inline constexpr std::array yOrderWalk = {Y, X, Z}; +inline constexpr std::array compatibleDimensionOrders[walkOrderPossibilties] = {linearWalk, // 0 1 2 + {X, Z, Y}, // 0 2 1 + yOrderWalk, // 1 0 2 + {Z, X, Y}, // 1 2 0 + {Y, Z, X}, // 2 0 1 + {Z, Y, X}}; // 2 1 0 } // namespace HwWalkOrderHelper } // namespace NEO diff --git a/shared/source/helpers/kmd_notify_properties.h b/shared/source/helpers/kmd_notify_properties.h index ecebfb54fa..7dd484b7c5 100644 --- a/shared/source/helpers/kmd_notify_properties.h +++ b/shared/source/helpers/kmd_notify_properties.h @@ -32,8 +32,8 @@ struct KmdNotifyProperties { }; namespace KmdNotifyConstants { -constexpr int64_t timeoutInMicrosecondsForDisconnectedAcLine = 10000; -constexpr uint32_t minimumTaskCountDiffToCheckAcLine = 10; +inline constexpr int64_t timeoutInMicrosecondsForDisconnectedAcLine = 10000; +inline constexpr uint32_t minimumTaskCountDiffToCheckAcLine = 10; } // namespace KmdNotifyConstants class KmdNotifyHelper { diff --git a/shared/source/helpers/neo_driver_version.h b/shared/source/helpers/neo_driver_version.h index 113a3355d3..9c6580ff6a 100644 --- a/shared/source/helpers/neo_driver_version.h +++ b/shared/source/helpers/neo_driver_version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ #define TOSTR(b) QTR(b) namespace NEO { -constexpr const char *driverVersion = TOSTR(NEO_OCL_DRIVER_VERSION); +inline constexpr const char *driverVersion = TOSTR(NEO_OCL_DRIVER_VERSION); } #undef QTR diff --git a/shared/source/helpers/pipeline_select_helper.h b/shared/source/helpers/pipeline_select_helper.h index c738eff739..5c35583e5a 100644 --- a/shared/source/helpers/pipeline_select_helper.h +++ b/shared/source/helpers/pipeline_select_helper.h @@ -9,8 +9,8 @@ #include namespace NEO { -constexpr uint32_t pipelineSelectEnablePipelineSelectMaskBits = 0x3; -constexpr uint32_t pipelineSelectMediaSamplerDopClockGateMaskBits = 0x10; -constexpr uint32_t pipelineSelectMediaSamplerPowerClockGateMaskBits = 0x40; -constexpr uint32_t pipelineSelectSystolicModeEnableMaskBits = 0x80; +inline constexpr uint32_t pipelineSelectEnablePipelineSelectMaskBits = 0x3; +inline constexpr uint32_t pipelineSelectMediaSamplerDopClockGateMaskBits = 0x10; +inline constexpr uint32_t pipelineSelectMediaSamplerPowerClockGateMaskBits = 0x40; +inline constexpr uint32_t pipelineSelectSystolicModeEnableMaskBits = 0x80; } // namespace NEO diff --git a/shared/source/helpers/register_offsets.h b/shared/source/helpers/register_offsets.h index 8b1d193296..4a67407df2 100644 --- a/shared/source/helpers/register_offsets.h +++ b/shared/source/helpers/register_offsets.h @@ -8,42 +8,42 @@ #pragma once #include -constexpr uint32_t L3SQC_BIT_LQSC_RO_PERF_DIS = 0x08000000; -constexpr uint32_t L3SQC_REG4 = 0xB118; +inline constexpr uint32_t L3SQC_BIT_LQSC_RO_PERF_DIS = 0x08000000; +inline constexpr uint32_t L3SQC_REG4 = 0xB118; -constexpr uint32_t GPGPU_WALKER_COOKIE_VALUE_BEFORE_WALKER = 0xFFFFFFFF; -constexpr uint32_t GPGPU_WALKER_COOKIE_VALUE_AFTER_WALKER = 0x00000000; +inline constexpr uint32_t GPGPU_WALKER_COOKIE_VALUE_BEFORE_WALKER = 0xFFFFFFFF; +inline constexpr uint32_t GPGPU_WALKER_COOKIE_VALUE_AFTER_WALKER = 0x00000000; //Threads Dimension X/Y/Z -constexpr uint32_t GPUGPU_DISPATCHDIMX = 0x2500; -constexpr uint32_t GPUGPU_DISPATCHDIMY = 0x2504; -constexpr uint32_t GPUGPU_DISPATCHDIMZ = 0x2508; +inline constexpr uint32_t GPUGPU_DISPATCHDIMX = 0x2500; +inline constexpr uint32_t GPUGPU_DISPATCHDIMY = 0x2504; +inline constexpr uint32_t GPUGPU_DISPATCHDIMZ = 0x2508; -constexpr uint32_t GPUGPU_DISPATCHDIM[3] = {GPUGPU_DISPATCHDIMX, GPUGPU_DISPATCHDIMY, GPUGPU_DISPATCHDIMZ}; +inline constexpr uint32_t GPUGPU_DISPATCHDIM[3] = {GPUGPU_DISPATCHDIMX, GPUGPU_DISPATCHDIMY, GPUGPU_DISPATCHDIMZ}; -constexpr uint32_t CS_GPR_R0 = 0x2600; -constexpr uint32_t CS_GPR_R1 = 0x2608; -constexpr uint32_t CS_GPR_R2 = 0x2610; -constexpr uint32_t CS_GPR_R3 = 0x2618; -constexpr uint32_t CS_GPR_R4 = 0x2620; -constexpr uint32_t CS_GPR_R5 = 0x2628; -constexpr uint32_t CS_GPR_R6 = 0x2630; -constexpr uint32_t CS_GPR_R7 = 0x2638; -constexpr uint32_t CS_GPR_R8 = 0x2640; -constexpr uint32_t CS_GPR_R9 = 0x2648; -constexpr uint32_t CS_GPR_R10 = 0x2650; -constexpr uint32_t CS_GPR_R11 = 0x2658; -constexpr uint32_t CS_GPR_R12 = 0x2660; -constexpr uint32_t CS_GPR_R13 = 0x2668; -constexpr uint32_t CS_GPR_R14 = 0x2670; -constexpr uint32_t CS_GPR_R15 = 0x2678; +inline constexpr uint32_t CS_GPR_R0 = 0x2600; +inline constexpr uint32_t CS_GPR_R1 = 0x2608; +inline constexpr uint32_t CS_GPR_R2 = 0x2610; +inline constexpr uint32_t CS_GPR_R3 = 0x2618; +inline constexpr uint32_t CS_GPR_R4 = 0x2620; +inline constexpr uint32_t CS_GPR_R5 = 0x2628; +inline constexpr uint32_t CS_GPR_R6 = 0x2630; +inline constexpr uint32_t CS_GPR_R7 = 0x2638; +inline constexpr uint32_t CS_GPR_R8 = 0x2640; +inline constexpr uint32_t CS_GPR_R9 = 0x2648; +inline constexpr uint32_t CS_GPR_R10 = 0x2650; +inline constexpr uint32_t CS_GPR_R11 = 0x2658; +inline constexpr uint32_t CS_GPR_R12 = 0x2660; +inline constexpr uint32_t CS_GPR_R13 = 0x2668; +inline constexpr uint32_t CS_GPR_R14 = 0x2670; +inline constexpr uint32_t CS_GPR_R15 = 0x2678; -constexpr uint32_t CS_PREDICATE_RESULT = 0x2418; -constexpr uint32_t CS_PREDICATE_RESULT_2 = 0x23BC; +inline constexpr uint32_t CS_PREDICATE_RESULT = 0x2418; +inline constexpr uint32_t CS_PREDICATE_RESULT_2 = 0x23BC; -constexpr uint32_t SEMA_WAIT_POLL = 0x0224c; +inline constexpr uint32_t SEMA_WAIT_POLL = 0x0224c; //Alu opcodes -constexpr uint32_t NUM_ALU_INST_FOR_READ_MODIFY_WRITE = 4; +inline constexpr uint32_t NUM_ALU_INST_FOR_READ_MODIFY_WRITE = 4; enum class AluRegisters : uint32_t { OPCODE_NONE = 0x000, @@ -86,7 +86,7 @@ enum class AluRegisters : uint32_t { R_CF = 0x33 }; -constexpr uint32_t GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW = 0x23A8; +inline constexpr uint32_t GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW = 0x23A8; -constexpr uint32_t REG_GLOBAL_TIMESTAMP_LDW = 0x2358; -constexpr uint32_t REG_GLOBAL_TIMESTAMP_UN = 0x235c; +inline constexpr uint32_t REG_GLOBAL_TIMESTAMP_LDW = 0x2358; +inline constexpr uint32_t REG_GLOBAL_TIMESTAMP_UN = 0x235c; diff --git a/shared/source/helpers/string_helpers.h b/shared/source/helpers/string_helpers.h index 841448eef3..65ec1d0138 100644 --- a/shared/source/helpers/string_helpers.h +++ b/shared/source/helpers/string_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,7 +15,7 @@ #include namespace StringHelpers { -constexpr int maximalStackSizeSizes = 16; +inline constexpr int maximalStackSizeSizes = 16; inline int createCombinedString( std::string &dstString, diff --git a/shared/source/indirect_heap/indirect_heap.h b/shared/source/indirect_heap/indirect_heap.h index c254b1542b..026b83c8df 100644 --- a/shared/source/indirect_heap/indirect_heap.h +++ b/shared/source/indirect_heap/indirect_heap.h @@ -15,7 +15,7 @@ namespace NEO { -constexpr size_t defaultHeapSize = 64 * KB; +inline constexpr size_t defaultHeapSize = 64 * KB; inline size_t getDefaultHeapSize() { auto defaultSize = defaultHeapSize; diff --git a/shared/source/kernel/grf_config.h b/shared/source/kernel/grf_config.h index 84023cbac0..00898afa74 100644 --- a/shared/source/kernel/grf_config.h +++ b/shared/source/kernel/grf_config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,7 +10,7 @@ #include namespace GrfConfig { -constexpr uint32_t DefaultGrfNumber = 128u; -constexpr uint32_t LargeGrfNumber = 256u; -constexpr uint32_t NotApplicable = 0u; +inline constexpr uint32_t DefaultGrfNumber = 128u; +inline constexpr uint32_t LargeGrfNumber = 256u; +inline constexpr uint32_t NotApplicable = 0u; } // namespace GrfConfig diff --git a/shared/source/kernel/implicit_args.h b/shared/source/kernel/implicit_args.h index 636107af6b..bff2ca31e8 100644 --- a/shared/source/kernel/implicit_args.h +++ b/shared/source/kernel/implicit_args.h @@ -41,7 +41,7 @@ struct ImplicitArgs { static_assert((sizeof(ImplicitArgs) & 31) == 0, "Implicit args size need to be aligned to 32"); static_assert(std::is_pod::value); -constexpr const char *implicitArgsRelocationSymbolName = "__INTEL_PATCH_CROSS_THREAD_OFFSET_OFF_R0"; +inline constexpr const char *implicitArgsRelocationSymbolName = "__INTEL_PATCH_CROSS_THREAD_OFFSET_OFF_R0"; namespace ImplicitArgsHelper { std::array getDimensionOrderForLocalIds(const uint8_t *workgroupDimensionsOrder, std::optional> hwGenerationOfLocalIdsParams); diff --git a/shared/source/kernel/kernel_arg_metadata.h b/shared/source/kernel/kernel_arg_metadata.h index 1d2a429376..bc522a58c2 100644 --- a/shared/source/kernel/kernel_arg_metadata.h +++ b/shared/source/kernel/kernel_arg_metadata.h @@ -29,13 +29,13 @@ enum AccessQualifier : uint8_t { }; namespace AccessQualifierStrings { -constexpr ConstStringRef none = "NONE"; -constexpr ConstStringRef readOnly = "read_only"; -constexpr ConstStringRef writeOnly = "write_only"; -constexpr ConstStringRef readWrite = "read_write"; -constexpr ConstStringRef underscoreReadOnly = "__read_only"; -constexpr ConstStringRef underscoreWriteOnly = "__write_only"; -constexpr ConstStringRef underscoreReadWrite = "__read_write"; +inline constexpr ConstStringRef none = "NONE"; +inline constexpr ConstStringRef readOnly = "read_only"; +inline constexpr ConstStringRef writeOnly = "write_only"; +inline constexpr ConstStringRef readWrite = "read_write"; +inline constexpr ConstStringRef underscoreReadOnly = "__read_only"; +inline constexpr ConstStringRef underscoreWriteOnly = "__write_only"; +inline constexpr ConstStringRef underscoreReadWrite = "__read_write"; } // namespace AccessQualifierStrings enum AddressSpaceQualifier : uint8_t { @@ -47,11 +47,11 @@ enum AddressSpaceQualifier : uint8_t { }; namespace AddressSpaceQualifierStrings { -constexpr ConstStringRef addrGlobal = "__global"; -constexpr ConstStringRef addrLocal = "__local"; -constexpr ConstStringRef addrPrivate = "__private"; -constexpr ConstStringRef addrConstant = "__constant"; -constexpr ConstStringRef addrNotSpecified = "not_specified"; +inline constexpr ConstStringRef addrGlobal = "__global"; +inline constexpr ConstStringRef addrLocal = "__local"; +inline constexpr ConstStringRef addrPrivate = "__private"; +inline constexpr ConstStringRef addrConstant = "__constant"; +inline constexpr ConstStringRef addrNotSpecified = "not_specified"; } // namespace AddressSpaceQualifierStrings constexpr AccessQualifier parseAccessQualifier(ConstStringRef str) { @@ -119,10 +119,10 @@ union TypeQualifiers { }; namespace TypeQualifierStrings { -constexpr ConstStringRef qualConst = "const"; -constexpr ConstStringRef qualVolatile = "volatile"; -constexpr ConstStringRef qualRestrict = "restrict"; -constexpr ConstStringRef qualPipe = "pipe"; +inline constexpr ConstStringRef qualConst = "const"; +inline constexpr ConstStringRef qualVolatile = "volatile"; +inline constexpr ConstStringRef qualRestrict = "restrict"; +inline constexpr ConstStringRef qualPipe = "pipe"; } // namespace TypeQualifierStrings inline TypeQualifiers parseTypeQualifiers(ConstStringRef str) { @@ -188,7 +188,7 @@ struct ArgTypeTraits { }; namespace { -constexpr auto ArgTypeMetadataSize = sizeof(ArgTypeTraits); +inline constexpr auto ArgTypeMetadataSize = sizeof(ArgTypeTraits); static_assert(ArgTypeMetadataSize <= 4, "Keep it small"); } // namespace diff --git a/shared/source/kernel/kernel_properties.h b/shared/source/kernel/kernel_properties.h index 86c469a285..2bf83b912a 100644 --- a/shared/source/kernel/kernel_properties.h +++ b/shared/source/kernel/kernel_properties.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,9 +9,9 @@ #include -constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE = 1 << 0; // Supports atomic load, store, and exchange -constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_ADD = 1 << 1; // Supports atomic add and subtract -constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX = 1 << 2; // Supports atomic min and max -constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE = 1 << 16; // Supports atomic load, store, and exchange -constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_ADD = 1 << 17; // Supports atomic add and subtract -constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX = 1 << 18; // Supports atomic min and max +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE = 1 << 0; // Supports atomic load, store, and exchange +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_ADD = 1 << 1; // Supports atomic add and subtract +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX = 1 << 2; // Supports atomic min and max +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE = 1 << 16; // Supports atomic load, store, and exchange +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_ADD = 1 << 17; // Supports atomic add and subtract +inline constexpr uint64_t FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX = 1 << 18; // Supports atomic min and max diff --git a/shared/source/unified_memory/usm_memory_support.h b/shared/source/unified_memory/usm_memory_support.h index 4a0f1999c2..15488da3d5 100644 --- a/shared/source/unified_memory/usm_memory_support.h +++ b/shared/source/unified_memory/usm_memory_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,7 @@ #include -constexpr uint64_t UNIFIED_SHARED_MEMORY_ACCESS = 1 << 0; -constexpr uint64_t UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS = 1 << 1; -constexpr uint64_t UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS = 1 << 2; -constexpr uint64_t UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS = 1 << 3; +inline constexpr uint64_t UNIFIED_SHARED_MEMORY_ACCESS = 1 << 0; +inline constexpr uint64_t UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS = 1 << 1; +inline constexpr uint64_t UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS = 1 << 2; +inline constexpr uint64_t UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS = 1 << 3; diff --git a/shared/test/common/helpers/cmd_buffer_validator.h b/shared/test/common/helpers/cmd_buffer_validator.h index de5685dbf8..768e75d9c3 100644 --- a/shared/test/common/helpers/cmd_buffer_validator.h +++ b/shared/test/common/helpers/cmd_buffer_validator.h @@ -91,8 +91,8 @@ struct MatchCmd { bool matchesAny = false; }; -constexpr int32_t AnyNumber = -1; -constexpr int32_t AtLeastOne = -2; +inline constexpr int32_t AnyNumber = -1; +inline constexpr int32_t AtLeastOne = -2; inline std::string countToString(int32_t count) { if (count == AnyNumber) { return "AnyNumber"; diff --git a/shared/test/common/helpers/memory_management.h b/shared/test/common/helpers/memory_management.h index 7771f71baa..cc23e87095 100644 --- a/shared/test/common/helpers/memory_management.h +++ b/shared/test/common/helpers/memory_management.h @@ -51,8 +51,8 @@ struct AllocationEvent { // NOLINT(clang-analyzer-optin.performance.Padding) bool fastLeakDetectionEnabled = false; }; -constexpr auto maxEvents = 1024 * 1024; -constexpr auto fastEvents = 1024 * 1024; +inline constexpr auto maxEvents = 1024 * 1024; +inline constexpr auto fastEvents = 1024 * 1024; extern AllocationEvent eventsAllocated[maxEvents]; extern AllocationEvent eventsDeallocated[maxEvents]; @@ -75,11 +75,11 @@ extern bool detailedAllocationLoggingActive; extern bool fastLeakDetectionEnabled; extern void (*deleteCallback)(void *); -constexpr auto nonfailingAllocation = static_cast(-1); -constexpr auto invalidLeakIndex = static_cast(-1); +inline constexpr auto nonfailingAllocation = static_cast(-1); +inline constexpr auto invalidLeakIndex = static_cast(-1); // capture allocations call stacks to print them during memory leak in ULTs -constexpr bool captureCallStacks = false; +inline constexpr bool captureCallStacks = false; int detectLeaks(); std::string printCallStack(const MemoryManagement::AllocationEvent &event); diff --git a/shared/test/common/helpers/ult_limits.h b/shared/test/common/helpers/ult_limits.h index 467c083d75..a0667f3002 100644 --- a/shared/test/common/helpers/ult_limits.h +++ b/shared/test/common/helpers/ult_limits.h @@ -9,5 +9,5 @@ #include namespace NEO { -constexpr uint32_t maxRootDeviceCount = 3u; +inline constexpr uint32_t maxRootDeviceCount = 3u; } // namespace NEO diff --git a/shared/test/common/mocks/mock_graphics_allocation.h b/shared/test/common/mocks/mock_graphics_allocation.h index 498f9c7c9b..63ef523728 100644 --- a/shared/test/common/mocks/mock_graphics_allocation.h +++ b/shared/test/common/mocks/mock_graphics_allocation.h @@ -12,8 +12,8 @@ namespace NEO { -constexpr uint32_t mockRootDeviceIndex = 0u; -constexpr DeviceBitfield mockDeviceBitfield(0b1); +inline constexpr uint32_t mockRootDeviceIndex = 0u; +inline constexpr DeviceBitfield mockDeviceBitfield(0b1); class MockGraphicsAllocation : public MemoryAllocation { public: diff --git a/shared/test/common/mocks/mock_wddm.h b/shared/test/common/mocks/mock_wddm.h index 4f582afa4f..1835555613 100644 --- a/shared/test/common/mocks/mock_wddm.h +++ b/shared/test/common/mocks/mock_wddm.h @@ -23,7 +23,7 @@ namespace NEO { class GraphicsAllocation; -constexpr auto virtualAllocAddress = is64bit ? 0x7FFFF0000000 : 0xFF000000; +inline constexpr auto virtualAllocAddress = is64bit ? 0x7FFFF0000000 : 0xFF000000; class WddmMock : public Wddm { public: diff --git a/shared/test/common/test_configuration/aub_tests/test_mode.h b/shared/test/common/test_configuration/aub_tests/test_mode.h index a0bebbf9eb..e2d2b91aa9 100644 --- a/shared/test/common/test_configuration/aub_tests/test_mode.h +++ b/shared/test/common/test_configuration/aub_tests/test_mode.h @@ -10,5 +10,5 @@ #include "shared/test/common/tests_configuration.h" namespace NEO { -constexpr TestMode defaultTestMode = TestMode::AubTests; +inline constexpr TestMode defaultTestMode = TestMode::AubTests; } // namespace NEO diff --git a/shared/test/common/test_configuration/unit_tests/test_mode.h b/shared/test/common/test_configuration/unit_tests/test_mode.h index a7d1c087b6..202d224b96 100644 --- a/shared/test/common/test_configuration/unit_tests/test_mode.h +++ b/shared/test/common/test_configuration/unit_tests/test_mode.h @@ -10,5 +10,5 @@ #include "shared/test/common/tests_configuration.h" namespace NEO { -constexpr TestMode defaultTestMode = TestMode::UnitTests; +inline constexpr TestMode defaultTestMode = TestMode::UnitTests; } // namespace NEO diff --git a/shared/test/common/xe_hpc_core/pvc/product_configs_pvc.h b/shared/test/common/xe_hpc_core/pvc/product_configs_pvc.h index aa9a8d2e2f..b001f835a8 100644 --- a/shared/test/common/xe_hpc_core/pvc/product_configs_pvc.h +++ b/shared/test/common/xe_hpc_core/pvc/product_configs_pvc.h @@ -9,7 +9,7 @@ #include "platforms.h" namespace AOT_PVC { -constexpr AOT::PRODUCT_CONFIG productConfigs[] = { +inline constexpr AOT::PRODUCT_CONFIG productConfigs[] = { AOT::PVC_XL_A0, AOT::PVC_XL_A0P, AOT::PVC_XT_A0, diff --git a/shared/test/common/xe_hpg_core/dg2/product_configs_dg2.h b/shared/test/common/xe_hpg_core/dg2/product_configs_dg2.h index 407835c08e..a8ee6e153c 100644 --- a/shared/test/common/xe_hpg_core/dg2/product_configs_dg2.h +++ b/shared/test/common/xe_hpg_core/dg2/product_configs_dg2.h @@ -9,7 +9,7 @@ #include "platforms.h" namespace AOT_DG2 { -constexpr AOT::PRODUCT_CONFIG productConfigs[] = { +inline constexpr AOT::PRODUCT_CONFIG productConfigs[] = { AOT::DG2_G10_A0, AOT::DG2_G10_A1, AOT::DG2_G10_B0,