diff --git a/level_zero/core/source/gen11/CMakeLists.txt b/level_zero/core/source/gen11/CMakeLists.txt deleted file mode 100644 index 2e2950330f..0000000000 --- a/level_zero/core/source/gen11/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN11) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.h - ${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/l0_gfx_core_helper_gen11.cpp - ) - add_subdirectories() - -endif() diff --git a/level_zero/core/source/gen11/cmdlist_gen11.cpp b/level_zero/core/source/gen11/cmdlist_gen11.cpp deleted file mode 100644 index b0f7c870d4..0000000000 --- a/level_zero/core/source/gen11/cmdlist_gen11.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/pipe_control_args.h" - -#include "level_zero/core/source/cmdlist/cmdlist_hw.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw.inl" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl" -#include "level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl" -#include "level_zero/core/source/device/device.h" - -#include "cmdlist_extended.inl" - -namespace L0 { - -template <> -void CommandListCoreFamily::applyMemoryRangesBarrier(uint32_t numRanges, - const size_t *pRangeSizes, - const void **pRanges) { - NEO::PipeControlArgs args; - args.dcFlushEnable = this->dcFlushSupport; - NEO::MemorySynchronizationCommands::addSingleBarrier(*commandContainer.getCommandStream(), args); -} - -template struct CommandListCoreFamily; -template struct CommandListCoreFamilyImmediate; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/cmdlist_gen11.h b/level_zero/core/source/gen11/cmdlist_gen11.h deleted file mode 100644 index 8cd67a306c..0000000000 --- a/level_zero/core/source/gen11/cmdlist_gen11.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_cmds_base.h" - -#include "level_zero/core/source/cmdlist/cmdlist_hw.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" - -namespace L0 { -template -struct CommandListProductFamily : public CommandListCoreFamily { - using CommandListCoreFamily::CommandListCoreFamily; -}; - -template -struct CommandListImmediateProductFamily : public CommandListCoreFamilyImmediate { - using CommandListCoreFamilyImmediate::CommandListCoreFamilyImmediate; -}; -} // namespace L0 diff --git a/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp b/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp deleted file mode 100644 index 91c21c7f76..0000000000 --- a/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" -#include "level_zero/core/source/helpers/l0_populate_factory.h" - -namespace NEO { - -using Family = Gen11Family; - -struct EnableL0Gen11 { - EnableL0Gen11() { - L0::populateFactoryTable>(); - } -}; - -static EnableL0Gen11 enable; -} // namespace NEO diff --git a/level_zero/core/source/gen11/icllp/CMakeLists.txt b/level_zero/core/source/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 783e4c6ad3..0000000000 --- a/level_zero/core/source/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_ICLLP) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_icllp.cpp - ) -endif() diff --git a/level_zero/core/source/gen11/icllp/cmdlist_icllp.cpp b/level_zero/core/source/gen11/icllp/cmdlist_icllp.cpp deleted file mode 100644 index 625484658a..0000000000 --- a/level_zero/core/source/gen11/icllp/cmdlist_icllp.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" - -#include "level_zero/core/source/gen11/cmdlist_gen11.h" - -namespace L0 { -static CommandListPopulateFactory> - populateICLLP; - -static CommandListImmediatePopulateFactory> - populateICLLPImmediate; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/icllp/cmdqueue_icllp.cpp b/level_zero/core/source/gen11/icllp/cmdqueue_icllp.cpp deleted file mode 100644 index 73228b639f..0000000000 --- a/level_zero/core/source/gen11/icllp/cmdqueue_icllp.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/gen11/hw_info.h" - -#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl" -#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl" - -#include "igfxfmid.h" - -namespace L0 { -template struct CommandQueueHw; -static CommandQueuePopulateFactory> populateICLLP; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/icllp/image_icllp.cpp b/level_zero/core/source/gen11/icllp/image_icllp.cpp deleted file mode 100644 index c9cdd8da0d..0000000000 --- a/level_zero/core/source/gen11/icllp/image_icllp.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/gen11/hw_info.h" - -#include "level_zero/core/source/image/image_hw.inl" - -namespace L0 { - -template <> -struct ImageProductFamily : public ImageCoreFamily { - using ImageCoreFamily::ImageCoreFamily; - - ze_result_t initialize(Device *device, const ze_image_desc_t *desc) override { - return ImageCoreFamily::initialize(device, desc); - }; -}; - -static ImagePopulateFactory> populateICLLP; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/icllp/kernel_icllp.cpp b/level_zero/core/source/gen11/icllp/kernel_icllp.cpp deleted file mode 100644 index e743dc2da7..0000000000 --- a/level_zero/core/source/gen11/icllp/kernel_icllp.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" - -#include "level_zero/core/source/kernel/kernel_hw.h" - -namespace L0 { - -static KernelPopulateFactory> populateICLLP; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/icllp/sampler_icllp.cpp b/level_zero/core/source/gen11/icllp/sampler_icllp.cpp deleted file mode 100644 index c4f4baa9be..0000000000 --- a/level_zero/core/source/gen11/icllp/sampler_icllp.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/gen11/hw_info.h" - -#include "level_zero/core/source/sampler/sampler_hw.inl" - -namespace L0 { - -template <> -struct SamplerProductFamily : public SamplerCoreFamily { - using SamplerCoreFamily::SamplerCoreFamily; -}; - -static SamplerPopulateFactory> populateICLLP; - -} // namespace L0 diff --git a/level_zero/core/source/gen11/l0_gfx_core_helper_gen11.cpp b/level_zero/core/source/gen11/l0_gfx_core_helper_gen11.cpp deleted file mode 100644 index 776b31ef83..0000000000 --- a/level_zero/core/source/gen11/l0_gfx_core_helper_gen11.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_base.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_icllp.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_pvc.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl" -#include "level_zero/core/source/helpers/l0_populate_factory.h" - -namespace L0 { - -using Family = NEO::Gen11Family; -static auto gfxCore = IGFX_GEN11_CORE; - -#include "level_zero/core/source/helpers/l0_gfx_core_helper_factory_init.inl" - -template class L0GfxCoreHelperHw; - -} // namespace L0 diff --git a/level_zero/core/source/gen8/CMakeLists.txt b/level_zero/core/source/gen8/CMakeLists.txt deleted file mode 100644 index 3c53ae7d74..0000000000 --- a/level_zero/core/source/gen8/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN8) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen8.cpp - ) -endif() diff --git a/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp b/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp deleted file mode 100644 index 47b4b65a45..0000000000 --- a/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" - -namespace NEO { - -using Family = Gen8Family; - -struct EnableL0Gen8 { - EnableL0Gen8() { - } -}; - -static EnableL0Gen8 enable; -} // namespace NEO diff --git a/level_zero/core/source/gen9/CMakeLists.txt b/level_zero/core/source/gen9/CMakeLists.txt deleted file mode 100644 index 149b570e73..0000000000 --- a/level_zero/core/source/gen9/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN9) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.h - ${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/l0_gfx_core_helper_gen9.cpp - ) - - add_subdirectories() -endif() diff --git a/level_zero/core/source/gen9/cfl/CMakeLists.txt b/level_zero/core/source/gen9/cfl/CMakeLists.txt deleted file mode 100644 index b41c7c7d77..0000000000 --- a/level_zero/core/source/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_CFL) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_cfl.cpp - ) -endif() diff --git a/level_zero/core/source/gen9/cfl/cmdlist_cfl.cpp b/level_zero/core/source/gen9/cfl/cmdlist_cfl.cpp deleted file mode 100644 index 8ff935f44e..0000000000 --- a/level_zero/core/source/gen9/cfl/cmdlist_cfl.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/core/source/gen9/cmdlist_gen9.h" - -namespace L0 { - -static CommandListPopulateFactory> - populateCFL; - -static CommandListImmediatePopulateFactory> - populateCFLImmediate; -} // namespace L0 diff --git a/level_zero/core/source/gen9/cfl/cmdqueue_cfl.cpp b/level_zero/core/source/gen9/cfl/cmdqueue_cfl.cpp deleted file mode 100644 index 4afac1df77..0000000000 --- a/level_zero/core/source/gen9/cfl/cmdqueue_cfl.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl" -#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl" - -#include "igfxfmid.h" - -namespace L0 { -template struct CommandQueueHw; -static CommandQueuePopulateFactory> populateCFL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/cfl/image_cfl.cpp b/level_zero/core/source/gen9/cfl/image_cfl.cpp deleted file mode 100644 index bddf60b775..0000000000 --- a/level_zero/core/source/gen9/cfl/image_cfl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/image/image_hw.inl" - -namespace L0 { - -template <> -struct ImageProductFamily : public ImageCoreFamily { - using ImageCoreFamily::ImageCoreFamily; -}; - -static ImagePopulateFactory> populateCFL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/cfl/kernel_cfl.cpp b/level_zero/core/source/gen9/cfl/kernel_cfl.cpp deleted file mode 100644 index 1752f86721..0000000000 --- a/level_zero/core/source/gen9/cfl/kernel_cfl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" - -#include "level_zero/core/source/kernel/kernel_hw.h" - -namespace L0 { - -static KernelPopulateFactory> populateCFL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/cfl/sampler_cfl.cpp b/level_zero/core/source/gen9/cfl/sampler_cfl.cpp deleted file mode 100644 index 3c27fbbec1..0000000000 --- a/level_zero/core/source/gen9/cfl/sampler_cfl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/sampler/sampler_hw.inl" - -namespace L0 { - -template <> -struct SamplerProductFamily : public SamplerCoreFamily { - using SamplerCoreFamily::SamplerCoreFamily; -}; - -static SamplerPopulateFactory> populateCFL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/cmdlist_gen9.cpp b/level_zero/core/source/gen9/cmdlist_gen9.cpp deleted file mode 100644 index 4d4f54602a..0000000000 --- a/level_zero/core/source/gen9/cmdlist_gen9.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/pipe_control_args.h" - -#include "level_zero/core/source/cmdlist/cmdlist_hw.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw.inl" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl" -#include "level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl" -#include "level_zero/core/source/device/device.h" - -#include "cmdlist_extended.inl" - -namespace L0 { - -template <> -void CommandListCoreFamily::applyMemoryRangesBarrier(uint32_t numRanges, - const size_t *pRangeSizes, - const void **pRanges) { - NEO::PipeControlArgs args; - args.dcFlushEnable = this->dcFlushSupport; - NEO::MemorySynchronizationCommands::addSingleBarrier(*commandContainer.getCommandStream(), args); -} - -template <> -void CommandListCoreFamily::programL3(bool isSLMused) { - NEO::EncodeL3State::encode(commandContainer, isSLMused); -} - -template struct CommandListCoreFamily; -template struct CommandListCoreFamilyImmediate; -} // namespace L0 diff --git a/level_zero/core/source/gen9/cmdlist_gen9.h b/level_zero/core/source/gen9/cmdlist_gen9.h deleted file mode 100644 index 044befd16c..0000000000 --- a/level_zero/core/source/gen9/cmdlist_gen9.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/cmdlist/cmdlist_hw.h" -#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" - -#include "igfxfmid.h" - -namespace L0 { - -template -struct CommandListProductFamily : public CommandListCoreFamily { - using CommandListCoreFamily::CommandListCoreFamily; -}; - -template -struct CommandListImmediateProductFamily : public CommandListCoreFamilyImmediate { - using CommandListCoreFamilyImmediate::CommandListCoreFamilyImmediate; -}; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp b/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp deleted file mode 100644 index 6e4395d93f..0000000000 --- a/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" -#include "level_zero/core/source/helpers/l0_populate_factory.h" - -namespace NEO { - -using Family = Gen9Family; - -struct EnableL0Gen9 { - EnableL0Gen9() { - L0::populateFactoryTable>(); - } -}; - -static EnableL0Gen9 enable; -} // namespace NEO diff --git a/level_zero/core/source/gen9/kbl/CMakeLists.txt b/level_zero/core/source/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 6d791ac2c8..0000000000 --- a/level_zero/core/source/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_KBL) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_kbl.cpp - ) -endif() diff --git a/level_zero/core/source/gen9/kbl/cmdlist_kbl.cpp b/level_zero/core/source/gen9/kbl/cmdlist_kbl.cpp deleted file mode 100644 index ca176febcf..0000000000 --- a/level_zero/core/source/gen9/kbl/cmdlist_kbl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/core/source/gen9/cmdlist_gen9.h" - -namespace L0 { -static CommandListPopulateFactory> - populateKBL; - -static CommandListImmediatePopulateFactory> - populateKBLImmediate; -} // namespace L0 diff --git a/level_zero/core/source/gen9/kbl/cmdqueue_kbl.cpp b/level_zero/core/source/gen9/kbl/cmdqueue_kbl.cpp deleted file mode 100644 index 0687abd5dc..0000000000 --- a/level_zero/core/source/gen9/kbl/cmdqueue_kbl.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl" -#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl" - -#include "igfxfmid.h" - -namespace L0 { -template struct CommandQueueHw; -static CommandQueuePopulateFactory> populateKBL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/kbl/image_kbl.cpp b/level_zero/core/source/gen9/kbl/image_kbl.cpp deleted file mode 100644 index 9b501d93bc..0000000000 --- a/level_zero/core/source/gen9/kbl/image_kbl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/image/image_hw.inl" - -namespace L0 { - -template <> -struct ImageProductFamily : public ImageCoreFamily { - using ImageCoreFamily::ImageCoreFamily; -}; - -static ImagePopulateFactory> populateKBL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/kbl/kernel_kbl.cpp b/level_zero/core/source/gen9/kbl/kernel_kbl.cpp deleted file mode 100644 index 045318e7cd..0000000000 --- a/level_zero/core/source/gen9/kbl/kernel_kbl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" - -#include "level_zero/core/source/kernel/kernel_hw.h" - -namespace L0 { - -static KernelPopulateFactory> populateKBL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/kbl/sampler_kbl.cpp b/level_zero/core/source/gen9/kbl/sampler_kbl.cpp deleted file mode 100644 index c97d033981..0000000000 --- a/level_zero/core/source/gen9/kbl/sampler_kbl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/sampler/sampler_hw.inl" - -namespace L0 { - -template <> -struct SamplerProductFamily : public SamplerCoreFamily { - using SamplerCoreFamily::SamplerCoreFamily; -}; - -static SamplerPopulateFactory> populateKBL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/l0_gfx_core_helper_gen9.cpp b/level_zero/core/source/gen9/l0_gfx_core_helper_gen9.cpp deleted file mode 100644 index 15844fa22c..0000000000 --- a/level_zero/core/source/gen9/l0_gfx_core_helper_gen9.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_base.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_icllp.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_pvc.inl" -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl" -#include "level_zero/core/source/helpers/l0_populate_factory.h" - -namespace L0 { - -using Family = NEO::Gen9Family; -static auto gfxCore = IGFX_GEN9_CORE; - -#include "level_zero/core/source/helpers/l0_gfx_core_helper_factory_init.inl" - -template class L0GfxCoreHelperHw; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/skl/CMakeLists.txt b/level_zero/core/source/gen9/skl/CMakeLists.txt deleted file mode 100644 index 747b811f3a..0000000000 --- a/level_zero/core/source/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_SKL) - target_sources(${L0_STATIC_LIB_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_skl.cpp - ) -endif() diff --git a/level_zero/core/source/gen9/skl/cmdlist_skl.cpp b/level_zero/core/source/gen9/skl/cmdlist_skl.cpp deleted file mode 100644 index 98dee04a95..0000000000 --- a/level_zero/core/source/gen9/skl/cmdlist_skl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/core/source/gen9/cmdlist_gen9.h" - -namespace L0 { - -static CommandListPopulateFactory> - populateSKL; - -static CommandListImmediatePopulateFactory> - populateSKLImmediate; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/skl/cmdqueue_skl.cpp b/level_zero/core/source/gen9/skl/cmdqueue_skl.cpp deleted file mode 100644 index 7711ad3120..0000000000 --- a/level_zero/core/source/gen9/skl/cmdqueue_skl.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl" -#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl" - -#include "igfxfmid.h" - -namespace L0 { -template struct CommandQueueHw; -static CommandQueuePopulateFactory> populateSKL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/skl/image_skl.cpp b/level_zero/core/source/gen9/skl/image_skl.cpp deleted file mode 100644 index c01b436d9c..0000000000 --- a/level_zero/core/source/gen9/skl/image_skl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/image/image_hw.inl" - -namespace L0 { - -template <> -struct ImageProductFamily : public ImageCoreFamily { - using ImageCoreFamily::ImageCoreFamily; -}; - -static ImagePopulateFactory> populateSKL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/skl/kernel_skl.cpp b/level_zero/core/source/gen9/skl/kernel_skl.cpp deleted file mode 100644 index 72a7cc6564..0000000000 --- a/level_zero/core/source/gen9/skl/kernel_skl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" - -#include "level_zero/core/source/kernel/kernel_hw.h" - -namespace L0 { - -static KernelPopulateFactory> populateSKL; - -} // namespace L0 diff --git a/level_zero/core/source/gen9/skl/sampler_skl.cpp b/level_zero/core/source/gen9/skl/sampler_skl.cpp deleted file mode 100644 index 6769b3c092..0000000000 --- a/level_zero/core/source/gen9/skl/sampler_skl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/gen9/hw_info.h" - -#include "level_zero/core/source/sampler/sampler_hw.inl" - -namespace L0 { - -template <> -struct SamplerProductFamily : public SamplerCoreFamily { - using SamplerCoreFamily::SamplerCoreFamily; -}; - -static SamplerPopulateFactory> populateSKL; - -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen11/CMakeLists.txt b/level_zero/core/test/unit_tests/gen11/CMakeLists.txt deleted file mode 100644 index 9c436e45ba..0000000000 --- a/level_zero/core/test/unit_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_thread_arbitration_policy_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_l0_gfx_core_helper_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_module_gen11.cpp - ) -endif() diff --git a/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp b/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp deleted file mode 100644 index 719968cbcd..0000000000 --- a/level_zero/core/test/unit_tests/gen11/test_cmdqueue_thread_arbitration_policy_gen11.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/reg_configs.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h" - -namespace L0 { -namespace ult { - -using CommandQueueThreadArbitrationPolicyTests = Test; - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedThenDefaultRoundRobinThreadArbitrationPolicyIsUsed, - IsGen11HP) { - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - } - } -} - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToZeroThenAgeBasedThreadArbitrationPolicyIsUsed, - IsGen11HP) { - debugManager.flags.OverrideThreadArbitrationPolicy.set(0); - - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased), - cmd->getDataDword()); - } - } -} - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToOneThenRoundRobinThreadArbitrationPolicyIsUsed, - IsGen11HP) { - debugManager.flags.OverrideThreadArbitrationPolicy.set(1); - - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - } - } -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp b/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp deleted file mode 100644 index cc201a61cb..0000000000 --- a/level_zero/core/test/unit_tests/gen11/test_l0_gfx_core_helper_gen11.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" - -namespace L0 { -namespace ult { - -using L0GfxCoreHelperTestGen11 = Test; - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForCmdListHeapSharingSupportThenReturnTrue) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_TRUE(l0GfxCoreHelper.platformSupportsCmdListHeapSharing()); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForStateComputeModeTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateComputeModeTracking()); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForFrontEndTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsFrontEndTracking()); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForPipelineSelectTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsPipelineSelectTracking()); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForStateBaseAddressTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateBaseAddressTracking(device->getNEODevice()->getRootDeviceEnvironment())); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel(device->getNEODevice()->getRootDeviceEnvironment())); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_TRUE(l0GfxCoreHelper.platformSupportsPrimaryBatchBufferCmdList()); -} - -GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenGettingSupportedRTASFormatThenExpectedFormatIsReturned) { - const auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(ZE_RTAS_FORMAT_EXP_INVALID, l0GfxCoreHelper.getSupportedRTASFormat()); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen11/test_module_gen11.cpp b/level_zero/core/test/unit_tests/gen11/test_module_gen11.cpp deleted file mode 100644 index a16dccd3d7..0000000000 --- a/level_zero/core/test/unit_tests/gen11/test_module_gen11.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/kernel/kernel_properties.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" - -namespace L0 { -namespace ult { - -using KernelPropertyTest = Test; - -HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPropertiesCalledThenPropertiesAreCorrectlySet, IsGen11HP) { - ze_device_module_properties_t kernelProperties = {}; - ze_float_atomic_ext_properties_t kernelExtendedProperties = {}; - kernelExtendedProperties.stype = ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES; - kernelProperties.pNext = &kernelExtendedProperties; - ze_result_t res = device->getKernelProperties(&kernelProperties); - EXPECT_EQ(res, ZE_RESULT_SUCCESS); - - const auto &fp16Properties = kernelExtendedProperties.fp16Flags; - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localMinMax); - - EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::globalAdd); - EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::localAdd); - - const auto &fp32Properties = kernelExtendedProperties.fp32Flags; - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localMinMax); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalAdd); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localAdd); - - const auto &fp64Properties = kernelExtendedProperties.fp64Flags; - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localMinMax); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalAdd); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localAdd); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/CMakeLists.txt b/level_zero/core/test/unit_tests/gen9/CMakeLists.txt deleted file mode 100644 index 943d844071..0000000000 --- a/level_zero/core/test/unit_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2020-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_append_launch_kernel_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_append_range_barrier_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_create_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_enqueuecommandlist_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_l0_gfx_core_helper_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_module_gen9.cpp - ) -endif() diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_launch_kernel_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_launch_kernel_gen9.cpp deleted file mode 100644 index dd4b9ab65a..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_launch_kernel_gen9.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/reg_configs.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/cmdlist/cmdlist.h" -#include "level_zero/core/test/unit_tests/fixtures/module_fixture.h" - -namespace L0 { -namespace ult { - -using CommandListAppendLaunchKernel = Test; -using IsGen9Core = IsWithinProducts; - -HWTEST2_F(CommandListAppendLaunchKernel, givenKernelWithSLMThenL3IsProgrammedWithSLMValue, IsGen9Core) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - createKernel(); - ze_result_t returnValue; - std::unique_ptr commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - ze_group_count_t groupCount{1, 1, 1}; - - EXPECT_LE(0u, kernel->kernelImmData->getDescriptor().kernelAttributes.slmInlineSize); - - CmdListKernelLaunchParams launchParams = {}; - auto result = commandList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false); - EXPECT_EQ(ZE_RESULT_SUCCESS, result); - - auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed(); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), usedSpaceAfter)); - - bool foundL3 = false; - for (auto it = cmdList.begin(); it != cmdList.end(); it++) { - auto lri = genCmdCast(*it); - if (lri) { - if (lri->getRegisterOffset() == NEO::L3CNTLRegisterOffset::registerOffset) { - auto value = lri->getDataDword(); - auto dataSlm = NEO::PreambleHelper::getL3Config(commandList->getCmdContainer().getDevice()->getHardwareInfo(), true); - EXPECT_EQ(dataSlm, value); - foundL3 = true; - break; - } - } - } - - EXPECT_TRUE(foundL3); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_range_barrier_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_range_barrier_gen9.cpp deleted file mode 100644 index 12c79a808b..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdlist_append_range_barrier_gen9.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/event/event.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h" - -namespace L0 { -namespace ult { - -using CommandListAppendGen9 = Test; - -TEST(CommandListAppendMemoryRangesBarrier, WhenAppendingMemoryRangesBarrierThenSuccessIsReturned) { - MockCommandList commandList; - - uint32_t numRanges = 1; - const size_t pRangeSizes = 1; - const char *ranges[pRangeSizes]; - const void **pRanges = reinterpret_cast(&ranges[0]); - - auto result = zeCommandListAppendMemoryRangesBarrier(commandList.toHandle(), - numRanges, &pRangeSizes, - pRanges, nullptr, 0, - nullptr); - EXPECT_EQ(ZE_RESULT_SUCCESS, result); -} - -HWTEST2_F(CommandListAppendGen9, WhenAppendingMemoryRangesBarrierThenPipeControlAddedToCommandStream, IsGen9) { - uint32_t numRanges = 1; - const size_t pRangeSizes = 1; - const char *ranges[pRangeSizes]; - const void **pRanges = reinterpret_cast(&ranges[0]); - - auto commandList = new CommandListCoreFamily(); - bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); - ASSERT_FALSE(ret); - auto usedSpaceBefore = - commandList->getCmdContainer().getCommandStream()->getUsed(); - commandList->appendMemoryRangesBarrier(numRanges, &pRangeSizes, pRanges, - nullptr, 0, nullptr); - auto usedSpaceAfter = - commandList->getCmdContainer().getCommandStream()->getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, - ptrOffset( - commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), - usedSpaceAfter)); - - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - auto cmd = genCmdCast(*itorPC); - EXPECT_TRUE(cmd->getCommandStreamerStallEnable()); - EXPECT_TRUE(cmd->getDcFlushEnable()); - - commandList->destroy(); -} - -HWTEST2_F(CommandListAppendGen9, givenSignalEventWhenAppendingMemoryRangesBarrierThenSecondPipeControlAddedToCommandStreamForCompletion, IsGen9) { - uint32_t numRanges = 1; - const size_t pRangeSizes = 1; - const char *ranges[pRangeSizes]; - const void **pRanges = reinterpret_cast(&ranges[0]); - - auto commandList = new CommandListCoreFamily(); - bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); - ASSERT_FALSE(ret); - ze_event_pool_desc_t eventPoolDesc = { - ZE_STRUCTURE_TYPE_EVENT_POOL_DESC, - nullptr, - ZE_EVENT_POOL_FLAG_HOST_VISIBLE, - 1}; - - const ze_event_desc_t eventDesc = { - ZE_STRUCTURE_TYPE_EVENT_DESC, - nullptr, - 0, - ZE_EVENT_SCOPE_FLAG_HOST, - ZE_EVENT_SCOPE_FLAG_HOST}; - - ze_result_t result = ZE_RESULT_SUCCESS; - auto context = std::make_unique(device->getDriverHandle()); - auto hDevice = device->toHandle(); - auto eventPool = whiteboxCast(EventPool::create(device->getDriverHandle(), context.get(), 1, &hDevice, &eventPoolDesc, result)); - EXPECT_EQ(ZE_RESULT_SUCCESS, result); - auto event = whiteboxCast(Event::create(eventPool, &eventDesc, device)); - auto usedSpaceBefore = - commandList->getCmdContainer().getCommandStream()->getUsed(); - commandList->appendMemoryRangesBarrier(numRanges, &pRangeSizes, pRanges, - event->toHandle(), 0, nullptr); - auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - // Ensure we have two pipe controls: one for barrier, one for signal - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), usedSpaceAfter)); - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - auto itor = findAll(cmdList.begin(), cmdList.end()); - ASSERT_FALSE(itor.empty()); - ASSERT_LT(1, static_cast(itor.size())); - - delete event; - delete eventPool; - commandList->destroy(); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdlist_create_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdlist_create_gen9.cpp deleted file mode 100644 index 6abc04022d..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdlist_create_gen9.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/string.h" -#include "shared/source/indirect_heap/indirect_heap.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "level_zero/core/source/event/event.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h" -#include "level_zero/core/test/unit_tests/mocks/mock_kernel.h" -#include "level_zero/core/test/unit_tests/mocks/mock_module.h" - -#include - -namespace L0 { -namespace ult { -class CommandListCreateGen9 : public DeviceFixture, public testing::Test { - public: - void SetUp() override { - DeviceFixture::setUp(); - - dispatchKernelArguments.groupCountX = 1u; - dispatchKernelArguments.groupCountY = 2u; - dispatchKernelArguments.groupCountZ = 3u; - } - - void TearDown() override { - if (buffer) { - alignedFree(buffer); - } - for (auto ptr : isaBuffers) { - free(ptr); - } - - DeviceFixture::tearDown(); - } - - std::vector> mockModules; - std::vector isaBuffers; - ze_group_count_t dispatchKernelArguments; - void *buffer = nullptr; - - void initializeKernel(WhiteBox<::L0::KernelImp> &kernel, - WhiteBox<::L0::KernelImmutableData> &kernelData, - L0::Device *device) { - - uint32_t isaSize = 4096; - void *isaBuffer = malloc(isaSize); - isaBuffers.push_back(isaBuffer); - - kernelData.device = device; - if (!buffer) { - buffer = alignedMalloc(isaSize, 64); - } - auto allocation = new NEO::GraphicsAllocation(0, - 1u /*num gmms*/, - NEO::AllocationType::internalHostMemory, - buffer, - reinterpret_cast(buffer), - 0, - isaSize, - MemoryPool::system4KBPages, - MemoryManager::maxOsContextCount); - if (isaBuffer != nullptr) { - memcpy_s(allocation->getUnderlyingBuffer(), allocation->getUnderlyingBufferSize(), isaBuffer, isaSize); - } - kernelData.isaGraphicsAllocation.reset(allocation); - - uint32_t crossThreadDataSize = 128; - - kernel.crossThreadData.reset(new uint8_t[crossThreadDataSize]); - kernel.crossThreadDataSize = crossThreadDataSize; - - uint32_t perThreadDataSize = 128; - - kernel.perThreadDataForWholeThreadGroup = static_cast(alignedMalloc(perThreadDataSize, 32)); - kernel.perThreadDataSize = perThreadDataSize; - - kernel.kernelImmData = &kernelData; - - kernel.groupSize[0] = 1; - kernel.groupSize[1] = 1; - kernel.groupSize[2] = 1; - - mockModules.emplace_back(std::make_unique(device, nullptr, ModuleType::builtin)); - kernel.module = mockModules.back().get(); - } - void cleanupKernel(WhiteBox<::L0::KernelImmutableData> &kernelData) { - kernelData.isaGraphicsAllocation.reset(nullptr); - } -}; - -GEN9TEST_F(CommandListCreateGen9, WhenGettingCommandListPreemptionModeThenMatchesDevicePreemptionMode) { - ze_result_t returnValue; - auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - - auto result = commandList->close(); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - EXPECT_EQ(device->getDevicePreemptionMode(), commandList->getCommandListPreemptionMode()); - - delete commandList; -} - -GEN9TEST_F(CommandListCreateGen9, GivenDisabledMidThreadPreemptionWhenLaunchingKernelThenThreadGroupModeSet) { - WhiteBox<::L0::KernelImmutableData> kernelInfoThreadGroupData = {}; - NEO::KernelDescriptor kernelDescriptor; - kernelInfoThreadGroupData.kernelDescriptor = &kernelDescriptor; - WhiteBox<::L0::KernelImp> kernelThreadGroup; - - kernelInfoThreadGroupData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1; - - initializeKernel(kernelThreadGroup, kernelInfoThreadGroupData, device); - - ze_result_t returnValue; - auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode()); - - CmdListKernelLaunchParams launchParams = {}; - commandList->appendLaunchKernel(kernelThreadGroup.toHandle(), - dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode()); - - auto result = commandList->close(); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode()); - cleanupKernel(kernelInfoThreadGroupData); - delete commandList; -} - -GEN9TEST_F(CommandListCreateGen9, GivenUsesFencesForReadWriteImagesWhenLaunchingKernelThenMidBatchModeSet) { - WhiteBox<::L0::KernelImmutableData> kernelInfoMidBatchData = {}; - NEO::KernelDescriptor kernelDescriptor; - kernelInfoMidBatchData.kernelDescriptor = &kernelDescriptor; - WhiteBox<::L0::KernelImp> kernelMidBatch; - - kernelInfoMidBatchData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1; - kernelInfoMidBatchData.kernelDescriptor->kernelAttributes.flags.usesFencesForReadWriteImages = 1; - - device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waDisableLSQCROPERFforOCL = true; - - initializeKernel(kernelMidBatch, kernelInfoMidBatchData, device); - - ze_result_t returnValue; - auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode()); - - CmdListKernelLaunchParams launchParams = {}; - commandList->appendLaunchKernel(kernelMidBatch.toHandle(), - dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - EXPECT_EQ(NEO::PreemptionMode::MidBatch, commandList->getCommandListPreemptionMode()); - - auto result = commandList->close(); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - EXPECT_EQ(NEO::PreemptionMode::MidBatch, commandList->getCommandListPreemptionMode()); - cleanupKernel(kernelInfoMidBatchData); - delete commandList; -} - -GEN9TEST_F(CommandListCreateGen9, WhenCommandListHasLowerPreemptionLevelThenDoNotIncreaseAgain) { - WhiteBox<::L0::KernelImmutableData> kernelInfoThreadGroupData = {}; - NEO::KernelDescriptor kernelDescriptor; - kernelInfoThreadGroupData.kernelDescriptor = &kernelDescriptor; - WhiteBox<::L0::KernelImp> kernelThreadGroup; - - kernelInfoThreadGroupData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1; - - initializeKernel(kernelThreadGroup, kernelInfoThreadGroupData, device); - - WhiteBox<::L0::KernelImmutableData> kernelInfoMidThreadData = {}; - NEO::KernelDescriptor kernelDescriptor2; - kernelInfoMidThreadData.kernelDescriptor = &kernelDescriptor2; - - WhiteBox<::L0::KernelImp> kernelMidThread; - - initializeKernel(kernelMidThread, kernelInfoMidThreadData, device); - - ze_result_t returnValue; - auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode()); - - CmdListKernelLaunchParams launchParams = {}; - commandList->appendLaunchKernel(kernelThreadGroup.toHandle(), - dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode()); - - commandList->appendLaunchKernel(kernelMidThread.toHandle(), - dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false); - EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode()); - - auto result = commandList->close(); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode()); - cleanupKernel(kernelInfoThreadGroupData); - cleanupKernel(kernelInfoMidThreadData); - delete commandList; -} -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdlist_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdlist_gen9.cpp deleted file mode 100644 index 751ecb121c..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdlist_gen9.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/reg_configs.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/gen9/cmdlist_gen9.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h" - -namespace L0 { -namespace ult { - -using CommandListProgramL3 = Test; - -template -struct CommandListAdjustStateComputeMode : public WhiteBox<::L0::CommandListProductFamily> { - CommandListAdjustStateComputeMode() : WhiteBox<::L0::CommandListProductFamily>(1) {} -}; - -HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3ThenMmioIsAppended, IsGen9) { - using GfxFamily = typename NEO::GfxFamilyMapper::GfxFamily; - using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM; - const uint32_t registerOffset = NEO::L3CNTLRegisterOffset::registerOffset; - - auto commandList = new CommandListAdjustStateComputeMode(); - bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); - ASSERT_FALSE(ret); - - commandList->programL3(false); - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed())); - bool found = false; - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - for (auto itor : miLoadImm) { - auto cmd = genCmdCast(*itor); - if (registerOffset == cmd->getRegisterOffset()) { - found = true; - break; - } - } - EXPECT_TRUE(found); - - commandList->destroy(); -} - -HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3WithSlmThenMmioIsAppendedWithSlm, IsGen9) { - using GfxFamily = typename NEO::GfxFamilyMapper::GfxFamily; - using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM; - const uint32_t registerOffset = NEO::L3CNTLRegisterOffset::registerOffset; - auto hwInfo = device->getNEODevice()->getHardwareInfo(); - const uint32_t valueForSLM = NEO::PreambleHelper::getL3Config(hwInfo, true); - - auto commandList = new CommandListAdjustStateComputeMode(); - bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); - ASSERT_FALSE(ret); - - commandList->programL3(true); - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed())); - bool found = false; - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - for (auto itor : miLoadImm) { - auto cmd = genCmdCast(*itor); - if (registerOffset == cmd->getRegisterOffset()) { - EXPECT_EQ(cmd->getRegisterOffset(), registerOffset); - EXPECT_EQ(cmd->getDataDword(), valueForSLM); - found = true; - break; - } - } - EXPECT_TRUE(found); - - commandList->destroy(); -} - -HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3WithoutSlmThenMmioIsAppendedWithoutSlm, IsGen9) { - using GfxFamily = typename NEO::GfxFamilyMapper::GfxFamily; - using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM; - const uint32_t registerOffset = NEO::L3CNTLRegisterOffset::registerOffset; - const uint32_t valueForNoSLM = NEO::PreambleHelper::getL3Config(*defaultHwInfo, false); - - auto commandList = new CommandListAdjustStateComputeMode(); - bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); - ASSERT_FALSE(ret); - - commandList->programL3(false); - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed())); - bool found = false; - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - for (auto itor : miLoadImm) { - auto cmd = genCmdCast(*itor); - if (registerOffset == cmd->getRegisterOffset()) { - EXPECT_EQ(cmd->getRegisterOffset(), registerOffset); - EXPECT_EQ(cmd->getDataDword(), valueForNoSLM); - found = true; - break; - } - } - EXPECT_TRUE(found); - - commandList->destroy(); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp deleted file mode 100644 index 26c2df0bc5..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_enqueuecommandlist_gen9.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gmm_helper/gmm_helper.h" -#include "shared/source/gmm_helper/gmm_lib.h" -#include "shared/source/memory_manager/graphics_allocation.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h" -#include "level_zero/core/test/unit_tests/mocks/mock_device.h" -#include "level_zero/core/test/unit_tests/mocks/mock_memory_manager.h" -#include - -#include "gtest/gtest.h" - -#include - -namespace L0 { -namespace ult { - -using CommandQueueExecuteCommandListsGen9 = Test; - -GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelineSelectAndVfeStateAreAddedToCmdBuffer) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - auto commandQueue = whiteboxCast(CommandQueue::create( - productFamily, - device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue)); - ASSERT_NE(nullptr, commandQueue); - auto usedSpaceBefore = commandQueue->commandStream.getUsed(); - - auto commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false); - commandList->close(); - ze_command_list_handle_t commandLists[] = { - commandList->toHandle()}; - uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]); - auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr); - - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - auto usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - - using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE; - auto itorVFE = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(itorVFE, cmdList.end()); - - // Should have a PS before a VFE - using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; - auto itorPS = find(cmdList.begin(), itorVFE); - ASSERT_NE(itorPS, itorVFE); - { - auto cmd = genCmdCast(*itorPS); - EXPECT_EQ(cmd->getMaskBits() & 3u, 3u); - EXPECT_EQ(cmd->getPipelineSelection(), PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); - } - - commandList->destroy(); - commandQueue->destroy(); -} - -GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsAdded) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - auto commandQueue = whiteboxCast(CommandQueue::create( - productFamily, - device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue)); - ASSERT_NE(nullptr, commandQueue); - auto usedSpaceBefore = commandQueue->commandStream.getUsed(); - - auto commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false); - commandList->close(); - ze_command_list_handle_t commandLists[] = { - commandList->toHandle()}; - uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]); - auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr); - - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - auto usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - auto itorSba = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(itorSba, cmdList.end()); - { - auto cmd = genCmdCast(*itorSba); - EXPECT_TRUE(cmd->getGeneralStateBaseAddressModifyEnable()); - EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); - EXPECT_TRUE(cmd->getGeneralStateBufferSizeModifyEnable()); - uint32_t expectedGsbaSize = std::numeric_limits::max(); - expectedGsbaSize >>= 12; - EXPECT_EQ(expectedGsbaSize, cmd->getGeneralStateBufferSize()); - - EXPECT_TRUE(cmd->getInstructionBaseAddressModifyEnable()); - EXPECT_TRUE(cmd->getInstructionBufferSizeModifyEnable()); - EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); - EXPECT_EQ(device->getDriverHandle()->getMemoryManager()->getInternalHeapBaseAddress(0, false), - cmd->getInstructionBaseAddress()); - EXPECT_EQ(commandQueue->getDevice()->getNEODevice()->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER), - cmd->getInstructionMemoryObjectControlState()); - } - - commandList->destroy(); - commandQueue->destroy(); -} - -GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThreadPreemptionForFirstExecuteIsConfigured) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - auto commandQueue = whiteboxCast(CommandQueue::create( - productFamily, - device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue)); - ASSERT_NE(nullptr, commandQueue); - auto usedSpaceBefore = commandQueue->commandStream.getUsed(); - - auto commandList = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - commandList->commandListPreemptionMode = NEO::PreemptionMode::MidThread; - commandList->close(); - - ze_command_list_handle_t commandLists[] = {commandList->toHandle()}; - uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]); - - auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr); - - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - auto usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using STATE_SIP = typename FamilyType::STATE_SIP; - using GPGPU_CSR_BASE_ADDRESS = typename FamilyType::GPGPU_CSR_BASE_ADDRESS; - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto itorCsr = find(cmdList.begin(), cmdList.end()); - EXPECT_NE(itorCsr, cmdList.end()); - - auto itorStateSip = find(itorCsr, cmdList.end()); - EXPECT_NE(itorStateSip, cmdList.end()); - - auto itorLri = find(itorStateSip, cmdList.end()); - EXPECT_NE(itorLri, cmdList.end()); - - MI_LOAD_REGISTER_IMM *lriCmd = static_cast(*itorLri); - EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset()); - uint32_t data = ((1 << 1) | (1 << 2)) << 16; - EXPECT_EQ(data, lriCmd->getDataDword()); - - commandList->destroy(); - commandQueue->destroy(); -} - -GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemptionModesWhenExecutingThenQueuePreemptionIsSwitchedFromMidThreadToThreadGroupAndMidThread) { - const ze_command_queue_desc_t desc = {}; - ze_result_t returnValue; - auto commandQueue = whiteboxCast(CommandQueue::create( - productFamily, - device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue)); - ASSERT_NE(nullptr, commandQueue); - auto usedSpaceBefore = commandQueue->commandStream.getUsed(); - - auto commandListMidThread = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - commandListMidThread->commandListPreemptionMode = NEO::PreemptionMode::MidThread; - commandListMidThread->close(); - - auto commandListThreadGroup = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false)); - commandListThreadGroup->commandListPreemptionMode = NEO::PreemptionMode::ThreadGroup; - commandListThreadGroup->close(); - - ze_command_list_handle_t commandLists[] = {commandListMidThread->toHandle(), - commandListThreadGroup->toHandle(), - commandListMidThread->toHandle()}; - uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]); - auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr); - - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - auto usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, commandQueue->commandStream.getCpuBase(), usedSpaceAfter)); - using STATE_SIP = typename FamilyType::STATE_SIP; - using GPGPU_CSR_BASE_ADDRESS = typename FamilyType::GPGPU_CSR_BASE_ADDRESS; - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START; - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - - auto itorCsr = find(cmdList.begin(), cmdList.end()); - EXPECT_NE(itorCsr, cmdList.end()); - - auto itorStateSip = find(itorCsr, cmdList.end()); - EXPECT_NE(itorStateSip, cmdList.end()); - - auto itorLri = find(itorStateSip, cmdList.end()); - EXPECT_NE(itorLri, cmdList.end()); - - MI_LOAD_REGISTER_IMM *lriCmd = static_cast(*itorLri); - EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset()); - uint32_t data = ((1 << 1) | (1 << 2)) << 16; - EXPECT_EQ(data, lriCmd->getDataDword()); - - // next should be BB_START to 1st Mid-Thread Cmd List - auto itorBBStart = find(itorLri, cmdList.end()); - EXPECT_NE(itorBBStart, cmdList.end()); - - // next should be PIPE_CONTROL and LRI switching to thread-group - auto itorPipeControl = find(itorBBStart, cmdList.end()); - EXPECT_NE(itorPipeControl, cmdList.end()); - - itorLri = find(itorPipeControl, cmdList.end()); - EXPECT_NE(itorLri, cmdList.end()); - - lriCmd = static_cast(*itorLri); - EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset()); - data = (1 << 1) | (((1 << 1) | (1 << 2)) << 16); - EXPECT_EQ(data, lriCmd->getDataDword()); - // start of thread-group command list - itorBBStart = find(itorLri, cmdList.end()); - EXPECT_NE(itorBBStart, cmdList.end()); - - // next should be PIPE_CONTROL and LRI switching to mid-thread again - itorPipeControl = find(itorBBStart, cmdList.end()); - EXPECT_NE(itorPipeControl, cmdList.end()); - - itorLri = find(itorPipeControl, cmdList.end()); - EXPECT_NE(itorLri, cmdList.end()); - - lriCmd = static_cast(*itorLri); - EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset()); - data = ((1 << 1) | (1 << 2)) << 16; - EXPECT_EQ(data, lriCmd->getDataDword()); - // start of thread-group command list - itorBBStart = find(itorLri, cmdList.end()); - EXPECT_NE(itorBBStart, cmdList.end()); - - commandListMidThread->destroy(); - commandListThreadGroup->destroy(); - commandQueue->destroy(); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp deleted file mode 100644 index 2f2426a232..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/sip.h" -#include "shared/source/gen9/reg_configs.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h" -#include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h" -#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h" - -namespace L0 { -namespace ult { - -using CommandQueueThreadArbitrationPolicyTests = Test; - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedThenDefaultRoundRobinThreadArbitrationPolicyIsUsed, - IsGen9) { - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - } - } -} - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToZeroThenAgeBasedThreadArbitrationPolicyIsUsed, - IsGen9) { - debugManager.flags.OverrideThreadArbitrationPolicy.set(0); - - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased), - cmd->getDataDword()); - } - } -} - -HWTEST2_F(CommandQueueThreadArbitrationPolicyTests, - whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToOneThenRoundRobinThreadArbitrationPolicyIsUsed, - IsGen9) { - debugManager.flags.OverrideThreadArbitrationPolicy.set(1); - - size_t usedSpaceBefore = commandQueue->commandStream.getUsed(); - - ze_command_list_handle_t hCommandList = commandList->toHandle(); - auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr); - ASSERT_EQ(ZE_RESULT_SUCCESS, result); - - size_t usedSpaceAfter = commandQueue->commandStream.getUsed(); - ASSERT_GT(usedSpaceAfter, usedSpaceBefore); - - GenCmdList cmdList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter)); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - } - } -} - -struct CommandQueueGroupMultiDeviceFixture : public MultiDeviceFixture { - void setUp() { - MultiDeviceFixture::setUp(); - uint32_t count = 1; - ze_device_handle_t hDevice; - ze_result_t res = driverHandle->getDevice(&count, &hDevice); - ASSERT_EQ(ZE_RESULT_SUCCESS, res); - device = L0::Device::fromHandle(hDevice); - ASSERT_NE(nullptr, device); - } - void tearDown() { - MultiDeviceFixture::tearDown(); - } - L0::Device *device = nullptr; -}; - -using CommandQueueGroupMultiDevice = Test; - -HWTEST2_F(CommandQueueGroupMultiDevice, - givenCommandQueuePropertiesCallThenCallSucceedsAndCommandListImmediateIsCreated, IsGen9) { - uint32_t count = 0; - ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_GE(count, 1u); - - std::vector queueProperties(count); - res = device->getCommandQueueGroupProperties(&count, queueProperties.data()); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - - uint32_t queueGroupOrdinal = 0u; - uint32_t queueGroupIndex = 0u; - ze_command_queue_desc_t desc = {}; - desc.ordinal = queueGroupOrdinal; - desc.index = queueGroupIndex; - - ze_result_t returnValue; - std::unique_ptr commandList0(CommandList::createImmediate(productFamily, - device, - &desc, - false, - NEO::EngineGroupType::renderCompute, - returnValue)); - auto whiteBoxCmdList = static_cast(commandList0.get()); - - L0::CommandQueueImp *cmdQueue = reinterpret_cast(whiteBoxCmdList->cmdQImmediate); - auto &nearestSubDevice = *device->getNEODevice()->getNearestGenericSubDevice(0); - const auto rcsIndex = nearestSubDevice.getEngineGroupIndexFromEngineGroupType(NEO::EngineGroupType::renderCompute); - auto expectedCSR = nearestSubDevice.getRegularEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver; - EXPECT_EQ(cmdQueue->getCsr(), expectedCSR); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_device_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_device_gen9.cpp deleted file mode 100644 index 6928d1f5c8..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_device_gen9.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/cmdlist/cmdlist.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" -#include "level_zero/include/ze_intel_gpu.h" - -namespace L0 { -namespace ult { - -using DevicePropertyTest = Test; - -HWTEST2_F(DevicePropertyTest, givenReturnedDevicePropertiesThenExpectedPropertiesFlagsSet, IsGen9) { - ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES}; - - device->getProperties(&deviceProps); - EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING); - EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ECC); - EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE); - EXPECT_EQ(ZE_DEVICE_PROPERTY_FLAG_INTEGRATED, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED); -} - -using DeviceTestGen9 = Test; - -HWTEST2_F(DeviceTestGen9, GivenTargetGen9WhenGettingDpSupportThenReturnsFalseAndFlagsSetCorrectly, IsAtMostGen9) { - ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES}; - ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES}; - moduleDpProps.flags = 0u; - deviceModProps.pNext = &moduleDpProps; - - ze_result_t res = device->getKernelProperties(&deviceModProps); - EXPECT_EQ(res, ZE_RESULT_SUCCESS); - - bool dp4a = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DP4A; - bool dpas = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DPAS; - EXPECT_FALSE(dp4a); - EXPECT_FALSE(dpas); -} - -using CommandQueueGroupTest = Test; - -HWTEST2_F(CommandQueueGroupTest, givenCommandQueuePropertiesCallThenCorrectNumberOfGroupsIsReturned, IsGen9) { - uint32_t count = 0; - ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(1u, count); - - ze_command_queue_group_properties_t properties; - res = device->getCommandQueueGroupProperties(&count, &properties); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS); - EXPECT_EQ(properties.numQueues, 1u); - EXPECT_EQ(properties.maxMemoryFillPatternSize, std::numeric_limits::max()); -} - -HWTEST2_F(CommandQueueGroupTest, givenQueueGroupsReturnedThenCommandListIsCreatedCorrectly, IsGen9) { - uint32_t count = 0; - ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(1u, count); - - ze_command_queue_group_properties_t properties; - res = device->getCommandQueueGroupProperties(&count, &properties); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS); - EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS); - EXPECT_EQ(properties.numQueues, 1u); - EXPECT_EQ(properties.maxMemoryFillPatternSize, std::numeric_limits::max()); - - ze_context_handle_t hContext; - ze_context_desc_t contextDesc = {ZE_STRUCTURE_TYPE_CONTEXT_DESC, nullptr, 0}; - res = driverHandle->createContext(&contextDesc, 0u, nullptr, &hContext); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - L0::Context *context = Context::fromHandle(hContext); - - ze_command_list_desc_t listDesc = {}; - listDesc.commandQueueGroupOrdinal = 0; - ze_command_list_handle_t hCommandList = {}; - - res = context->createCommandList(device, &listDesc, &hCommandList); - EXPECT_EQ(ZE_RESULT_SUCCESS, res); - - CommandList *commandList = CommandList::fromHandle(hCommandList); - commandList->destroy(); - - context->destroy(); -} - -HWTEST2_F(DevicePropertyTest, GivenGen9WhenGettingPhysicalEuSimdWidthThenReturn8, IsGen9) { - ze_device_properties_t properties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES}; - device->getProperties(&properties); - EXPECT_EQ(8u, properties.physicalEUSimdWidth); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp deleted file mode 100644 index 6274dca6e2..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_l0_gfx_core_helper_gen9.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" - -namespace L0 { -namespace ult { - -using L0GfxCoreHelperTestGen9 = Test; - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForCmdListHeapSharingSupportThenReturnTrue) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_TRUE(l0GfxCoreHelper.platformSupportsCmdListHeapSharing()); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForStateComputeModeTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateComputeModeTracking()); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForFrontEndTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsFrontEndTracking()); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForPipelineSelectTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsPipelineSelectTracking()); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForStateBaseAddressTrackingSupportThenReturnFalse) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateBaseAddressTracking(device->getNEODevice()->getRootDeviceEnvironment())); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel(device->getNEODevice()->getRootDeviceEnvironment())); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) { - auto &l0GfxCoreHelper = getHelper(); - EXPECT_TRUE(l0GfxCoreHelper.platformSupportsPrimaryBatchBufferCmdList()); -} - -GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenGettingSupportedRTASFormatThenExpectedFormatIsReturned) { - const auto &l0GfxCoreHelper = getHelper(); - EXPECT_EQ(ZE_RTAS_FORMAT_EXP_INVALID, l0GfxCoreHelper.getSupportedRTASFormat()); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/gen9/test_module_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_module_gen9.cpp deleted file mode 100644 index 0f24fd7a9f..0000000000 --- a/level_zero/core/test/unit_tests/gen9/test_module_gen9.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/kernel/kernel_properties.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h" - -namespace L0 { -namespace ult { - -using KernelPropertyTest = Test; - -HWTEST2_F(KernelPropertyTest, givenReturnedKernelPropertiesThenExpectedDp4aSupportReturned, IsGen9) { - ze_device_module_properties_t kernelProps = {}; - - device->getKernelProperties(&kernelProps); - EXPECT_EQ(0u, kernelProps.flags & ZE_DEVICE_MODULE_FLAG_DP4A); -} - -HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPropertiesCalledThenPropertiesAreCorrectlySet, IsGen9) { - ze_device_module_properties_t kernelProperties = {}; - ze_float_atomic_ext_properties_t kernelExtendedProperties = {}; - kernelExtendedProperties.stype = ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES; - kernelProperties.pNext = &kernelExtendedProperties; - ze_result_t res = device->getKernelProperties(&kernelProperties); - EXPECT_EQ(res, ZE_RESULT_SUCCESS); - - const auto &fp16Properties = kernelExtendedProperties.fp16Flags; - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localMinMax); - - EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::globalAdd); - EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::localAdd); - - const auto &fp32Properties = kernelExtendedProperties.fp32Flags; - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localMinMax); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalAdd); - EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localAdd); - - const auto &fp64Properties = kernelExtendedProperties.fp64Flags; - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalLoadStore); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localLoadStore); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalMinMax); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localMinMax); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalAdd); - EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localAdd); -} - -} // namespace ult -} // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp index 013c8fc4c7..23aeb4e8a3 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_2.cpp @@ -6,7 +6,6 @@ */ #include "shared/source/command_container/implicit_scaling.h" -#include "shared/source/gen9/reg_configs.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/local_id_gen.h" @@ -814,128 +813,6 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC EXPECT_TRUE(tagFound); } -using CommandListArbitrationPolicyTest = Test; - -HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenDefaultThreadArbitrationPolicyIsUsed) { - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - ze_result_t returnValue; - auto commandList = std::unique_ptr(CommandList::whiteboxCast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::renderCompute, - 0u, - returnValue, false))); - EXPECT_NE(nullptr, commandList); - EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream()); - - GenCmdList parsedCommandList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), - commandList->getCmdContainer().getCommandStream()->getUsed())); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(parsedCommandList.begin(), parsedCommandList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - } - } -} - -HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenChosenThreadArbitrationPolicyIsUsed) { - DebugManagerStateRestore restorer; - debugManager.flags.OverrideThreadArbitrationPolicy.set(0); - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - ze_result_t returnValue; - auto commandList = std::unique_ptr(CommandList::whiteboxCast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::renderCompute, - 0u, - returnValue, false))); - EXPECT_NE(nullptr, commandList); - EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream()); - - GenCmdList parsedCommandList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), - commandList->getCmdContainer().getCommandStream()->getUsed())); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(parsedCommandList.begin(), parsedCommandList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased), - cmd->getDataDword()); - } - } -} - -HWTEST_F(CommandListArbitrationPolicyTest, whenCommandListIsResetThenOriginalThreadArbitrationPolicyIsKept) { - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - ze_result_t returnValue; - auto commandList = std::unique_ptr(CommandList::whiteboxCast(L0::CommandList::create(productFamily, - device, - NEO::EngineGroupType::renderCompute, - 0u, - returnValue, false))); - EXPECT_NE(nullptr, commandList); - EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream()); - - uint64_t originalThreadArbitrationPolicy = std::numeric_limits::max(); - { - GenCmdList parsedCommandList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), - commandList->getCmdContainer().getCommandStream()->getUsed())); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(parsedCommandList.begin(), parsedCommandList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - originalThreadArbitrationPolicy = cmd->getDataDword(); - } - } - } - - commandList->reset(); - - { - GenCmdList parsedCommandList; - ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( - parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), - commandList->getCmdContainer().getCommandStream()->getUsed())); - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - - auto miLoadImm = findAll(parsedCommandList.begin(), parsedCommandList.end()); - EXPECT_GE(2u, miLoadImm.size()); - - uint64_t newThreadArbitrationPolicy = std::numeric_limits::max(); - for (auto it : miLoadImm) { - auto cmd = genCmdCast(*it); - if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) { - EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin), - cmd->getDataDword()); - newThreadArbitrationPolicy = cmd->getDataDword(); - EXPECT_EQ(originalThreadArbitrationPolicy, newThreadArbitrationPolicy); - } - } - } -} - using CmdlistAppendLaunchKernelTests = Test; struct CmdlistAppendLaunchKernelWithImplicitArgsTests : CmdlistAppendLaunchKernelTests { diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt deleted file mode 100644 index 9bed0cbd91..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen11/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 24dbcda72a..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_ICLLP) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_icllp.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp deleted file mode 100644 index 0ada5d41d2..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableIcllp; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp deleted file mode 100644 index 9b37f60e26..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_ICELAKE_LP; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt deleted file mode 100644 index 9bed0cbd91..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -add_subdirectories() diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt deleted file mode 100644 index a08fe4ca0d..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_CFL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_cfl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp deleted file mode 100644 index 0ba5d1cf49..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableCFL; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp deleted file mode 100644 index 42db6fab28..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_COFFEELAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 3c97da0b34..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_KBL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_kbl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp deleted file mode 100644 index 27addca390..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableKBL; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp deleted file mode 100644 index 5cb35b6556..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_KABYLAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt deleted file mode 100644 index 371cabc252..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_SKL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_skl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp deleted file mode 100644 index 1197adf375..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableSKL; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/sysman_product_helper_skl.cpp b/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/sysman_product_helper_skl.cpp deleted file mode 100644 index a77def7fe1..0000000000 --- a/level_zero/sysman/source/shared/linux/product_helper/gen9/skl/sysman_product_helper_skl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_SKYLAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen11/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen11/CMakeLists.txt deleted file mode 100644 index ed573e731e..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen11/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -add_subdirectories() diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/CMakeLists.txt deleted file mode 100644 index a8dc32b491..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_ICLLP) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_icllp.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp deleted file mode 100644 index 58b918cbec..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/enable_sysman_product_helper_icllp.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableIcllp; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp deleted file mode 100644 index a000b8264b..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen11/icllp/sysman_product_helper_icllp.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_ICELAKE_LP; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen9/CMakeLists.txt deleted file mode 100644 index ed573e731e..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -add_subdirectories() diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/CMakeLists.txt deleted file mode 100644 index 4709e1abfe..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_CFL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_cfl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp deleted file mode 100644 index 1a6010d309..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/enable_sysman_product_helper_cfl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableCfl; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp deleted file mode 100644 index 3a4bab647d..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/cfl/sysman_product_helper_cfl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_COFFEELAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 824fb8c5a1..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_KBL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_kbl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp deleted file mode 100644 index 90be4fe85b..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/enable_sysman_product_helper_kbl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableKbl; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp deleted file mode 100644 index 084e48f7c3..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/kbl/sysman_product_helper_kbl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_KABYLAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/CMakeLists.txt b/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/CMakeLists.txt deleted file mode 100644 index cd29f4d60c..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2024 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_SKL) - target_sources(${L0_STATIC_LIB_NAME} - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_skl.cpp - ) -endif() - diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp deleted file mode 100644 index 4a0c135d64..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/enable_sysman_product_helper_skl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" - -namespace L0 { -namespace Sysman { - -static EnableSysmanProductHelper enableSkl; - -} // namespace Sysman -} // namespace L0 diff --git a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/sysman_product_helper_skl.cpp b/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/sysman_product_helper_skl.cpp deleted file mode 100644 index ef767ada33..0000000000 --- a/level_zero/sysman/source/shared/windows/product_helper/gen9/skl/sysman_product_helper_skl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h" -#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl" - -namespace L0 { -namespace Sysman { -constexpr static auto gfxProduct = IGFX_SKYLAKE; - -template class SysmanProductHelperHw; - -} // namespace Sysman -} // namespace L0 diff --git a/manifests/manifest.yml b/manifests/manifest.yml index 55553b5381..4714947a60 100644 --- a/manifests/manifest.yml +++ b/manifests/manifest.yml @@ -42,7 +42,7 @@ components: dest_dir: kernels_bin type: git branch: kernels_bin - revision: 3043-2375 + revision: 3043-2378 kmdaf: branch: kmdaf dest_dir: kmdaf diff --git a/opencl/source/gen11/CMakeLists.txt b/opencl/source/gen11/CMakeLists.txt deleted file mode 100644 index f65883b4a2..0000000000 --- a/opencl/source/gen11/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN11) - add_subdirectories() -endif() diff --git a/opencl/source/gen11/buffer_gen11.cpp b/opencl/source/gen11/buffer_gen11.cpp deleted file mode 100644 index d8ad193c2d..0000000000 --- a/opencl/source/gen11/buffer_gen11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" - -#include "opencl/source/mem_obj/buffer_base.inl" - -namespace NEO { - -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -#include "opencl/source/mem_obj/buffer_factory_init.inl" -} // namespace NEO diff --git a/opencl/source/gen11/cl_gfx_core_helper_gen11.cpp b/opencl/source/gen11/cl_gfx_core_helper_gen11.cpp deleted file mode 100644 index 7bfc3d452e..0000000000 --- a/opencl/source/gen11/cl_gfx_core_helper_gen11.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/helpers/cl_gfx_core_helper_base.inl" -#include "opencl/source/helpers/cl_gfx_core_helper_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen11Family; -static auto gfxCore = IGFX_GEN11_CORE; - -#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl" - -template class ClGfxCoreHelperHw; - -} // namespace NEO diff --git a/opencl/source/gen11/command_queue_gen11.cpp b/opencl/source/gen11/command_queue_gen11.cpp deleted file mode 100644 index f06950f3c8..0000000000 --- a/opencl/source/gen11/command_queue_gen11.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" -#include "shared/source/memory_manager/unified_memory_manager.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_queue/command_queue_hw_bdw_and_later.inl" -#include "opencl/source/command_queue/enqueue_resource_barrier.h" - -namespace NEO { - -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -template class CommandQueueHw; - -template <> -void populateFactoryTable>() { - extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE]; - commandQueueFactory[gfxCore] = CommandQueueHw::create; -} -} // namespace NEO diff --git a/opencl/source/gen11/enable_family_full_ocl_gen11.cpp b/opencl/source/gen11/enable_family_full_ocl_gen11.cpp deleted file mode 100644 index 4cdfabb603..0000000000 --- a/opencl/source/gen11/enable_family_full_ocl_gen11.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/helpers/cl_gfx_core_helper.h" -#include "opencl/source/mem_obj/buffer.h" -#include "opencl/source/mem_obj/image.h" -#include "opencl/source/sampler/sampler.h" - -namespace NEO { - -using Family = Gen11Family; - -struct EnableOCLGen11 { - EnableOCLGen11() { - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableOCLGen11 enable; -} // namespace NEO diff --git a/opencl/source/gen11/gpgpu_walker_gen11.cpp b/opencl/source/gen11/gpgpu_walker_gen11.cpp deleted file mode 100644 index e478beb167..0000000000 --- a/opencl/source/gen11/gpgpu_walker_gen11.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/gen11/hw_info.h" - -#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl" -#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen11Family; - -template class HardwareInterface; - -template void HardwareInterface::dispatchWalker(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::programWalker(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::dispatchKernelCommands(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs); -template Family::DefaultWalkerType *HardwareInterface::allocateWalkerSpace(LinearStream &commandStream, const Kernel &kernel); - -template class GpgpuWalkerHelper; -template void GpgpuWalkerHelper::setupTimestampPacket(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment); -template size_t GpgpuWalkerHelper::setGpgpuWalkerThreadData(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3], - const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder); - -template struct EnqueueOperation; - -} // namespace NEO diff --git a/opencl/source/gen11/gtpin_setup_gen11.cpp b/opencl/source/gen11/gtpin_setup_gen11.cpp deleted file mode 100644 index 90e3bd7ad4..0000000000 --- a/opencl/source/gen11/gtpin_setup_gen11.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/compiler_interface/external_functions.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/kernel/implicit_args_helper.h" - -#include "opencl/source/gtpin/gtpin_gfx_core_helper.h" -#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl" -#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl" - -#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" - -namespace NEO { - -extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE]; - -typedef Gen11Family Family; -static const auto gfxFamily = IGFX_GEN11_CORE; - -template <> -uint32_t GTPinGfxCoreHelperHw::getGenVersion() const { - return gtpin::GTPIN_GEN_11; -} - -template class GTPinGfxCoreHelperHw; - -struct GTPinEnableGen11 { - GTPinEnableGen11() { - gtpinGfxCoreHelperFactory[gfxFamily] = GTPinGfxCoreHelperHw::create; - } -}; - -static GTPinEnableGen11 gtpinEnable; - -} // namespace NEO diff --git a/opencl/source/gen11/hardware_commands_helper_gen11.cpp b/opencl/source/gen11/hardware_commands_helper_gen11.cpp deleted file mode 100644 index 5e735442ae..0000000000 --- a/opencl/source/gen11/hardware_commands_helper_gen11.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/gen11/hw_cmds.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/source/helpers/hardware_commands_helper_base.inl" -#include "opencl/source/helpers/hardware_commands_helper_bdw_and_later.inl" - -namespace NEO { -using FamilyType = Gen11Family; -} // namespace NEO - -#include "opencl/source/helpers/enable_hardware_commands_helper_gpgpu.inl" diff --git a/opencl/source/gen11/image_gen11.cpp b/opencl/source/gen11/image_gen11.cpp deleted file mode 100644 index 5d3a90e6e7..0000000000 --- a/opencl/source/gen11/image_gen11.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" - -#include "opencl/source/mem_obj/image.inl" - -#include - -namespace NEO { - -using Family = Gen11Family; -static auto gfxCore = IGFX_GEN11_CORE; - -template <> -void ImageHw::appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex) { - if (hasAlphaChannel(&imageFormat)) { - surfaceState->setSampleTapDiscardDisable(RENDER_SURFACE_STATE::SAMPLE_TAP_DISCARD_DISABLE_ENABLE); - } -} - -} // namespace NEO - -// factory initializer -#include "opencl/source/mem_obj/image_factory_init.inl" diff --git a/opencl/source/gen11/sampler_gen11.cpp b/opencl/source/gen11/sampler_gen11.cpp deleted file mode 100644 index 28d1e530f1..0000000000 --- a/opencl/source/gen11/sampler_gen11.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" - -#include "opencl/source/sampler/sampler.h" -#include "opencl/source/sampler/sampler.inl" - -namespace NEO { - -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -#include "opencl/source/sampler/sampler_factory_init.inl" -} // namespace NEO diff --git a/opencl/source/gen8/CMakeLists.txt b/opencl/source/gen8/CMakeLists.txt deleted file mode 100644 index b4907ed28d..0000000000 --- a/opencl/source/gen8/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN8) - add_subdirectories() -endif() diff --git a/opencl/source/gen8/buffer_gen8.cpp b/opencl/source/gen8/buffer_gen8.cpp deleted file mode 100644 index f980e91276..0000000000 --- a/opencl/source/gen8/buffer_gen8.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" - -#include "opencl/source/mem_obj/buffer_base.inl" - -namespace NEO { - -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -#include "opencl/source/mem_obj/buffer_factory_init.inl" -} // namespace NEO diff --git a/opencl/source/gen8/cl_gfx_core_helper_gen8.cpp b/opencl/source/gen8/cl_gfx_core_helper_gen8.cpp deleted file mode 100644 index bd8c9e2650..0000000000 --- a/opencl/source/gen8/cl_gfx_core_helper_gen8.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/helpers/cl_gfx_core_helper_base.inl" -#include "opencl/source/helpers/cl_gfx_core_helper_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen8Family; -static auto gfxCore = IGFX_GEN8_CORE; - -#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl" - -template class ClGfxCoreHelperHw; - -} // namespace NEO diff --git a/opencl/source/gen8/command_queue_gen8.cpp b/opencl/source/gen8/command_queue_gen8.cpp deleted file mode 100644 index c419d9f5d6..0000000000 --- a/opencl/source/gen8/command_queue_gen8.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" -#include "shared/source/memory_manager/unified_memory_manager.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_queue/command_queue_hw_bdw_and_later.inl" -#include "opencl/source/command_queue/enqueue_resource_barrier.h" - -namespace NEO { - -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -template class CommandQueueHw; - -template <> -void populateFactoryTable>() { - extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE]; - commandQueueFactory[gfxCore] = CommandQueueHw::create; -} - -} // namespace NEO diff --git a/opencl/source/gen8/enable_family_full_ocl_gen8.cpp b/opencl/source/gen8/enable_family_full_ocl_gen8.cpp deleted file mode 100644 index 03a3d1238e..0000000000 --- a/opencl/source/gen8/enable_family_full_ocl_gen8.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/helpers/cl_gfx_core_helper.h" -#include "opencl/source/mem_obj/buffer.h" -#include "opencl/source/mem_obj/image.h" -#include "opencl/source/sampler/sampler.h" - -namespace NEO { - -using Family = Gen8Family; - -struct EnableOCLGen8 { - EnableOCLGen8() { - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableOCLGen8 enable; -} // namespace NEO diff --git a/opencl/source/gen8/gpgpu_walker_gen8.cpp b/opencl/source/gen8/gpgpu_walker_gen8.cpp deleted file mode 100644 index 185d283a1b..0000000000 --- a/opencl/source/gen8/gpgpu_walker_gen8.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/gen8/hw_info.h" - -#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl" -#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen8Family; - -template <> -void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream *pCommandStream, const Kernel &kernel, bool disablePerfMode) { - if (disablePerfMode) { - if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - // Set bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeOr, RegisterConstants::l3SqcBitLqscR0PerfDis); - } - } else { - if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - // Add PIPE_CONTROL with CS_Stall to wait till GPU finishes its work - typedef typename Family::PIPE_CONTROL PIPE_CONTROL; - auto pipeControlSpace = reinterpret_cast(pCommandStream->getSpace(sizeof(PIPE_CONTROL))); - auto pipeControl = Family::cmdInitPipeControl; - pipeControl.setCommandStreamerStallEnable(true); - *pipeControlSpace = pipeControl; - // Clear bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeAnd, ~RegisterConstants::l3SqcBitLqscR0PerfDis); - } - } -} - -template <> -size_t GpgpuWalkerHelper::getSizeForWADisableLSQCROPERFforOCL(const Kernel *pKernel) { - typedef typename Family::MI_LOAD_REGISTER_REG MI_LOAD_REGISTER_REG; - typedef typename Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename Family::PIPE_CONTROL PIPE_CONTROL; - typedef typename Family::MI_MATH MI_MATH; - typedef typename Family::MI_MATH_ALU_INST_INLINE MI_MATH_ALU_INST_INLINE; - size_t n = 0; - if (pKernel->getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - n += sizeof(PIPE_CONTROL) + - (2 * sizeof(MI_LOAD_REGISTER_REG) + - sizeof(MI_LOAD_REGISTER_IMM) + - sizeof(PIPE_CONTROL) + - sizeof(MI_MATH) + - RegisterConstants::numAluInstForReadModifyWrite * sizeof(MI_MATH_ALU_INST_INLINE)) * - 2; // For 2 WADisableLSQCROPERFforOCL WAs - } - return n; -} - -template class HardwareInterface; - -template void HardwareInterface::dispatchWalker(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::programWalker(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::dispatchKernelCommands(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs); -template Family::DefaultWalkerType *HardwareInterface::allocateWalkerSpace(LinearStream &commandStream, const Kernel &kernel); - -template class GpgpuWalkerHelper; -template void GpgpuWalkerHelper::setupTimestampPacket(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment); -template size_t GpgpuWalkerHelper::setGpgpuWalkerThreadData(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3], - const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder); - -template struct EnqueueOperation; - -} // namespace NEO diff --git a/opencl/source/gen8/gtpin_setup_gen8.cpp b/opencl/source/gen8/gtpin_setup_gen8.cpp deleted file mode 100644 index daed0e279a..0000000000 --- a/opencl/source/gen8/gtpin_setup_gen8.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/compiler_interface/external_functions.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/kernel/implicit_args_helper.h" - -#include "opencl/source/gtpin/gtpin_gfx_core_helper.h" -#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl" -#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl" - -#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" - -namespace NEO { - -extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE]; - -typedef Gen8Family Family; -static const auto gfxFamily = IGFX_GEN8_CORE; - -template <> -uint32_t GTPinGfxCoreHelperHw::getGenVersion() const { - return gtpin::GTPIN_GEN_8; -} - -template class GTPinGfxCoreHelperHw; - -struct GTPinEnableGen8 { - GTPinEnableGen8() { - gtpinGfxCoreHelperFactory[gfxFamily] = GTPinGfxCoreHelperHw::create; - } -}; - -static GTPinEnableGen8 gtpinEnable; - -} // namespace NEO diff --git a/opencl/source/gen8/hardware_commands_helper_gen8.cpp b/opencl/source/gen8/hardware_commands_helper_gen8.cpp deleted file mode 100644 index 9e5fd6e7cf..0000000000 --- a/opencl/source/gen8/hardware_commands_helper_gen8.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/source/helpers/hardware_commands_helper_base.inl" -#include "opencl/source/helpers/hardware_commands_helper_bdw_and_later.inl" - -namespace NEO { -using FamilyType = Gen8Family; -} // namespace NEO - -#include "opencl/source/helpers/enable_hardware_commands_helper_gpgpu.inl" diff --git a/opencl/source/gen8/image_gen8.cpp b/opencl/source/gen8/image_gen8.cpp deleted file mode 100644 index abe0d8994a..0000000000 --- a/opencl/source/gen8/image_gen8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" - -#include "opencl/source/mem_obj/image.inl" - -#include - -namespace NEO { - -using Family = Gen8Family; -static auto gfxCore = IGFX_GEN8_CORE; - -template <> -void ImageHw::setMediaSurfaceRotation(void *) {} - -template <> -void ImageHw::setSurfaceMemoryObjectControlState(void *, uint32_t) {} - -} // namespace NEO - -// factory initializer -#include "opencl/source/mem_obj/image_factory_init.inl" diff --git a/opencl/source/gen8/sampler_gen8.cpp b/opencl/source/gen8/sampler_gen8.cpp deleted file mode 100644 index 24dce33f8c..0000000000 --- a/opencl/source/gen8/sampler_gen8.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" - -#include "opencl/source/sampler/sampler.h" -#include "opencl/source/sampler/sampler.inl" - -namespace NEO { - -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -#include "opencl/source/sampler/sampler_factory_init.inl" -} // namespace NEO diff --git a/opencl/source/gen9/CMakeLists.txt b/opencl/source/gen9/CMakeLists.txt deleted file mode 100644 index f7011d332b..0000000000 --- a/opencl/source/gen9/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN9) - add_subdirectories() -endif() diff --git a/opencl/source/gen9/buffer_gen9.cpp b/opencl/source/gen9/buffer_gen9.cpp deleted file mode 100644 index 84eb4bea31..0000000000 --- a/opencl/source/gen9/buffer_gen9.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" - -#include "opencl/source/mem_obj/buffer_base.inl" - -namespace NEO { - -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -#include "opencl/source/mem_obj/buffer_factory_init.inl" -} // namespace NEO diff --git a/opencl/source/gen9/cl_gfx_core_helper_gen9.cpp b/opencl/source/gen9/cl_gfx_core_helper_gen9.cpp deleted file mode 100644 index c235cb3556..0000000000 --- a/opencl/source/gen9/cl_gfx_core_helper_gen9.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/helpers/cl_gfx_core_helper_base.inl" -#include "opencl/source/helpers/cl_gfx_core_helper_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen9Family; -static auto gfxCore = IGFX_GEN9_CORE; - -#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl" - -template class ClGfxCoreHelperHw; - -} // namespace NEO diff --git a/opencl/source/gen9/command_queue_gen9.cpp b/opencl/source/gen9/command_queue_gen9.cpp deleted file mode 100644 index d010cc240d..0000000000 --- a/opencl/source/gen9/command_queue_gen9.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" -#include "shared/source/memory_manager/unified_memory_manager.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_queue/command_queue_hw_bdw_and_later.inl" -#include "opencl/source/command_queue/enqueue_resource_barrier.h" - -namespace NEO { - -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -template class CommandQueueHw; - -template <> -void populateFactoryTable>() { - extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE]; - commandQueueFactory[gfxCore] = CommandQueueHw::create; -} - -} // namespace NEO diff --git a/opencl/source/gen9/enable_family_full_ocl_gen9.cpp b/opencl/source/gen9/enable_family_full_ocl_gen9.cpp deleted file mode 100644 index a3bf9e1bd3..0000000000 --- a/opencl/source/gen9/enable_family_full_ocl_gen9.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/populate_factory.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/helpers/cl_gfx_core_helper.h" -#include "opencl/source/mem_obj/buffer.h" -#include "opencl/source/mem_obj/image.h" -#include "opencl/source/sampler/sampler.h" - -namespace NEO { - -using Family = Gen9Family; - -struct EnableOCLGen9 { - EnableOCLGen9() { - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableOCLGen9 enable; -} // namespace NEO diff --git a/opencl/source/gen9/gpgpu_walker_gen9.cpp b/opencl/source/gen9/gpgpu_walker_gen9.cpp deleted file mode 100644 index 5254a211ae..0000000000 --- a/opencl/source/gen9/gpgpu_walker_gen9.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" - -#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl" -#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen9Family; - -template <> -void GpgpuWalkerHelper::applyWADisableLSQCROPERFforOCL(NEO::LinearStream *pCommandStream, const Kernel &kernel, bool disablePerfMode) { - if (disablePerfMode) { - if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - // Set bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeOr, RegisterConstants::l3SqcBitLqscR0PerfDis); - } - } else { - if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - // Add PIPE_CONTROL with CS_Stall to wait till GPU finishes its work - typedef typename Family::PIPE_CONTROL PIPE_CONTROL; - auto pipeControlSpace = reinterpret_cast(pCommandStream->getSpace(sizeof(PIPE_CONTROL))); - auto pipeControl = Family::cmdInitPipeControl; - pipeControl.setCommandStreamerStallEnable(true); - *pipeControlSpace = pipeControl; - - // Clear bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4 - GpgpuWalkerHelper::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeAnd, ~RegisterConstants::l3SqcBitLqscR0PerfDis); - } - } -} - -template <> -size_t GpgpuWalkerHelper::getSizeForWADisableLSQCROPERFforOCL(const Kernel *pKernel) { - typedef typename Family::MI_LOAD_REGISTER_REG MI_LOAD_REGISTER_REG; - typedef typename Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename Family::PIPE_CONTROL PIPE_CONTROL; - typedef typename Family::MI_MATH MI_MATH; - typedef typename Family::MI_MATH_ALU_INST_INLINE MI_MATH_ALU_INST_INLINE; - size_t n = 0; - if (pKernel->getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) { - n += sizeof(PIPE_CONTROL) + - (2 * sizeof(MI_LOAD_REGISTER_REG) + - sizeof(MI_LOAD_REGISTER_IMM) + - sizeof(PIPE_CONTROL) + - sizeof(MI_MATH) + - RegisterConstants::numAluInstForReadModifyWrite * sizeof(MI_MATH_ALU_INST_INLINE)) * - 2; // For 2 WADisableLSQCROPERFforOCL WAs - } - return n; -} - -template class HardwareInterface; - -template void HardwareInterface::dispatchWalker(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::programWalker(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs); -template void HardwareInterface::dispatchKernelCommands(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs); -template Family::DefaultWalkerType *HardwareInterface::allocateWalkerSpace(LinearStream &commandStream, const Kernel &kernel); - -template class GpgpuWalkerHelper; -template void GpgpuWalkerHelper::setupTimestampPacket(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment); -template size_t GpgpuWalkerHelper::setGpgpuWalkerThreadData(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3], - const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder); - -template struct EnqueueOperation; - -} // namespace NEO diff --git a/opencl/source/gen9/gtpin_setup_gen9.cpp b/opencl/source/gen9/gtpin_setup_gen9.cpp deleted file mode 100644 index 59717030a4..0000000000 --- a/opencl/source/gen9/gtpin_setup_gen9.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/compiler_interface/external_functions.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/kernel/implicit_args_helper.h" - -#include "opencl/source/gtpin/gtpin_gfx_core_helper.h" -#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl" -#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl" - -#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" - -namespace NEO { - -extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE]; - -typedef Gen9Family Family; -static const auto gfxFamily = IGFX_GEN9_CORE; - -template <> -uint32_t GTPinGfxCoreHelperHw::getGenVersion() const { - return gtpin::GTPIN_GEN_9; -} - -template class GTPinGfxCoreHelperHw; - -struct GTPinEnableGen9 { - GTPinEnableGen9() { - gtpinGfxCoreHelperFactory[gfxFamily] = GTPinGfxCoreHelperHw::create; - } -}; - -static GTPinEnableGen9 gtpinEnable; - -} // namespace NEO diff --git a/opencl/source/gen9/hardware_commands_helper_gen9.cpp b/opencl/source/gen9/hardware_commands_helper_gen9.cpp deleted file mode 100644 index 328bfc2cdc..0000000000 --- a/opencl/source/gen9/hardware_commands_helper_gen9.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/source/helpers/hardware_commands_helper_base.inl" -#include "opencl/source/helpers/hardware_commands_helper_bdw_and_later.inl" - -#include - -namespace NEO { -using FamilyType = Gen9Family; -} // namespace NEO - -#include "opencl/source/helpers/enable_hardware_commands_helper_gpgpu.inl" diff --git a/opencl/source/gen9/image_gen9.cpp b/opencl/source/gen9/image_gen9.cpp deleted file mode 100644 index 8ed5121411..0000000000 --- a/opencl/source/gen9/image_gen9.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" - -#include "opencl/source/mem_obj/image.inl" - -namespace NEO { - -using Family = Gen9Family; -static auto gfxCore = IGFX_GEN9_CORE; -} // namespace NEO - -// factory initializer -#include "opencl/source/mem_obj/image_factory_init.inl" diff --git a/opencl/source/gen9/sampler_gen9.cpp b/opencl/source/gen9/sampler_gen9.cpp deleted file mode 100644 index 18a1690e64..0000000000 --- a/opencl/source/gen9/sampler_gen9.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" - -#include "opencl/source/sampler/sampler.h" -#include "opencl/source/sampler/sampler.inl" - -namespace NEO { - -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -#include "opencl/source/sampler/sampler_factory_init.inl" -} // namespace NEO diff --git a/opencl/test/unit_test/aub_tests/gen11/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen11/CMakeLists.txt deleted file mode 100644 index 7938164807..0000000000 --- a/opencl/test/unit_test/aub_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - target_sources(igdrcl_aub_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen11/batch_buffer/CMakeLists.txt deleted file mode 100644 index abb946ef19..0000000000 --- a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -target_sources(igdrcl_aub_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests_gen11.h - ${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests_gen11.cpp -) diff --git a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.cpp b/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.cpp deleted file mode 100644 index 995d38dad6..0000000000 --- a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aub_batch_buffer_tests_gen11.h" - -#include "shared/test/common/mocks/mock_device.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using Gen11AubBatchBufferTests = Test; - -static constexpr auto gpuBatchBufferAddr = 0x800400001000; // 48-bit GPU address - -GEN11TEST_F(Gen11AubBatchBufferTests, givenSimpleRCSWithBatchBufferWhenItHasMSBSetInGpuAddressThenAUBShouldBeSetupSuccessfully) { - setupAUBWithBatchBuffer(pDevice, aub_stream::ENGINE_RCS, gpuBatchBufferAddr); -} diff --git a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.h b/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.h deleted file mode 100644 index 1e1ad88ea8..0000000000 --- a/opencl/test/unit_test/aub_tests/gen11/batch_buffer/aub_batch_buffer_tests_gen11.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/aub/aub_helper.h" - -#include "opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h" - -template -void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType engineType, uint64_t gpuBatchBufferAddr) { - typedef typename NEO::AUBFamilyMapper::AUB AUB; - const auto &csTraits = NEO::CommandStreamReceiverSimulatedCommonHw::getCsTraits(engineType); - auto mmioBase = csTraits.mmioBase; - uint64_t physAddress = 0x10000; - - NEO::AUBCommandStreamReceiver::AubFileStream aubFile; - std::string filePath(NEO::folderAUB); - filePath.append(Os::fileSeparator); - std::string baseName("simple"); - baseName.append(csTraits.name); - baseName.append("WithBatchBuffer"); - baseName.append(".aub"); - filePath.append(getAubFileName(pDevice, baseName)); - - aubFile.fileHandle.open(filePath.c_str(), std::ofstream::binary); - - // Header - auto &hwInfo = pDevice->getHardwareInfo(); - const auto &productHelper = pDevice->getProductHelper(); - aubFile.init(productHelper.getAubStreamSteppingFromHwRevId(hwInfo), AUB::Traits::device); - - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x229c), 0xffff8280); - - const size_t sizeHWSP = 0x1000; - const size_t alignHWSP = 0x1000; - auto pGlobalHWStatusPage = alignedMalloc(sizeHWSP, alignHWSP); - - uint32_t ggttGlobalHardwareStatusPage = (uint32_t)((uintptr_t)pGlobalHWStatusPage); - AubGTTData data = {true, false}; - AUB::reserveAddressGGTT(aubFile, ggttGlobalHardwareStatusPage, sizeHWSP, physAddress, data); - physAddress += sizeHWSP; - - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2080), ggttGlobalHardwareStatusPage); - - using MI_NOOP = typename FamilyType::MI_NOOP; - using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START; - using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END; - - // create a user mode batch buffer - auto physBatchBuffer = physAddress; - const auto sizeBatchBuffer = 0x1000; - auto gpuBatchBuffer = static_cast(gpuBatchBufferAddr); - physAddress += sizeBatchBuffer; - - NEO::AubHelperHw aubHelperHw(false); - AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw); - uint8_t batchBuffer[sizeBatchBuffer]; - - auto noop = FamilyType::cmdInitNoop; - uint32_t noopId = 0xbaadd; - - { - auto pBatchBuffer = (void *)batchBuffer; - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true; - noop.TheStructure.Common.IdentificationNumber = noopId++; - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_BATCH_BUFFER_END *)pBatchBuffer = FamilyType::cmdInitBatchBufferEnd; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_BATCH_BUFFER_END)); - auto sizeBufferUsed = ptrDiff(pBatchBuffer, batchBuffer); - - AUB::addMemoryWrite(aubFile, physBatchBuffer, batchBuffer, sizeBufferUsed, AubMemDump::AddressSpaceValues::TraceNonlocal, AubMemDump::DataTypeHintValues::TraceBatchBuffer); - } - - const size_t sizeRing = 0x4 * 0x1000; - const size_t alignRing = 0x1000; - size_t sizeCommands = 0; - auto pRing = alignedMalloc(sizeRing, alignRing); - - auto ggttRing = (uint32_t)(uintptr_t)pRing; - auto physRing = physAddress; - physAddress += sizeRing; - auto rRing = AUB::reserveAddressGGTT(aubFile, ggttRing, sizeRing, physRing, data); - ASSERT_NE(static_cast(-1), rRing); - EXPECT_EQ(rRing, physRing); - - auto cur = (uint32_t *)pRing; - auto bbs = FamilyType::cmdInitBatchBufferStart; - bbs.setBatchBufferStartAddress(gpuBatchBuffer); - bbs.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT); - *(MI_BATCH_BUFFER_START *)cur = bbs; - cur = ptrOffset(cur, sizeof(MI_BATCH_BUFFER_START)); - noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true; - noop.TheStructure.Common.IdentificationNumber = noopId; - *cur++ = noop.TheStructure.RawData[0]; - - sizeCommands = ptrDiff(cur, pRing); - - AUB::addMemoryWrite(aubFile, physRing, pRing, sizeCommands, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintCommandBuffer); - - auto sizeLRCA = csTraits.sizeLRCA; - auto pLRCABase = alignedMalloc(csTraits.sizeLRCA, csTraits.alignLRCA); - - csTraits.initialize(pLRCABase); - csTraits.setRingHead(pLRCABase, 0x0000); - csTraits.setRingTail(pLRCABase, static_cast(sizeCommands)); - csTraits.setRingBase(pLRCABase, ggttRing); - auto ringCtrl = static_cast((sizeRing - 0x1000) | 1); - csTraits.setRingCtrl(pLRCABase, ringCtrl); - - auto ggttLRCA = static_cast(reinterpret_cast(pLRCABase)); - auto physLRCA = physAddress; - physAddress += sizeLRCA; - AUB::reserveAddressGGTT(aubFile, ggttLRCA, sizeLRCA, physLRCA, data); - AUB::addMemoryWrite(aubFile, physLRCA, pLRCABase, sizeLRCA, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintLRCA); - - typename AUB::MiContextDescriptorReg contextDescriptor = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - - contextDescriptor.sData.valid = true; - contextDescriptor.sData.forcePageDirRestore = false; - contextDescriptor.sData.forceRestore = false; - contextDescriptor.sData.legacy = true; - contextDescriptor.sData.faultSupport = 0; - contextDescriptor.sData.privilegeAccessOrPPGTT = true; - contextDescriptor.sData.aDor64bitSupport = AUB::Traits::addressingBits > 32; - - contextDescriptor.sData.logicalRingCtxAddress = (uintptr_t)pLRCABase / 4096; - contextDescriptor.sData.contextID = 0; - - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2510), contextDescriptor.ulData[0]); - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2514), contextDescriptor.ulData[1]); - - // Load our new exec list - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2550), 1); - - // Poll until HW complete - using AubMemDump::CmdServicesMemTraceRegisterPoll; - aubFile.registerPoll( - AubMemDump::computeRegisterOffset(mmioBase, 0x2234), // EXECLIST_STATUS - 0x00008000, - 0x00008000, - false, - CmdServicesMemTraceRegisterPoll::TimeoutActionValues::Abort); - - alignedFree(pRing); - alignedFree(pLRCABase); - alignedFree(pGlobalHWStatusPage); - - aubFile.fileHandle.close(); -} diff --git a/opencl/test/unit_test/aub_tests/gen9/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen9/CMakeLists.txt deleted file mode 100644 index e6cdacc319..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - target_sources(igdrcl_aub_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen9/batch_buffer/CMakeLists.txt deleted file mode 100644 index 7c08f01535..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -target_sources(igdrcl_aub_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests.h - ${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests.cpp -) diff --git a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp b/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp deleted file mode 100644 index 177b93f79b..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aub_batch_buffer_tests.h" - -#include "shared/test/common/mocks/mock_device.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using AubBatchBufferTests = Test; - -static constexpr auto gpuBatchBufferAddr = 0x800400001000ull; // 48-bit GPU address - -GEN9TEST_F(AubBatchBufferTests, givenSimpleRCSWithBatchBufferWhenItHasMSBSetInGpuAddressThenAUBShouldBeSetupSuccessfully) { - setupAUBWithBatchBuffer(pDevice, aub_stream::ENGINE_RCS, gpuBatchBufferAddr); -} diff --git a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h b/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h deleted file mode 100644 index de977366c3..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/aub/aub_helper.h" - -#include "opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h" - -template -void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType engineType, uint64_t gpuBatchBufferAddr) { - typedef typename NEO::AUBFamilyMapper::AUB AUB; - const auto &csTraits = NEO::CommandStreamReceiverSimulatedCommonHw::getCsTraits(engineType); - auto mmioBase = csTraits.mmioBase; - uint64_t physAddress = 0x10000; - - NEO::AUBCommandStreamReceiver::AubFileStream aubFile; - std::string filePath(NEO::folderAUB); - filePath.append(Os::fileSeparator); - std::string baseName("simple"); - baseName.append(csTraits.name); - baseName.append("WithBatchBuffer"); - baseName.append(".aub"); - filePath.append(getAubFileName(pDevice, baseName)); - - aubFile.fileHandle.open(filePath.c_str(), std::ofstream::binary); - - // Header - auto &hwInfo = pDevice->getHardwareInfo(); - auto deviceId = hwInfo.capabilityTable.aubDeviceId; - const auto &productHelper = pDevice->getProductHelper(); - aubFile.init(productHelper.getAubStreamSteppingFromHwRevId(hwInfo), deviceId); - - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x229c), 0xffff8280); - - const size_t sizeHWSP = 0x1000; - const size_t alignHWSP = 0x1000; - auto pGlobalHWStatusPage = alignedMalloc(sizeHWSP, alignHWSP); - - uint32_t ggttGlobalHardwareStatusPage = (uint32_t)((uintptr_t)pGlobalHWStatusPage); - AubGTTData data = {true, false}; - AUB::reserveAddressGGTT(aubFile, ggttGlobalHardwareStatusPage, sizeHWSP, physAddress, data); - physAddress += sizeHWSP; - - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2080), ggttGlobalHardwareStatusPage); - - using MI_NOOP = typename FamilyType::MI_NOOP; - using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START; - using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END; - - // create a user mode batch buffer - auto physBatchBuffer = physAddress; - const auto sizeBatchBuffer = 0x1000; - auto gpuBatchBuffer = static_cast(gpuBatchBufferAddr); - physAddress += sizeBatchBuffer; - - NEO::AubHelperHw aubHelperHw(false); - - AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw); - uint8_t batchBuffer[sizeBatchBuffer]; - - auto noop = FamilyType::cmdInitNoop; - uint32_t noopId = 0xbaadd; - - { - auto pBatchBuffer = (void *)batchBuffer; - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true; - noop.TheStructure.Common.IdentificationNumber = noopId++; - *(MI_NOOP *)pBatchBuffer = noop; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP)); - *(MI_BATCH_BUFFER_END *)pBatchBuffer = FamilyType::cmdInitBatchBufferEnd; - pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_BATCH_BUFFER_END)); - auto sizeBufferUsed = ptrDiff(pBatchBuffer, batchBuffer); - - AUB::addMemoryWrite(aubFile, physBatchBuffer, batchBuffer, sizeBufferUsed, AubMemDump::AddressSpaceValues::TraceNonlocal, AubMemDump::DataTypeHintValues::TraceBatchBuffer); - } - - const size_t sizeRing = 0x4 * 0x1000; - const size_t alignRing = 0x1000; - size_t sizeCommands = 0; - auto pRing = alignedMalloc(sizeRing, alignRing); - - auto ggttRing = (uint32_t)(uintptr_t)pRing; - auto physRing = physAddress; - physAddress += sizeRing; - auto rRing = AUB::reserveAddressGGTT(aubFile, ggttRing, sizeRing, physRing, data); - ASSERT_NE(static_cast(-1), rRing); - EXPECT_EQ(rRing, physRing); - - auto cur = (uint32_t *)pRing; - auto bbs = FamilyType::cmdInitBatchBufferStart; - bbs.setBatchBufferStartAddress(gpuBatchBuffer); - bbs.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT); - *(MI_BATCH_BUFFER_START *)cur = bbs; - cur = ptrOffset(cur, sizeof(MI_BATCH_BUFFER_START)); - noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true; - noop.TheStructure.Common.IdentificationNumber = noopId; - *cur++ = noop.TheStructure.RawData[0]; - - sizeCommands = ptrDiff(cur, pRing); - - AUB::addMemoryWrite(aubFile, physRing, pRing, sizeCommands, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintCommandBuffer); - - auto sizeLRCA = csTraits.sizeLRCA; - auto pLRCABase = alignedMalloc(csTraits.sizeLRCA, csTraits.alignLRCA); - - csTraits.initialize(pLRCABase); - csTraits.setRingHead(pLRCABase, 0x0000); - csTraits.setRingTail(pLRCABase, static_cast(sizeCommands)); - csTraits.setRingBase(pLRCABase, ggttRing); - auto ringCtrl = static_cast((sizeRing - 0x1000) | 1); - csTraits.setRingCtrl(pLRCABase, ringCtrl); - - auto ggttLRCA = static_cast(reinterpret_cast(pLRCABase)); - auto physLRCA = physAddress; - physAddress += sizeLRCA; - AUB::reserveAddressGGTT(aubFile, ggttLRCA, sizeLRCA, physLRCA, data); - AUB::addMemoryWrite(aubFile, physLRCA, pLRCABase, sizeLRCA, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintLRCA); - - typename AUB::MiContextDescriptorReg contextDescriptor = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - - contextDescriptor.sData.valid = true; - contextDescriptor.sData.forcePageDirRestore = false; - contextDescriptor.sData.forceRestore = false; - contextDescriptor.sData.legacy = true; - contextDescriptor.sData.faultSupport = 0; - contextDescriptor.sData.privilegeAccessOrPPGTT = true; - contextDescriptor.sData.aDor64bitSupport = AUB::Traits::addressingBits > 32; - - contextDescriptor.sData.logicalRingCtxAddress = (uintptr_t)pLRCABase / 4096; - contextDescriptor.sData.contextID = 0; - - // Submit our exec-list - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), 0); - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), 0); - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), contextDescriptor.ulData[1]); - aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), contextDescriptor.ulData[0]); - - // Poll until HW complete - using AubMemDump::CmdServicesMemTraceRegisterPoll; - aubFile.registerPoll( - AubMemDump::computeRegisterOffset(mmioBase, 0x2234), // EXECLIST_STATUS - 0x100, - 0x100, - false, - CmdServicesMemTraceRegisterPoll::TimeoutActionValues::Abort); - - alignedFree(pRing); - alignedFree(pLRCABase); - alignedFree(pGlobalHWStatusPage); - - aubFile.fileHandle.close(); -} diff --git a/opencl/test/unit_test/aub_tests/gen9/skl/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen9/skl/CMakeLists.txt deleted file mode 100644 index 35cca6bd38..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/CMakeLists.txt b/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/CMakeLists.txt deleted file mode 100644 index 50e63f1edc..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -target_sources(igdrcl_aub_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/run_kernel_aub_tests_skl.cpp -) diff --git a/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/run_kernel_aub_tests_skl.cpp b/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/run_kernel_aub_tests_skl.cpp deleted file mode 100644 index e30a967f9d..0000000000 --- a/opencl/test/unit_test/aub_tests/gen9/skl/command_queue/run_kernel_aub_tests_skl.cpp +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "opencl/test/unit_test/aub_tests/fixtures/run_kernel_fixture.h" -#include "opencl/test/unit_test/fixtures/two_walker_fixture.h" - -using namespace NEO; - -namespace ULT { - -class AUBRunKernelIntegrateTest : public RunKernelFixture, - public ClHardwareParse, - public ::testing::Test { - typedef RunKernelFixture ParentClass; - - protected: - void SetUp() override { - debugManager.flags.EnableFreeMemory.set(false); - ParentClass::setUp(); - } - - void TearDown() override { - ParentClass::tearDown(); - } - DebugManagerStateRestore restorer; -}; - -SKLTEST_F(AUBRunKernelIntegrateTest, GivenOoqExecutionThenExpectationsMet) { - cl_uint workDim = 1; - size_t globalWorkOffset[3] = {0, 0, 0}; - size_t globalWorkSize[3] = {16, 1, 1}; - size_t localWorkSize[3] = {16, 1, 1}; - cl_uint numEventsInWaitList = 0; - cl_event *event0 = nullptr; - cl_event *event1 = nullptr; - cl_event *event2 = nullptr; - cl_int retVal = CL_FALSE; - - std::string kernelFilename; - retrieveBinaryKernelFilename(kernelFilename, "simple_kernels_", ".bin"); - Program *pProgram = createProgramFromBinary(kernelFilename); - ASSERT_NE(nullptr, pProgram); - - retVal = pProgram->build( - pProgram->getDevices(), - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - const KernelInfo *pKernelInfo0 = pProgram->getKernelInfo("simple_kernel_0", rootDeviceIndex); - ASSERT_NE(nullptr, pKernelInfo0); - - auto pMultiDeviceKernel0 = MultiDeviceKernel::create( - pProgram, - MockKernel::toKernelInfoContainer(*pKernelInfo0, rootDeviceIndex), - retVal); - ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_NE(nullptr, pMultiDeviceKernel0); - - const KernelInfo *pKernelInfo1 = pProgram->getKernelInfo("simple_kernel_1", rootDeviceIndex); - ASSERT_NE(nullptr, pKernelInfo1); - - auto pMultiDeviceKernel1 = MultiDeviceKernel::create( - pProgram, - MockKernel::toKernelInfoContainer(*pKernelInfo1, rootDeviceIndex), - retVal); - ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_NE(nullptr, pMultiDeviceKernel1); - - const KernelInfo *pKernelInfo2 = pProgram->getKernelInfo("simple_kernel_2", rootDeviceIndex); - ASSERT_NE(nullptr, pKernelInfo2); - - auto pMultiDeviceKernel2 = MultiDeviceKernel::create( - pProgram, - MockKernel::toKernelInfoContainer(*pKernelInfo2, rootDeviceIndex), - retVal); - ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_NE(nullptr, pMultiDeviceKernel2); - - const cl_int numElems = 64; - const size_t bufferSize = numElems * sizeof(cl_uint); - - cl_uint *destinationMemory1; - cl_uint *destinationMemory2; - cl_uint expectedMemory1[numElems]; - cl_uint expectedMemory2[numElems]; - - cl_uint arg0 = 2; - cl_float arg1 = 3.0f; - cl_uint arg3 = 4; - cl_uint arg5 = 0xBBBBBBBB; - cl_uint badValue = 0; // set to non-zero to force failure - - destinationMemory1 = (cl_uint *)::alignedMalloc(bufferSize, 4096); - ASSERT_NE(nullptr, destinationMemory1); - destinationMemory2 = (cl_uint *)::alignedMalloc(bufferSize, 4096); - ASSERT_NE(nullptr, destinationMemory2); - - for (cl_int i = 0; i < numElems; i++) { - destinationMemory1[i] = 0xA1A1A1A1; - destinationMemory2[i] = 0xA2A2A2A2; - expectedMemory1[i] = (arg0 + static_cast(arg1) + arg3 + badValue); - expectedMemory2[i] = arg5 + badValue; - } - - auto pDestinationMemory1 = &destinationMemory1[0]; - auto pDestinationMemory2 = &destinationMemory2[0]; - auto pExpectedMemory1 = &expectedMemory1[0]; - auto pExpectedMemory2 = &expectedMemory2[0]; - - auto intermediateBuffer = Buffer::create( - context, - CL_MEM_READ_WRITE, - bufferSize, - nullptr, - retVal); - ASSERT_NE(nullptr, intermediateBuffer); - - auto destinationBuffer1 = Buffer::create( - context, - CL_MEM_USE_HOST_PTR, - bufferSize, - pDestinationMemory1, - retVal); - ASSERT_NE(nullptr, destinationBuffer1); - - // buffer may not be zero copied - pDestinationMemory1 = reinterpret_cast(destinationBuffer1->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()); - - auto destinationBuffer2 = Buffer::create( - context, - CL_MEM_USE_HOST_PTR, - bufferSize, - pDestinationMemory2, - retVal); - ASSERT_NE(nullptr, destinationBuffer2); - - // buffer may not be zero copied - pDestinationMemory2 = reinterpret_cast(destinationBuffer2->getGraphicsAllocation(pClDevice->getRootDeviceIndex())->getGpuAddress()); - - cl_mem arg2 = intermediateBuffer; - cl_mem arg4 = destinationBuffer1; - cl_mem arg6 = destinationBuffer2; - - //__kernel void simple_kernel_0(const uint arg0, const float arg1, __global uint *dst) - //{ dst = arg0 + arg1 } - retVal = clSetKernelArg(pMultiDeviceKernel0, 0, sizeof(cl_uint), &arg0); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel0, 1, sizeof(cl_float), &arg1); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel0, 2, sizeof(cl_mem), &arg2); - ASSERT_EQ(CL_SUCCESS, retVal); - - //__kernel void simple_kernel_1(__global uint *src, const uint arg1, __global uint *dst) - //{ dst = src + arg1 } - retVal = clSetKernelArg(pMultiDeviceKernel1, 0, sizeof(cl_mem), &arg2); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel1, 1, sizeof(cl_uint), &arg3); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel1, 2, sizeof(cl_mem), &arg4); - ASSERT_EQ(CL_SUCCESS, retVal); - - //__kernel void simple_kernel_2(const uint arg1, __global uint *dst) - //{ dst = arg1 } - retVal = clSetKernelArg(pMultiDeviceKernel2, 0, sizeof(cl_mem), &arg5); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel2, 1, sizeof(cl_mem), &arg6); - ASSERT_EQ(CL_SUCCESS, retVal); - - // Create a second command queue (beyond the default one) - CommandQueue *pCmdQ2 = nullptr; - pCmdQ2 = createCommandQueue(pClDevice, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE); - ASSERT_NE(nullptr, pCmdQ2); - - auto &csr = pCmdQ2->getGpgpuCommandStreamReceiver(); - csr.overrideDispatchPolicy(DispatchMode::immediateDispatch); - - retVal = pCmdQ2->enqueueKernel( - pMultiDeviceKernel0->getKernel(rootDeviceIndex), - workDim, - globalWorkOffset, - globalWorkSize, - localWorkSize, - numEventsInWaitList, - nullptr, - event0); - ASSERT_EQ(CL_SUCCESS, retVal); - - // depends on kernel0 - retVal = pCmdQ2->enqueueKernel( - pMultiDeviceKernel1->getKernel(rootDeviceIndex), - workDim, - globalWorkOffset, - globalWorkSize, - localWorkSize, - numEventsInWaitList, - event0, - event1); - ASSERT_EQ(CL_SUCCESS, retVal); - - // independent from other kernels, can be run asynchronously - retVal = pCmdQ2->enqueueKernel( - pMultiDeviceKernel2->getKernel(rootDeviceIndex), - workDim, - globalWorkOffset, - globalWorkSize, - localWorkSize, - numEventsInWaitList, - nullptr, - event2); - ASSERT_EQ(CL_SUCCESS, retVal); - - ClHardwareParse::parseCommands(*pCmdQ2); - - // Compute our memory expecations based on kernel execution - auto globalWorkItems = globalWorkSize[0] * globalWorkSize[1] * globalWorkSize[2]; - auto sizeWritten = globalWorkItems * sizeof(cl_uint); - expectMemory(pDestinationMemory1, pExpectedMemory1, sizeWritten); - expectMemory(pDestinationMemory2, pExpectedMemory2, sizeWritten); - - // ensure we didn't overwrite existing memory - if (sizeWritten < bufferSize) { - auto sizeRemaining = bufferSize - sizeWritten; - auto pUnwrittenMemory1 = (pDestinationMemory1 + sizeWritten / sizeof(cl_uint)); - auto pUnwrittenMemory2 = (pDestinationMemory2 + sizeWritten / sizeof(cl_uint)); - auto pExpectedUnwrittenMemory1 = &destinationMemory1[globalWorkItems]; - auto pExpectedUnwrittenMemory2 = &destinationMemory2[globalWorkItems]; - expectMemory(pUnwrittenMemory1, pExpectedUnwrittenMemory1, sizeRemaining); - expectMemory(pUnwrittenMemory2, pExpectedUnwrittenMemory2, sizeRemaining); - } - - ::alignedFree(destinationMemory1); - ::alignedFree(destinationMemory2); - delete intermediateBuffer; - delete destinationBuffer1; - delete destinationBuffer2; - delete pMultiDeviceKernel0; - delete pMultiDeviceKernel1; - delete pMultiDeviceKernel2; - delete pProgram; - delete pCmdQ2; -} - -SKLTEST_F(AUBRunKernelIntegrateTest, GivenDeviceSideVmeThenExpectationsMet) { - const cl_int testWidth = 32; - const cl_int testHeight = 16; - const cl_uint workDim = 2; - const size_t globalWorkSize[2] = {testWidth, testHeight}; - const size_t *localWorkSize = nullptr; - cl_uint numEventsInWaitList = 0; - auto retVal = CL_INVALID_VALUE; - - // VME works on 16x16 macroblocks - const cl_int mbWidth = testWidth / 16; - const cl_int mbHeight = testHeight / 16; - - // 1 per macroblock (there is 1 macroblock in this test): - const int predBufferSize = mbWidth * mbHeight; - const int shapesBufferSize = mbWidth * mbHeight; - - // 4 per macroblock (valid for 8x8 mode only): - const int mvBufferSize = testWidth * mbHeight / 4; - const int residualsBufferSize = mvBufferSize; - - std::string kernelFilename; - retrieveBinaryKernelFilename(kernelFilename, "vme_kernels_", ".bin"); - Program *pProgram = createProgramFromBinary(kernelFilename); - ASSERT_NE(nullptr, pProgram); - - retVal = pProgram->build( - pProgram->getDevices(), - ""); - ASSERT_EQ(CL_SUCCESS, retVal); - - const KernelInfo *pKernelInfo = pProgram->getKernelInfo("device_side_block_motion_estimate_intel", rootDeviceIndex); - EXPECT_NE(nullptr, pKernelInfo); - - auto *pMultiDeviceKernel = MultiDeviceKernel::create( - pProgram, - MockKernel::toKernelInfoContainer(*pKernelInfo, rootDeviceIndex), - retVal); - ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_NE(pMultiDeviceKernel, nullptr); - auto pKernel = pMultiDeviceKernel->getKernel(rootDeviceIndex); - EXPECT_EQ(true, pKernel->isVmeKernel()); - - cl_image_format imageFormat; - cl_image_desc imageDesc; - - imageFormat.image_channel_order = CL_R; - imageFormat.image_channel_data_type = CL_UNORM_INT8; - - imageDesc.image_type = CL_MEM_OBJECT_IMAGE2D; - imageDesc.image_width = testWidth; - imageDesc.image_height = testHeight; - imageDesc.image_depth = 0; - imageDesc.image_array_size = 0; - imageDesc.image_row_pitch = 0; - imageDesc.image_slice_pitch = 0; - imageDesc.num_mip_levels = 0; - imageDesc.num_samples = 0; - imageDesc.mem_object = nullptr; - - const int inputSize = testWidth * testHeight; - ASSERT_GT(inputSize, 0); - - auto srcMemory = (cl_uchar *)::alignedMalloc(inputSize, 4096); - ASSERT_NE(srcMemory, nullptr); - memset(srcMemory, 0x00, inputSize); - - auto refMemory = (cl_uchar *)::alignedMalloc(inputSize, 4096); - ASSERT_NE(refMemory, nullptr); - memset(refMemory, 0x00, inputSize); - - int xMovement = 7; - int yMovement = 9; - - // pixel movement: 0xFF, 0xFF values moved from 0x0 to 7x9 for vme kernel to detect - srcMemory[0] = 0xFF; // 1.0 - srcMemory[1] = 0xFF; // 1.0 - refMemory[xMovement + yMovement * testWidth] = 0xFF; - refMemory[xMovement + yMovement * testWidth + 1] = 0xFF; - - cl_mem_flags flags = CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR; - auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features); - auto srcImage = Image::create( - context, - ClMemoryPropertiesHelper::createMemoryProperties(flags, 0, 0, &context->getDevice(0)->getDevice()), - flags, - 0, - surfaceFormat, - &imageDesc, - srcMemory, - retVal); - ASSERT_NE(nullptr, srcImage); - - auto refImage = Image::create( - context, - ClMemoryPropertiesHelper::createMemoryProperties(flags, 0, 0, &context->getDevice(0)->getDevice()), - flags, - 0, - surfaceFormat, - &imageDesc, - refMemory, - retVal); - ASSERT_NE(nullptr, refImage); - - cl_short2 *predMem = new cl_short2[predBufferSize]; - for (int i = 0; i < predBufferSize; i++) { - predMem[i].s[0] = 0; - predMem[i].s[1] = 0; - } - - auto predMvBuffer = Buffer::create( - context, - CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, - predBufferSize * sizeof(cl_short2), - predMem, - retVal); - ASSERT_NE(nullptr, predMvBuffer); - - auto motionVectorBuffer = Buffer::create( - context, - CL_MEM_WRITE_ONLY, - mvBufferSize * sizeof(cl_short2), - nullptr, - retVal); - ASSERT_NE(nullptr, motionVectorBuffer); - - auto residualsBuffer = Buffer::create( - context, - CL_MEM_WRITE_ONLY, - residualsBufferSize * sizeof(cl_short), - nullptr, - retVal); - ASSERT_NE(nullptr, residualsBuffer); - - auto shapesBuffer = Buffer::create( - context, - CL_MEM_WRITE_ONLY, - shapesBufferSize * sizeof(cl_char2), - nullptr, - retVal); - ASSERT_NE(nullptr, shapesBuffer); - - // kernel decl: - // void block_motion_estimate_intel_noacc( - // __read_only image2d_t srcImg, // IN - // __read_only image2d_t refImg, // IN - // __global short2* prediMVbuffer, // IN - // __global short2* motion_vector_buffer, // OUT - // __global ushort* residuals_buffer, // OUT - // __global uchar2* shapes_buffer, // OUT - // int iterations, // IN - // int partition_mask) // IN - - cl_mem arg0 = srcImage; - cl_mem arg1 = refImage; - cl_mem arg2 = predMvBuffer; - cl_mem arg3 = motionVectorBuffer; - cl_mem arg4 = residualsBuffer; - cl_mem arg5 = shapesBuffer; - cl_int arg6 = mbHeight; - cl_int arg7 = CL_AVC_ME_PARTITION_MASK_8x8_INTEL; - - retVal = clSetKernelArg(pMultiDeviceKernel, 0, sizeof(cl_mem), &arg0); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 1, sizeof(cl_mem), &arg1); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 2, sizeof(cl_mem), &arg2); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 3, sizeof(cl_mem), &arg3); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 4, sizeof(cl_mem), &arg4); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 5, sizeof(cl_mem), &arg5); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 6, sizeof(cl_int), &arg6); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = clSetKernelArg(pMultiDeviceKernel, 7, sizeof(cl_int), &arg7); - ASSERT_EQ(CL_SUCCESS, retVal); - - retVal = pCmdQ->enqueueKernel( - pKernel, - workDim, - nullptr, - globalWorkSize, - localWorkSize, - numEventsInWaitList, - nullptr, - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - cl_short2 destinationMV[mvBufferSize]; - cl_short destinationResiduals[residualsBufferSize]; - cl_uchar2 destinationShapes[shapesBufferSize]; - - motionVectorBuffer->forceDisallowCPUCopy = true; - residualsBuffer->forceDisallowCPUCopy = true; - shapesBuffer->forceDisallowCPUCopy = true; - - retVal = pCmdQ->enqueueReadBuffer(motionVectorBuffer, true, 0, sizeof(destinationMV), destinationMV, nullptr, 0, nullptr, nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = pCmdQ->enqueueReadBuffer(residualsBuffer, true, 0, sizeof(destinationResiduals), destinationResiduals, nullptr, 0, nullptr, nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - retVal = pCmdQ->enqueueReadBuffer(shapesBuffer, true, 0, sizeof(destinationShapes), destinationShapes, nullptr, 0, nullptr, nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - // Check if our buffers matches expectations - cl_short2 expectedMV[mvBufferSize]; - cl_short expectedResiduals[residualsBufferSize]; - cl_uchar2 expectedShapes[shapesBufferSize]; - - // This test uses 8x8 sub blocks (4 per macroblock) - for (int i = 0; i < shapesBufferSize; i++) { - expectedShapes[i].s0 = CL_AVC_ME_MAJOR_8x8_INTEL; - expectedShapes[i].s1 = CL_AVC_ME_MINOR_8x8_INTEL; - } - - for (int i = 0; i < mvBufferSize; i++) { - expectedResiduals[i] = 0; - - // Second and fourth block not moved, set 0 as default. - expectedMV[i].s0 = 0; - expectedMV[i].s1 = 0; - - // First 8x8 subblock moved by 7x9 vecor as xMovement is 7 and - // yMovement is 9 - if (i == 0) { - // times 4 since VME returns data in quarter pixels. - expectedMV[i].s0 = 4 * xMovement; - expectedMV[i].s1 = 4 * yMovement; - } - // In this test all other subblocks are empty, in 16x12 mode used in - // this test vme should find match at -16 x -12 - else { - expectedMV[i].s0 = 4 * -16; - expectedMV[i].s1 = 4 * -12; - } - } - - expectMemory(destinationMV, expectedMV, sizeof(expectedMV)); - expectMemory(destinationResiduals, expectedResiduals, sizeof(expectedResiduals)); - expectMemory(destinationShapes, expectedShapes, sizeof(expectedShapes)); - - delete predMvBuffer; - delete motionVectorBuffer; - delete residualsBuffer; - delete shapesBuffer; - - delete[] predMem; - - ::alignedFree(srcMemory); - srcMemory = nullptr; - delete srcImage; - - ::alignedFree(refMemory); - refMemory = nullptr; - delete refImage; - - delete pMultiDeviceKernel; - delete pProgram; -} -} // namespace ULT diff --git a/opencl/test/unit_test/gen11/CMakeLists.txt b/opencl/test/unit_test/gen11/CMakeLists.txt deleted file mode 100644 index 29bfba4b2b..0000000000 --- a/opencl/test/unit_test/gen11/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2019-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - set(IGDRCL_SRCS_tests_gen11 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cl_gfx_core_helper_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen11.cpp - ) - - get_property(NEO_CORE_TESTS_GEN11 GLOBAL PROPERTY NEO_CORE_TESTS_GEN11) - list(APPEND IGDRCL_SRCS_tests_gen11 ${NEO_CORE_TESTS_GEN11}) - - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen11/cl_gfx_core_helper_tests_gen11.cpp b/opencl/test/unit_test/gen11/cl_gfx_core_helper_tests_gen11.cpp deleted file mode 100644 index 904d638272..0000000000 --- a/opencl/test/unit_test/gen11/cl_gfx_core_helper_tests_gen11.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -#include "opencl/source/helpers/cl_gfx_core_helper.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_gfx_core_helper.h" - -using ClGfxCoreHelperTestGen11 = Test; - -GEN11TEST_F(ClGfxCoreHelperTestGen11, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) { - auto &clGfxCoreHelper = getHelper(); - EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment())); -} diff --git a/opencl/test/unit_test/gen11/command_stream_receiver_hw_tests_gen11.cpp b/opencl/test/unit_test/gen11/command_stream_receiver_hw_tests_gen11.cpp deleted file mode 100644 index a2e36fb8c4..0000000000 --- a/opencl/test/unit_test/gen11/command_stream_receiver_hw_tests_gen11.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/mocks/mock_csr.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_command_queue.h" -#include "opencl/test/unit_test/mocks/mock_context.h" -#include "opencl/test/unit_test/mocks/mock_event.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -#include "gtest/gtest.h" - -using namespace NEO; - -#include "opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests.inl" - -using CommandStreamReceiverHwTestGen11 = CommandStreamReceiverHwTest; - -GEN11TEST_F(CommandStreamReceiverHwTestGen11, GivenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3Config) { - givenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigImpl(); -} - -GEN11TEST_F(CommandStreamReceiverHwTestGen11, GivenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblocking) { - givenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblockingImpl(); -} - -GEN11TEST_F(CommandStreamReceiverHwTestGen11, whenProgrammingMiSemaphoreWaitThenSetRegisterPollModeMemoryPoll) { - using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT; - MI_SEMAPHORE_WAIT miSemaphoreWait = FamilyType::cmdInitMiSemaphoreWait; - EXPECT_EQ(MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_MEMORY_POLL, miSemaphoreWait.getRegisterPollMode()); -} - -GEN11TEST_F(CommandStreamReceiverHwTestGen11, givenCommandStreamReceiverWhenGetClearColorAllocationIsCalledThenNothingHappens) { - MockCsrHw commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - commandStreamReceiver.getClearColorAllocation(); - EXPECT_EQ(nullptr, commandStreamReceiver.clearColorAllocation); -} diff --git a/opencl/test/unit_test/gen11/ehl/CMakeLists.txt b/opencl/test/unit_test/gen11/ehl/CMakeLists.txt deleted file mode 100644 index 0e0a67cabc..0000000000 --- a/opencl/test/unit_test/gen11/ehl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_EHL) - set(IGDRCL_SRCS_tests_gen11_ehl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_ehl.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen11/ehl/linux/CMakeLists.txt b/opencl/test/unit_test/gen11/ehl/linux/CMakeLists.txt deleted file mode 100644 index e7298ed023..0000000000 --- a/opencl/test/unit_test/gen11/ehl/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen11/ehl/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen11/ehl/linux/dll/CMakeLists.txt deleted file mode 100644 index e42c44d406..0000000000 --- a/opencl/test/unit_test/gen11/ehl/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2019-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen11_ehl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_ehl.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen11_ehl}) diff --git a/opencl/test/unit_test/gen11/ehl/linux/dll/device_id_tests_ehl.cpp b/opencl/test/unit_test/gen11/ehl/linux/dll/device_id_tests_ehl.cpp deleted file mode 100644 index ef8d814036..0000000000 --- a/opencl/test/unit_test/gen11/ehl/linux/dll/device_id_tests_ehl.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenEhlSpportedDeviceIdWhenCheckingHwSetupThenItIsCorrect) { - std::array expectedDescriptors = {{ - {0x4500, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4541, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4551, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4571, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4555, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4E51, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4E61, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4E71, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - {0x4E55, &EhlHwConfig::hwInfo, &EhlHwConfig::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp b/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp deleted file mode 100644 index 1cfa0806c8..0000000000 --- a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using EhlTest = Test; - -EHLTEST_F(EhlTest, givenEhlWhenSlmSizeIsRequiredThenReturnCorrectValue) { - EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); -} diff --git a/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp b/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp deleted file mode 100644 index 6e86280154..0000000000 --- a/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/helpers/static_size3.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/helpers/cl_hw_parse.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -namespace NEO { - -using Gen11EnqueueTest = Test; - -GEN11TEST_F(Gen11EnqueueTest, givenKernelRequiringIndependentForwardProgressWhenKernelIsSubmittedThenRoundRobinPolicyIsProgrammed) { - MockContext mc; - CommandQueueHw cmdQ{&mc, pClDevice, 0, false}; - - SPatchExecutionEnvironment sPatchExecEnv = {}; - sPatchExecEnv.SubgroupIndependentForwardProgressRequired = true; - MockKernelWithInternals mockKernel(*pClDevice, sPatchExecEnv); - - cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr); - - ClHardwareParse hwParser; - hwParser.parseCommands(cmdQ); - - auto cmd = findMmioCmd(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address); - ASSERT_NE(nullptr, cmd); - EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[ThreadArbitrationPolicy::RoundRobin], cmd->getDataDword()); - EXPECT_EQ(1U, countMmio(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address)); -} - -GEN11TEST_F(Gen11EnqueueTest, givenKernelNotRequiringIndependentForwardProgressWhenKernelIsSubmittedThenDefaultPolicyIsProgrammed) { - auto &gfxCoreHelper = getHelper(); - MockContext mc; - CommandQueueHw cmdQ{&mc, pClDevice, 0, false}; - - SPatchExecutionEnvironment sPatchExecEnv = {}; - sPatchExecEnv.SubgroupIndependentForwardProgressRequired = false; - MockKernelWithInternals mockKernel(*pClDevice, sPatchExecEnv); - - cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr); - - ClHardwareParse hwParser; - hwParser.parseCommands(cmdQ); - - auto cmd = findMmioCmd(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address); - ASSERT_NE(nullptr, cmd); - EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[gfxCoreHelper.getDefaultThreadArbitrationPolicy()], cmd->getDataDword()); - EXPECT_EQ(1U, countMmio(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address)); -} - -} // namespace NEO diff --git a/opencl/test/unit_test/gen11/enqueue_media_kernel_gen11.cpp b/opencl/test/unit_test/gen11/enqueue_media_kernel_gen11.cpp deleted file mode 100644 index 341c5c9aaf..0000000000 --- a/opencl/test/unit_test/gen11/enqueue_media_kernel_gen11.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/pipeline_select_helper.h" -#include "shared/source/helpers/preamble.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/media_kernel_fixture.h" - -using namespace NEO; -typedef MediaKernelFixture MediaKernelTest; -auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | - pipelineSelectMediaSamplerDopClockGateMaskBits | - pipelineSelectMediaSamplerPowerClockGateMaskBits; - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueBlockedVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - - cl_uint workDim = 1; - size_t globalWorkOffset[3] = {0, 0, 0}; - size_t globalWorkSize[3] = {1, 1, 1}; - - UserEvent userEvent(context); - cl_event blockedEvent = &userEvent; - - auto retVal = pCmdQ->enqueueKernel( - pVmeKernel, - workDim, - globalWorkOffset, - globalWorkSize, - nullptr, - 1, - &blockedEvent, - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - userEvent.setStatus(CL_COMPLETE); - - parseCommands(*pCmdQ); - ASSERT_NE(cmdPipelineSelect, nullptr); - auto *pCmd = genCmdCast(cmdPipelineSelect); - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueBlockedNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - - cl_uint workDim = 1; - size_t globalWorkOffset[3] = {0, 0, 0}; - size_t globalWorkSize[3] = {1, 1, 1}; - - UserEvent userEvent(context); - cl_event blockedEvent = &userEvent; - - auto retVal = pCmdQ->enqueueKernel( - pKernel, - workDim, - globalWorkOffset, - globalWorkSize, - nullptr, - 1, - &blockedEvent, - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - userEvent.setStatus(CL_COMPLETE); - - parseCommands(*pCmdQ); - ASSERT_NE(cmdPipelineSelect, nullptr); - auto *pCmd = genCmdCast(cmdPipelineSelect); - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); - - auto pCmd = getCommand(); - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); - EXPECT_EQ(1u, pCmd->getMediaSamplerPowerClockGateDisable()); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueRegularKernel(); - - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); - - auto pCmd = getCommand(); - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); - EXPECT_EQ(0u, pCmd->getMediaSamplerPowerClockGateDisable()); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueVmeKernelTwiceThenProgramPipelineSelectOnce) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueNonVmeKernelTwiceThenProgramPipelineSelectOnce) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueVmeKernelAfterNonVmeKernelThenProgramPipelineSelectionAndMediaSamplerTwice) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueRegularKernel(); - enqueueVmeKernel(); - - auto commands = getCommandsList(); - EXPECT_EQ(2u, commands.size()); - - auto pCmd = static_cast(commands.back()); - - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); - EXPECT_EQ(1u, pCmd->getMediaSamplerPowerClockGateDisable()); -} - -GEN11TEST_F(MediaKernelTest, givenGen11CsrWhenEnqueueNonVmeKernelAfterVmeKernelThenProgramProgramPipelineSelectionAndMediaSamplerTwice) { - typedef typename Gen11Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - enqueueRegularKernel(); - - auto commands = getCommandsList(); - EXPECT_EQ(2u, commands.size()); - - auto pCmd = static_cast(commands.back()); - - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); - EXPECT_EQ(0u, pCmd->getMediaSamplerPowerClockGateDisable()); -} diff --git a/opencl/test/unit_test/gen11/icllp/CMakeLists.txt b/opencl/test/unit_test/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 8d441e000a..0000000000 --- a/opencl/test/unit_test/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ICLLP) - set(IGDRCL_SRCS_tests_gen11_icllp - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_media_kernel_icllp.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_icllp}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen11/icllp/linux/CMakeLists.txt b/opencl/test/unit_test/gen11/icllp/linux/CMakeLists.txt deleted file mode 100644 index e7298ed023..0000000000 --- a/opencl/test/unit_test/gen11/icllp/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen11/icllp/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen11/icllp/linux/dll/CMakeLists.txt deleted file mode 100644 index cbabba3b24..0000000000 --- a/opencl/test/unit_test/gen11/icllp/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen11_icllp - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_icllp.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen11_icllp}) diff --git a/opencl/test/unit_test/gen11/icllp/linux/dll/device_id_tests_icllp.cpp b/opencl/test/unit_test/gen11/icllp/linux/dll/device_id_tests_icllp.cpp deleted file mode 100644 index 1cd1f86cf6..0000000000 --- a/opencl/test/unit_test/gen11/icllp/linux/dll/device_id_tests_icllp.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenIcllpSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0xFF05, &IcllpHw1x4x8::hwInfo, &IcllpHw1x4x8::setupHardwareInfo}, - {0x8A56, &IcllpHw1x4x8::hwInfo, &IcllpHw1x4x8::setupHardwareInfo}, - {0x8A58, &IcllpHw1x4x8::hwInfo, &IcllpHw1x4x8::setupHardwareInfo}, - - {0x8A5C, &IcllpHw1x6x8::hwInfo, &IcllpHw1x6x8::setupHardwareInfo}, - {0x8A5A, &IcllpHw1x6x8::hwInfo, &IcllpHw1x6x8::setupHardwareInfo}, - - {0x8A50, &IcllpHw1x8x8::hwInfo, &IcllpHw1x8x8::setupHardwareInfo}, - {0x8A52, &IcllpHw1x8x8::hwInfo, &IcllpHw1x8x8::setupHardwareInfo}, - {0x8A51, &IcllpHw1x8x8::hwInfo, &IcllpHw1x8x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp b/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp deleted file mode 100644 index 704c7e15c1..0000000000 --- a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -using IcllpTest = Test; - -ICLLPTEST_F(IcllpTest, givenIcllpWhenSlmSizeIsRequiredThenReturnCorrectValue) { - EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); -} - -ICLLPTEST_F(IcllpTest, givenIclLpWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} - -ICLLPTEST_F(IcllpTest, WhenGettingPlatformFamilyThenIcelakeIsReported) { - EXPECT_EQ(IGFX_ICELAKE_LP, pDevice->getHardwareInfo().platform.eProductFamily); -} - -ICLLPTEST_F(IcllpTest, WhenCheckingExtensionStringThenFp64IsNotSupported) { - const auto &caps = pClDevice->getDeviceInfo(); - std::string extensionString = caps.deviceExtensions; - - EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); - EXPECT_EQ(0u, caps.doubleFpConfig); -} - -ICLLPTEST_F(IcllpTest, WhenCheckingCapsThenCorrectlyRoundedDivideSqrtIsNotSupported) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_EQ(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT); -} - -ICLLPTEST_F(IcllpTest, GivenICLLPWhenCheckftr64KBpagesThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} diff --git a/opencl/test/unit_test/gen11/icllp/test_media_kernel_icllp.cpp b/opencl/test/unit_test/gen11/icllp/test_media_kernel_icllp.cpp deleted file mode 100644 index 9b63c59e2a..0000000000 --- a/opencl/test/unit_test/gen11/icllp/test_media_kernel_icllp.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/pipeline_select_helper.h" -#include "shared/source/helpers/preamble.h" -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/media_kernel_fixture.h" - -using namespace NEO; -typedef MediaKernelFixture MediaKernelTest; - -ICLLPTEST_F(MediaKernelTest, givenIcllpDefaultThenLastVmeSubsliceConfigIsFalse) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, givenIcllpCSRWhenEnqueueVmeKernelThenVmeSubslicesConfigChangesToTrue) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - enqueueVmeKernel(); - EXPECT_TRUE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, givenIcllpCSRWhenEnqueueRegularKernelAfterVmeKernelThenVmeSubslicesConfigChangesToFalse) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - enqueueVmeKernel(); - enqueueRegularKernel(); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, givenIcllpCSRWhenEnqueueRegularKernelThenVmeSubslicesConfigDoesntChangeToTrue) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - enqueueRegularKernel(); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, givenIcllpCSRWhenEnqueueRegularKernelAfterRegularKernelThenVmeSubslicesConfigDoesntChangeToTrue) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - enqueueRegularKernel(); - enqueueRegularKernel(); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, givenIcllpCSRWhenEnqueueVmeKernelAfterRegularKernelThenVmeSubslicesConfigChangesToTrue) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - enqueueRegularKernel(); - enqueueVmeKernel(); - EXPECT_TRUE(csr->lastVmeSubslicesConfig); -} - -ICLLPTEST_F(MediaKernelTest, WhenProgrammingVmeThenCmdSizeIsCorrect) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL; - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - size_t programVmeCmdSize = sizeof(MI_LOAD_REGISTER_IMM) + 2 * sizeof(PIPE_CONTROL); - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false)); - EXPECT_EQ(programVmeCmdSize, csr->getCmdSizeForMediaSampler(true)); -} diff --git a/opencl/test/unit_test/gen11/image_tests_gen11.cpp b/opencl/test/unit_test/gen11/image_tests_gen11.cpp deleted file mode 100644 index 488bbdeeff..0000000000 --- a/opencl/test/unit_test/gen11/image_tests_gen11.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/image/image_surface_state.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/mem_obj/image.h" -#include "opencl/test/unit_test/fixtures/image_fixture.h" -#include "opencl/test/unit_test/mocks/mock_context.h" - -using namespace NEO; - -typedef Gen11Family::RENDER_SURFACE_STATE RENDER_SURFACE_STATE; - -struct AppendSurfaceStateParamsTest : public ::testing::Test { - void SetUp() override { - surfaceState = Gen11Family::cmdInitRenderSurfaceState; - EXPECT_EQ(RENDER_SURFACE_STATE::SAMPLE_TAP_DISCARD_DISABLE_DISABLE, surfaceState.getSampleTapDiscardDisable()); - - imageDesc.image_width = 32; - imageDesc.image_height = 0; - imageDesc.image_depth = 0; - imageDesc.image_array_size = 1; - imageDesc.image_row_pitch = 0; - imageDesc.image_slice_pitch = 0; - imageDesc.num_mip_levels = 0; - imageDesc.num_samples = 0; - imageDesc.mem_object = NULL; - imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D; - - flags = CL_MEM_READ_WRITE; - } - - void createImage() { - auto surfaceFormat = Image::getSurfaceFormatFromTable( - flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features); - EXPECT_NE(nullptr, surfaceFormat); - image.reset(Image::create( - &context, ClMemoryPropertiesHelper::createMemoryProperties(flags, 0, 0, &context.getDevice(0)->getDevice()), - flags, 0, surfaceFormat, &imageDesc, nullptr, retVal)); - } - - cl_int retVal = CL_SUCCESS; - MockContext context; - std::unique_ptr image; - cl_image_format imageFormat; - cl_image_desc imageDesc; - cl_mem_flags flags; - RENDER_SURFACE_STATE surfaceState; -}; - -GEN11TEST_F(AppendSurfaceStateParamsTest, givenImageFormatWithoutAlphaChannelWhenAppendSurfaceStateParamsThenTapDiscardConfigDoesntChange) { - imageFormat.image_channel_data_type = CL_FLOAT; - imageFormat.image_channel_order = CL_R; - createImage(); - - auto imageHw = static_cast *>(image.get()); - imageHw->appendSurfaceStateParams(&surfaceState, context.getDevice(0)->getRootDeviceIndex()); - - bool tapDiscardConfigChanged = RENDER_SURFACE_STATE::SAMPLE_TAP_DISCARD_DISABLE_DISABLE != surfaceState.getSampleTapDiscardDisable(); - EXPECT_FALSE(tapDiscardConfigChanged); -} - -GEN11TEST_F(AppendSurfaceStateParamsTest, givenImageFormatWithAlphaChannelWhenAppendSurfaceStateParamsThenTapDiscardConfigChanges) { - imageFormat.image_channel_data_type = CL_FLOAT; - imageFormat.image_channel_order = CL_RGBA; - createImage(); - - auto imageHw = static_cast *>(image.get()); - imageHw->appendSurfaceStateParams(&surfaceState, context.getDevice(0)->getRootDeviceIndex()); - - bool tapDiscardConfigChanged = RENDER_SURFACE_STATE::SAMPLE_TAP_DISCARD_DISABLE_DISABLE != surfaceState.getSampleTapDiscardDisable(); - EXPECT_TRUE(tapDiscardConfigChanged); -} - -typedef ::testing::Test gen11ImageTests; - -GEN11TEST_F(gen11ImageTests, givenImageForGen11WhenClearColorParametersAreSetThenSurfaceStateIsNotModified) { - typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE; - MockContext context; - auto image = std::unique_ptr(ImageHelper::create(&context)); - auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState; - auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState; - auto imageHw = static_cast *>(image.get()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); - - EncodeSurfaceState::setClearColorParams(&surfaceStateAfter, imageHw->getGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex())->getDefaultGmm()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); -} diff --git a/opencl/test/unit_test/gen11/kernel_tests_gen11.cpp b/opencl/test/unit_test/gen11/kernel_tests_gen11.cpp deleted file mode 100644 index f55bfe287b..0000000000 --- a/opencl/test/unit_test/gen11/kernel_tests_gen11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -using namespace NEO; - -using Gen11KernelTest = Test; -GEN11TEST_F(Gen11KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsTrue) { - MockKernelWithInternals mockKernel(*pClDevice); - auto retVal = mockKernel.mockKernel->Kernel::canTransformImages(); - EXPECT_TRUE(retVal); -} - -GEN11TEST_F(Gen11KernelTest, givenBuiltinKernelWhenCanTransformImagesIsCalledThenReturnsFalse) { - MockKernelWithInternals mockKernel(*pClDevice); - mockKernel.mockKernel->isBuiltIn = true; - auto retVal = mockKernel.mockKernel->Kernel::canTransformImages(); - EXPECT_FALSE(retVal); -} - -GEN11TEST_F(Gen11KernelTest, GivenKernelWhenNotRunningOnGen12lpThenWaDisableRccRhwoOptimizationIsNotRequired) { - MockKernelWithInternals kernel(*pClDevice); - EXPECT_FALSE(kernel.mockKernel->requiresWaDisableRccRhwoOptimization()); -} diff --git a/opencl/test/unit_test/gen11/lkf/CMakeLists.txt b/opencl/test/unit_test/gen11/lkf/CMakeLists.txt deleted file mode 100644 index ae6b05cb86..0000000000 --- a/opencl/test/unit_test/gen11/lkf/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_LKF) - set(IGDRCL_SRCS_tests_gen11_lkf - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_lkf.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_lkf}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen11/lkf/linux/CMakeLists.txt b/opencl/test/unit_test/gen11/lkf/linux/CMakeLists.txt deleted file mode 100644 index e7298ed023..0000000000 --- a/opencl/test/unit_test/gen11/lkf/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen11/lkf/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen11/lkf/linux/dll/CMakeLists.txt deleted file mode 100644 index 994fd0ccb8..0000000000 --- a/opencl/test/unit_test/gen11/lkf/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen11_lkf - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_lkf.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen11_lkf}) diff --git a/opencl/test/unit_test/gen11/lkf/linux/dll/device_id_tests_lkf.cpp b/opencl/test/unit_test/gen11/lkf/linux/dll/device_id_tests_lkf.cpp deleted file mode 100644 index fd68495ed4..0000000000 --- a/opencl/test/unit_test/gen11/lkf/linux/dll/device_id_tests_lkf.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenLkfSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x9840, &LkfHw1x8x8::hwInfo, &LkfHw1x8x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp b/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp deleted file mode 100644 index e4df83788f..0000000000 --- a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -using LkfTest = Test; - -LKFTEST_F(LkfTest, givenLkfWhenSlmSizeIsRequiredThenReturnCorrectValue) { - EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); -} - -LKFTEST_F(LkfTest, givenLkfWhenCheckedSvmSupportThenNoSvmIsReported) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_EQ(caps.svmCapabilities, 0u); -} - -LKFTEST_F(LkfTest, givenLkfWhenDoublePrecissionIsCheckedThenFalseIsReturned) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupports64BitMath); -} - -LKFTEST_F(LkfTest, givenLkfWhenExtensionStringIsCheckedThenFP64IsNotReported) { - const auto &caps = pClDevice->getDeviceInfo(); - std::string extensionString = caps.deviceExtensions; - - EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); - EXPECT_EQ(0u, caps.doubleFpConfig); -} diff --git a/opencl/test/unit_test/gen11/test_cl_device_caps_gen11.cpp b/opencl/test/unit_test/gen11/test_cl_device_caps_gen11.cpp deleted file mode 100644 index 22d1f4ce58..0000000000 --- a/opencl/test/unit_test/gen11/test_cl_device_caps_gen11.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -using Gen11ClDeviceCaps = Test; - -GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported) { - const auto &caps = pClDevice->getDeviceInfo(); - - EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_local_block_io"))); -} - -GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) { - const auto &caps = pClDevice->getDeviceInfo(); - - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } else { - EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } -} - -GEN11TEST_F(Gen11ClDeviceCaps, givenGen11WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) { - const auto &caps = pClDevice->getDeviceInfo(); - - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(caps.independentForwardProgress != 0); - } else { - EXPECT_FALSE(caps.independentForwardProgress != 0); - } -} diff --git a/opencl/test/unit_test/gen11/test_platform_caps_gen11.cpp b/opencl/test/unit_test/gen11/test_platform_caps_gen11.cpp deleted file mode 100644 index 7a5fb8e83b..0000000000 --- a/opencl/test/unit_test/gen11/test_platform_caps_gen11.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/platform/platform_info.h" -#include "opencl/test/unit_test/fixtures/platform_fixture.h" - -using namespace NEO; - -struct Gen11PlatformCaps : public PlatformFixture, public ::testing::Test { - void SetUp() override { - PlatformFixture::setUp(); - } - - void TearDown() override { - PlatformFixture::tearDown(); - } -}; - -GEN11TEST_F(Gen11PlatformCaps, WhenCheckingExtensionStringThenFp64IsNotSupported) { - const auto &caps = pPlatform->getPlatformInfo(); - - EXPECT_EQ(std::string::npos, caps.extensions.find(std::string("cl_khr_fp64"))); -} diff --git a/opencl/test/unit_test/gen8/CMakeLists.txt b/opencl/test/unit_test/gen8/CMakeLists.txt deleted file mode 100644 index 52ee1ee838..0000000000 --- a/opencl/test/unit_test/gen8/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2018-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - set(IGDRCL_SRCS_tests_gen8 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cl_gfx_core_helper_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen8.cpp - ) - - get_property(NEO_CORE_TESTS_GEN8 GLOBAL PROPERTY NEO_CORE_TESTS_GEN8) - list(APPEND IGDRCL_SRCS_tests_gen8 ${NEO_CORE_TESTS_GEN8}) - - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen8}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen8/bdw/CMakeLists.txt b/opencl/test/unit_test/gen8/bdw/CMakeLists.txt deleted file mode 100644 index 3a2803a211..0000000000 --- a/opencl/test/unit_test/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen8/bdw/linux/CMakeLists.txt b/opencl/test/unit_test/gen8/bdw/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen8/bdw/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen8/bdw/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen8/bdw/linux/dll/CMakeLists.txt deleted file mode 100644 index 28aad5dea9..0000000000 --- a/opencl/test/unit_test/gen8/bdw/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen8_bdw - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_bdw.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen8_bdw}) diff --git a/opencl/test/unit_test/gen8/bdw/linux/dll/device_id_tests_bdw.cpp b/opencl/test/unit_test/gen8/bdw/linux/dll/device_id_tests_bdw.cpp deleted file mode 100644 index 452c175aa2..0000000000 --- a/opencl/test/unit_test/gen8/bdw/linux/dll/device_id_tests_bdw.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenBdwSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x1602, &BdwHw1x2x6::hwInfo, &BdwHw1x2x6::setupHardwareInfo}, - {0x160A, &BdwHw1x2x6::hwInfo, &BdwHw1x2x6::setupHardwareInfo}, - {0x1606, &BdwHw1x2x6::hwInfo, &BdwHw1x2x6::setupHardwareInfo}, - {0x160E, &BdwHw1x2x6::hwInfo, &BdwHw1x2x6::setupHardwareInfo}, - {0x160D, &BdwHw1x2x6::hwInfo, &BdwHw1x2x6::setupHardwareInfo}, - - {0x1612, &BdwHw1x3x8::hwInfo, &BdwHw1x3x8::setupHardwareInfo}, - {0x161A, &BdwHw1x3x8::hwInfo, &BdwHw1x3x8::setupHardwareInfo}, - {0x1616, &BdwHw1x3x8::hwInfo, &BdwHw1x3x8::setupHardwareInfo}, - {0x161E, &BdwHw1x3x8::hwInfo, &BdwHw1x3x8::setupHardwareInfo}, - {0x161D, &BdwHw1x3x8::hwInfo, &BdwHw1x3x8::setupHardwareInfo}, - - {0x1622, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - {0x162A, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - {0x1626, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - {0x162B, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - {0x162E, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - {0x162D, &BdwHw2x3x8::hwInfo, &BdwHw2x3x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen8/cl_gfx_core_helper_tests_gen8.cpp b/opencl/test/unit_test/gen8/cl_gfx_core_helper_tests_gen8.cpp deleted file mode 100644 index 2801c47a28..0000000000 --- a/opencl/test/unit_test/gen8/cl_gfx_core_helper_tests_gen8.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/helpers/cl_gfx_core_helper.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_gfx_core_helper.h" - -using namespace NEO; -using ClGfxCoreHelperTestGen8 = Test; - -GEN8TEST_F(ClGfxCoreHelperTestGen8, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) { - auto &clGfxCoreHelper = getHelper(); - EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment())); -} diff --git a/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp b/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp deleted file mode 100644 index 23e458b626..0000000000 --- a/opencl/test/unit_test/gen8/command_stream_receiver_hw_tests_gen8.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/mocks/mock_csr.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_command_queue.h" -#include "opencl/test/unit_test/mocks/mock_context.h" -#include "opencl/test/unit_test/mocks/mock_event.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -#include "gtest/gtest.h" - -using namespace NEO; - -#include "opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests.inl" - -using CommandStreamReceiverHwTestGen8 = CommandStreamReceiverHwTest; - -GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3Config) { - givenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigImpl(); -} - -GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentOnThenProgramL3WithSLML3ConfigAfterUnblocking) { - givenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblockingImpl(); -} - -GEN8TEST_F(CommandStreamReceiverHwTestGen8, GivenChangedL3ConfigWhenL3IsProgrammedThenClearSLMWorkAroundIsAdded) { - MockCsrHw2 csr(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - csr.csrSizeRequestFlags.l3ConfigChanged = true; - csr.isPreambleSent = true; - - size_t bufferSize = 2 * sizeof(typename FamilyType::MI_LOAD_REGISTER_IMM) + sizeof(typename FamilyType::PIPE_CONTROL); - void *buffer = alignedMalloc(bufferSize, 64); - - LinearStream stream(buffer, bufferSize); - - uint32_t l3Config = 0x12345678; - - csr.programL3(stream, l3Config, false); - - this->parseCommands(stream); - - typename FamilyType::PIPE_CONTROL *pc = getCommand(); - ASSERT_NE(nullptr, pc); - EXPECT_TRUE(pc->getProtectedMemoryDisable() != 0); - - typename FamilyType::MI_LOAD_REGISTER_IMM *lri = getCommand(); - ASSERT_NE(nullptr, lri); - EXPECT_EQ(l3Config, lri->getDataDword()); - - alignedFree(buffer); -} diff --git a/opencl/test/unit_test/gen8/enqueue_media_kernel_gen8.cpp b/opencl/test/unit_test/gen8/enqueue_media_kernel_gen8.cpp deleted file mode 100644 index dc97150c0b..0000000000 --- a/opencl/test/unit_test/gen8/enqueue_media_kernel_gen8.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/media_kernel_fixture.h" - -using namespace NEO; - -typedef MediaKernelFixture MediaKernelTest; - -GEN8TEST_F(MediaKernelTest, givenGen8CSRWhenEnqueueVmeKernelThenProgramOnlyPipelineSelection) { - typedef typename Gen8Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - auto pCmd = getCommand(); - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits; - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); -} - -GEN8TEST_F(MediaKernelTest, givenGen8CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToFalse) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - csr->lastVmeSubslicesConfig = true; - enqueueVmeKernel(); - EXPECT_TRUE(csr->lastVmeSubslicesConfig); -} - -GEN8TEST_F(MediaKernelTest, givenGen8CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToTrue) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - csr->lastVmeSubslicesConfig = false; - enqueueVmeKernel(); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -GEN8TEST_F(MediaKernelTest, GivenGen8WhenGettingCmdSizeForMediaSamplerThenZeroIsReturned) { - auto csr = static_cast *>(&pDevice->getGpgpuCommandStreamReceiver()); - - csr->lastVmeSubslicesConfig = false; - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false)); - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true)); - - csr->lastVmeSubslicesConfig = true; - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false)); - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true)); -} diff --git a/opencl/test/unit_test/gen8/image_tests_gen8.cpp b/opencl/test/unit_test/gen8/image_tests_gen8.cpp deleted file mode 100644 index b21560cd11..0000000000 --- a/opencl/test/unit_test/gen8/image_tests_gen8.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/image_fixture.h" -#include "opencl/test/unit_test/mocks/mock_context.h" - -using namespace NEO; - -typedef ::testing::Test gen8ImageTests; - -GEN8TEST_F(gen8ImageTests, WhenAppendingSurfaceStateParamsThenSurfaceStateDoesNotChange) { - typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE; - MockContext context; - auto image = std::unique_ptr(ImageHelper::create(&context)); - auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState; - auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState; - auto imageHw = static_cast *>(image.get()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); - - imageHw->appendSurfaceStateParams(&surfaceStateAfter, context.getDevice(0)->getRootDeviceIndex()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); -} diff --git a/opencl/test/unit_test/gen8/kernel_tests_gen8.cpp b/opencl/test/unit_test/gen8/kernel_tests_gen8.cpp deleted file mode 100644 index 5d02c033a0..0000000000 --- a/opencl/test/unit_test/gen8/kernel_tests_gen8.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -using namespace NEO; - -using Gen8KernelTest = Test; -GEN8TEST_F(Gen8KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsFalse) { - MockKernelWithInternals mockKernel(*pClDevice); - auto retVal = mockKernel.mockKernel->Kernel::canTransformImages(); - EXPECT_FALSE(retVal); -} diff --git a/opencl/test/unit_test/gen8/test_cl_device_caps_gen8.cpp b/opencl/test/unit_test/gen8/test_cl_device_caps_gen8.cpp deleted file mode 100644 index 52651a9f0b..0000000000 --- a/opencl/test/unit_test/gen8/test_cl_device_caps_gen8.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -using Gen8ClDeviceCaps = Test; - -GEN8TEST_F(Gen8ClDeviceCaps, WhenCheckingExtensionStringThenFp64IsSupported) { - const auto &caps = pClDevice->getDeviceInfo(); - std::string extensionString = caps.deviceExtensions; - - EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); - EXPECT_NE(0u, caps.doubleFpConfig); -} - -GEN8TEST_F(Gen8ClDeviceCaps, WhenGettingDeviceInfoThenCorrectlyRoundedDivideSqrtIsEnabled) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_NE(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT); -} - -GEN8TEST_F(Gen8ClDeviceCaps, givenGen8WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) { - const auto &caps = pClDevice->getDeviceInfo(); - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } else { - EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } -} - -GEN8TEST_F(Gen8ClDeviceCaps, givenGen8WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) { - const auto &caps = pClDevice->getDeviceInfo(); - - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(caps.independentForwardProgress != 0); - } else { - EXPECT_FALSE(caps.independentForwardProgress != 0); - } -} - -GEN8TEST_F(Gen8ClDeviceCaps, WhenCheckingImage3dDimensionsThenCapsAreSetCorrectly) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_EQ(2048u, caps.image3DMaxWidth); - EXPECT_EQ(2048u, caps.image3DMaxHeight); -} diff --git a/opencl/test/unit_test/gen8/test_platform_caps_gen8.cpp b/opencl/test/unit_test/gen8/test_platform_caps_gen8.cpp deleted file mode 100644 index a4ab6d77b7..0000000000 --- a/opencl/test/unit_test/gen8/test_platform_caps_gen8.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/platform/platform_info.h" -#include "opencl/test/unit_test/fixtures/platform_fixture.h" - -using namespace NEO; - -using Gen8PlatformCaps = Test; - -GEN8TEST_F(Gen8PlatformCaps, WhenCheckingExtensionStringThenFp64IsSupported) { - const auto &caps = pPlatform->getPlatformInfo(); - - EXPECT_NE(std::string::npos, caps.extensions.find(std::string("cl_khr_fp64"))); -} diff --git a/opencl/test/unit_test/gen8/test_preemption_gen8.cpp b/opencl/test/unit_test/gen8/test_preemption_gen8.cpp deleted file mode 100644 index 1335a33df8..0000000000 --- a/opencl/test/unit_test/gen8/test_preemption_gen8.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/mocks/mock_command_stream_receiver.h" - -#include "opencl/source/event/user_event.h" -#include "opencl/source/helpers/cl_preemption_helper.h" -#include "opencl/source/helpers/dispatch_info.h" -#include "opencl/test/unit_test/fixtures/cl_preemption_fixture.h" - -using namespace NEO; - -using Gen8PreemptionEnqueueKernelTest = PreemptionEnqueueKernelTest; -using Gen8ClPreemptionTests = DevicePreemptionTests; - -GEN8TEST_F(Gen8ClPreemptionTests, GivenEmptyFlagsWhenSettingPreemptionLevelFlagsThenThreadGroupPreemptionIsAllowed) { - PreemptionFlags flags = PreemptionHelper::createPreemptionLevelFlags(device->getDevice(), &kernel->getDescriptor()); - EXPECT_TRUE(PreemptionHelper::allowThreadGroupPreemption(flags)); -} - -GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogram) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - auto &csr = pDevice->getUltCommandStreamReceiver(); - csr.getMemoryManager()->setForce32BitAllocations(false); - csr.setMediaVFEStateDirty(false); - size_t off[3] = {0, 0, 0}; - size_t gws[3] = {1, 1, 1}; - - MockKernelWithInternals mockKernel(*pClDevice); - - HardwareParse hwParser; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwParser.parseCommands(csr.commandStream); - auto offset = csr.commandStream.getUsed(); - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - hwParser.parseCommands(csr.commandStream, offset); - - size_t numMmiosFound = countMmio(hwParser.cmdList.begin(), hwParser.cmdList.end(), 0x2248u); - EXPECT_EQ(1U, numMmiosFound); -} - -GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionMode) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - PreemptionFlags flags = {}; - MultiDispatchInfo multiDispatch(mockKernel.mockKernel); - EXPECT_EQ(PreemptionMode::ThreadGroup, ClPreemptionHelper::taskPreemptionMode(*pDevice, multiDispatch)); - - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode); -} - -GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionMode) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - PreemptionFlags flags = PreemptionHelper::createPreemptionLevelFlags(*pDevice, &mockKernel.mockKernel->getDescriptor()); - EXPECT_EQ(PreemptionMode::ThreadGroup, PreemptionHelper::taskPreemptionMode(pDevice->getPreemptionMode(), flags)); - - UserEvent userEventObj; - cl_event userEvent = &userEventObj; - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 1, &userEvent, nullptr); - pCmdQ->flush(); - EXPECT_EQ(0u, mockCsr->flushCalledCount); - - userEventObj.setStatus(CL_COMPLETE); - pCmdQ->flush(); - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode); -} - -GEN8TEST_F(Gen8PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) { - pDevice->setPreemptionMode(PreemptionMode::Disabled); - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - PreemptionFlags flags = PreemptionHelper::createPreemptionLevelFlags(*pDevice, &mockKernel.mockKernel->getDescriptor()); - EXPECT_EQ(PreemptionMode::Disabled, PreemptionHelper::taskPreemptionMode(pDevice->getPreemptionMode(), flags)); - - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::Disabled, mockCsr->passedDispatchFlags.preemptionMode); -} diff --git a/opencl/test/unit_test/gen9/CMakeLists.txt b/opencl/test/unit_test/gen9/CMakeLists.txt deleted file mode 100644 index e0db621310..0000000000 --- a/opencl/test/unit_test/gen9/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2018-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - set(IGDRCL_SRCS_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cl_get_platform_ids_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cl_gfx_core_helper_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp - ) - - get_property(NEO_CORE_TESTS_GEN9 GLOBAL PROPERTY NEO_CORE_TESTS_GEN9) - list(APPEND IGDRCL_SRCS_tests_gen9 ${NEO_CORE_TESTS_GEN9}) - - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/bxt/CMakeLists.txt b/opencl/test/unit_test/gen9/bxt/CMakeLists.txt deleted file mode 100644 index 1c61761b1e..0000000000 --- a/opencl/test/unit_test/gen9/bxt/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BXT) - set(IGDRCL_SRCS_tests_gen9_bxt - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_bxt.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/bxt/linux/CMakeLists.txt b/opencl/test/unit_test/gen9/bxt/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen9/bxt/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen9/bxt/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen9/bxt/linux/dll/CMakeLists.txt deleted file mode 100644 index d350f8f239..0000000000 --- a/opencl/test/unit_test/gen9/bxt/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen9_bxt - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_bxt}) diff --git a/opencl/test/unit_test/gen9/bxt/linux/dll/device_id_tests.cpp b/opencl/test/unit_test/gen9/bxt/linux/dll/device_id_tests.cpp deleted file mode 100644 index 18b68f4582..0000000000 --- a/opencl/test/unit_test/gen9/bxt/linux/dll/device_id_tests.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenBxtSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x9906, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - {0x9907, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - {0x0A84, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - {0x5A84, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - {0x5A85, &BxtHw1x2x6::hwInfo, &BxtHw1x2x6::setupHardwareInfo}, - {0x1A85, &BxtHw1x2x6::hwInfo, &BxtHw1x2x6::setupHardwareInfo}, - {0x1A84, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - {0x9908, &BxtHw1x3x6::hwInfo, &BxtHw1x3x6::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp deleted file mode 100644 index f5497a632c..0000000000 --- a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/memory_manager/memory_manager.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -typedef Test BxtDeviceCaps; - -BXTTEST_F(BxtDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { - const auto &caps = pDevice->getDeviceInfo(); - EXPECT_EQ(52u, caps.outProfilingTimerResolution); -} - -BXTTEST_F(BxtDeviceCaps, givenBxtDeviceWhenAskedFor32BitSupportThenCorrectValuesAreReturned) { - const auto &sharedCaps = pDevice->getDeviceInfo(); - auto memoryManager = pDevice->getMemoryManager(); - if constexpr (is64bit) { - EXPECT_TRUE(memoryManager->peekForce32BitAllocations()); - EXPECT_TRUE(sharedCaps.force32BitAddressess); - } else { - EXPECT_FALSE(memoryManager->peekForce32BitAllocations()); - EXPECT_FALSE(sharedCaps.force32BitAddressess); - } -} - -BXTTEST_F(BxtDeviceCaps, WhenCheckingCapabilitiesThenSvmIsNotSupported) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_EQ(0u, caps.svmCapabilities); -} - -BXTTEST_F(BxtDeviceCaps, WhenCheckftr64KBpagesThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} - -BXTTEST_F(BxtDeviceCaps, WhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} diff --git a/opencl/test/unit_test/gen9/bxt/windows/CMakeLists.txt b/opencl/test/unit_test/gen9/bxt/windows/CMakeLists.txt deleted file mode 100644 index 4c20198b84..0000000000 --- a/opencl/test/unit_test/gen9/bxt/windows/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_tests_gen9_bxt_windows - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_bxt_windows.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt_windows}) -endif() diff --git a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp deleted file mode 100644 index 9a03086f8d..0000000000 --- a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test BxtDeviceCapsWindows; - -BXTTEST_F(BxtDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} diff --git a/opencl/test/unit_test/gen9/cfl/CMakeLists.txt b/opencl/test/unit_test/gen9/cfl/CMakeLists.txt deleted file mode 100644 index 06b01bf8c2..0000000000 --- a/opencl/test/unit_test/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_CFL) - set(IGDRCL_SRCS_tests_gen9_cfl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_cfl.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/cfl/linux/CMakeLists.txt b/opencl/test/unit_test/gen9/cfl/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen9/cfl/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen9/cfl/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen9/cfl/linux/dll/CMakeLists.txt deleted file mode 100644 index 1d73aa9056..0000000000 --- a/opencl/test/unit_test/gen9/cfl/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen9_cfl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_cfl.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_cfl}) diff --git a/opencl/test/unit_test/gen9/cfl/linux/dll/device_id_tests_cfl.cpp b/opencl/test/unit_test/gen9/cfl/linux/dll/device_id_tests_cfl.cpp deleted file mode 100644 index dd4a2d5ba0..0000000000 --- a/opencl/test/unit_test/gen9/cfl/linux/dll/device_id_tests_cfl.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenCflSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x3E90, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x3E93, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x3EA4, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x3E99, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x3EA1, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - - {0x3E92, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E9B, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E94, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E91, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E96, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E9A, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3EA3, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3EA9, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3EA0, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x3E98, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - - {0x3E95, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - {0x3EA6, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - {0x3EA7, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - {0x3EA8, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - {0x3EA5, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - {0x3EA2, &CflHw2x3x8::hwInfo, &CflHw2x3x8::setupHardwareInfo}, - - {0x9B21, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BAA, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BAB, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BAC, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BA0, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BA5, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BA8, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BA4, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9BA2, &CflHw1x2x6::hwInfo, &CflHw1x2x6::setupHardwareInfo}, - {0x9B41, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BCA, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BCB, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BCC, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC0, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC5, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC8, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC4, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC2, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BC6, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BE6, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - {0x9BF6, &CflHw1x3x8::hwInfo, &CflHw1x3x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp b/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp deleted file mode 100644 index 64c175f747..0000000000 --- a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test CflDeviceCaps; - -CFLTEST_F(CflDeviceCaps, GivenCFLWhenCheckftr64KBpagesThenTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} - -CFLTEST_F(CflDeviceCaps, givenCflWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} diff --git a/opencl/test/unit_test/gen9/cfl/windows/CMakeLists.txt b/opencl/test/unit_test/gen9/cfl/windows/CMakeLists.txt deleted file mode 100644 index 0f27af77ad..0000000000 --- a/opencl/test/unit_test/gen9/cfl/windows/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_tests_gen9_cfl_windows - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_cfl_windows.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl_windows}) -endif() diff --git a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp deleted file mode 100644 index 061326e60b..0000000000 --- a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test CflDeviceCapsWindows; - -CFLTEST_F(CflDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} diff --git a/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp b/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp deleted file mode 100644 index d88779cf3d..0000000000 --- a/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/device/root_device.h" -#include "shared/source/os_interface/device_factory.h" -#include "shared/source/os_interface/product_helper.h" - -#include "opencl/source/platform/platform.h" -#include "opencl/test/unit_test/api/cl_api_tests.h" - -using namespace NEO; - -using ClGetPlatformIDsTests = ApiTests; - -TEST(clGetPlatformIDsMultiPlatformTest, whenCreateDevicesWithDifferentProductFamilyThenClGetPlatformIdsCreatesMultiplePlatformsProperlySorted) { - - if ((ProductHelper::create(IGFX_SKYLAKE) == nullptr) || (ProductHelper::create(IGFX_KABYLAKE) == nullptr)) { - GTEST_SKIP(); - } - DebugManagerStateRestore restorer; - const size_t numRootDevices = 2u; - debugManager.flags.CreateMultipleRootDevices.set(numRootDevices); - VariableBackup createFuncBackup{&DeviceFactory::createRootDeviceFunc}; - DeviceFactory::createRootDeviceFunc = [](ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) -> std::unique_ptr { - auto device = std::unique_ptr(Device::create(&executionEnvironment, rootDeviceIndex)); - auto hwInfo = device->getRootDeviceEnvironment().getMutableHardwareInfo(); - if (rootDeviceIndex == 0) { - hwInfo->platform.eProductFamily = IGFX_SKYLAKE; - } else { - hwInfo->platform.eProductFamily = IGFX_KABYLAKE; - } - return device; - }; - platformsImpl->clear(); - - cl_int retVal = CL_SUCCESS; - cl_platform_id platformsRet[2]; - cl_uint numPlatforms = 0; - - retVal = clGetPlatformIDs(0, nullptr, &numPlatforms); - EXPECT_EQ(2u, numPlatforms); - EXPECT_EQ(CL_SUCCESS, retVal); - - numPlatforms = 0u; - retVal = clGetPlatformIDs(2u, platformsRet, &numPlatforms); - EXPECT_EQ(2u, numPlatforms); - EXPECT_EQ(CL_SUCCESS, retVal); - - EXPECT_NE(nullptr, platformsRet[0]); - auto platform0 = castToObject(platformsRet[0]); - EXPECT_EQ(1u, platform0->getNumDevices()); - EXPECT_EQ(IGFX_KABYLAKE, platform0->getClDevice(0)->getHardwareInfo().platform.eProductFamily); - EXPECT_EQ(1u, platform0->getClDevice(0)->getRootDeviceIndex()); - - EXPECT_NE(nullptr, platformsRet[1]); - auto platform1 = castToObject(platformsRet[1]); - EXPECT_EQ(1u, platform1->getNumDevices()); - EXPECT_EQ(IGFX_SKYLAKE, platform1->getClDevice(0)->getHardwareInfo().platform.eProductFamily); - EXPECT_EQ(0u, platform1->getClDevice(0)->getRootDeviceIndex()); - platformsImpl->clear(); -} diff --git a/opencl/test/unit_test/gen9/cl_gfx_core_helper_tests_gen9.cpp b/opencl/test/unit_test/gen9/cl_gfx_core_helper_tests_gen9.cpp deleted file mode 100644 index 9a657bdca8..0000000000 --- a/opencl/test/unit_test/gen9/cl_gfx_core_helper_tests_gen9.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_gfx_core_helper.h" - -using ClGfxCoreHelperTestGen9 = Test; - -GEN9TEST_F(ClGfxCoreHelperTestGen9, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) { - auto &clGfxCoreHelper = getHelper(); - EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment())); -} diff --git a/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp b/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp deleted file mode 100644 index 97e700c582..0000000000 --- a/opencl/test/unit_test/gen9/command_stream_receiver_hw_tests_gen9.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/mocks/mock_csr.h" -#include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/event/user_event.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h" -#include "opencl/test/unit_test/mocks/mock_command_queue.h" -#include "opencl/test/unit_test/mocks/mock_context.h" -#include "opencl/test/unit_test/mocks/mock_event.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -#include "gtest/gtest.h" -using namespace NEO; - -#include "opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests.inl" - -using CommandStreamReceiverHwTestGen9 = CommandStreamReceiverHwTest; - -GEN9TEST_F(UltCommandStreamReceiverTest, whenPreambleIsProgrammedThenStateSipCmdIsNotPresentInPreambleCmdStream) { - using STATE_SIP = typename FamilyType::STATE_SIP; - auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); - commandStreamReceiver.isPreambleSent = false; - - pDevice->setPreemptionMode(PreemptionMode::Disabled); - pDevice->executionEnvironment->rootDeviceEnvironments[0]->initDebuggerL0(pDevice); - uint32_t newL3Config; - - auto cmdSizePreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*pDevice); - StackVec preambleBuffer; - preambleBuffer.resize(cmdSizePreamble); - - LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); - - commandStreamReceiver.programPreamble(preambleStream, *pDevice, newL3Config); - - this->parseCommands(preambleStream); - auto itorStateSip = find(this->cmdList.begin(), this->cmdList.end()); - EXPECT_EQ(this->cmdList.end(), itorStateSip); -} - -GEN9TEST_F(CommandStreamReceiverHwTestGen9, GivenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3Config) { - givenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigImpl(); -} - -GEN9TEST_F(CommandStreamReceiverHwTestGen9, GivenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentOnThenProgramL3WithSLML3ConfigAfterUnblocking) { - givenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblockingImpl(); -} diff --git a/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp b/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp deleted file mode 100644 index 9183b73d68..0000000000 --- a/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gen9/reg_configs.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/fixtures/memory_management_fixture.h" -#include "shared/test/common/helpers/static_size3.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/helpers/cl_hw_parse.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -namespace NEO { - -using Gen9EnqueueTest = Test; -GEN9TEST_F(Gen9EnqueueTest, givenKernelRequiringIndependentForwardProgressWhenKernelIsSubmittedThenRoundRobinPolicyIsProgrammed) { - MockContext mc; - CommandQueueHw cmdQ{&mc, pClDevice, 0, false}; - - SPatchExecutionEnvironment sPatchExecEnv = {}; - sPatchExecEnv.SubgroupIndependentForwardProgressRequired = true; - MockKernelWithInternals mockKernel(*pClDevice, sPatchExecEnv); - - cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr); - - ClHardwareParse hwParser; - hwParser.parseCommands(cmdQ); - - auto cmd = findMmioCmd(hwParser.cmdList.begin(), hwParser.cmdList.end(), DebugControlReg2::address); - ASSERT_NE(nullptr, cmd); - EXPECT_EQ(DebugControlReg2::getRegData(ThreadArbitrationPolicy::RoundRobin), cmd->getDataDword()); - EXPECT_EQ(1U, countMmio(hwParser.cmdList.begin(), hwParser.cmdList.end(), DebugControlReg2::address)); -} - -GEN9TEST_F(Gen9EnqueueTest, givenKernelNotRequiringIndependentForwardProgressWhenKernelIsSubmittedThenDefaultPolicyIsProgrammed) { - auto &gfxCoreHelper = getHelper(); - MockContext mc; - CommandQueueHw cmdQ{&mc, pClDevice, 0, false}; - - SPatchExecutionEnvironment sPatchExecEnv = {}; - sPatchExecEnv.SubgroupIndependentForwardProgressRequired = false; - MockKernelWithInternals mockKernel(*pClDevice, sPatchExecEnv); - - cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr); - - ClHardwareParse hwParser; - hwParser.parseCommands(cmdQ); - - auto cmd = findMmioCmd(hwParser.cmdList.begin(), hwParser.cmdList.end(), DebugControlReg2::address); - ASSERT_NE(nullptr, cmd); - EXPECT_EQ(DebugControlReg2::getRegData(gfxCoreHelper.getDefaultThreadArbitrationPolicy()), cmd->getDataDword()); - EXPECT_EQ(1U, countMmio(hwParser.cmdList.begin(), hwParser.cmdList.end(), DebugControlReg2::address)); -} -} // namespace NEO diff --git a/opencl/test/unit_test/gen9/enqueue_media_kernel_gen9.cpp b/opencl/test/unit_test/gen9/enqueue_media_kernel_gen9.cpp deleted file mode 100644 index d6733f5b20..0000000000 --- a/opencl/test/unit_test/gen9/enqueue_media_kernel_gen9.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/preamble.h" -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/media_kernel_fixture.h" - -using namespace NEO; -typedef MediaKernelFixture MediaKernelTest; - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueBlockedVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - - cl_uint workDim = 1; - size_t globalWorkOffset[3] = {0, 0, 0}; - size_t globalWorkSize[3] = {1, 1, 1}; - - UserEvent userEvent(context); - cl_event blockedEvent = &userEvent; - - auto retVal = pCmdQ->enqueueKernel( - pVmeKernel, - workDim, - globalWorkOffset, - globalWorkSize, - nullptr, - 1, - &blockedEvent, - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - userEvent.setStatus(CL_COMPLETE); - - parseCommands(*pCmdQ); - ASSERT_NE(cmdPipelineSelect, nullptr); - auto *pCmd = genCmdCast(cmdPipelineSelect); - - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueBlockedNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - - cl_uint workDim = 1; - size_t globalWorkOffset[3] = {0, 0, 0}; - size_t globalWorkSize[3] = {1, 1, 1}; - - UserEvent userEvent(context); - cl_event blockedEvent = &userEvent; - - auto retVal = pCmdQ->enqueueKernel( - pKernel, - workDim, - globalWorkOffset, - globalWorkSize, - nullptr, - 1, - &blockedEvent, - nullptr); - ASSERT_EQ(CL_SUCCESS, retVal); - - userEvent.setStatus(CL_COMPLETE); - - parseCommands(*pCmdQ); - ASSERT_NE(cmdPipelineSelect, nullptr); - auto *pCmd = genCmdCast(cmdPipelineSelect); - - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); - - auto pCmd = getCommand(); - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueRegularKernel(); - - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); - - auto pCmd = getCommand(); - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueVmeKernelTwiceThenProgramPipelineSelectOnce) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueNonVmeKernelTwiceThenProgramPipelineSelectOnce) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - auto numCommands = getCommandsList().size(); - EXPECT_EQ(1u, numCommands); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueVmeKernelAfterNonVmeKernelThenProgramPipelineSelectionAndMediaSamplerTwice) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueRegularKernel(); - enqueueVmeKernel(); - - auto commands = getCommandsList(); - EXPECT_EQ(2u, commands.size()); - - auto pCmd = static_cast(commands.back()); - - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueNonVmeKernelAfterVmeKernelThenProgramProgramPipelineSelectionAndMediaSamplerTwice) { - typedef typename Gen9Family::PIPELINE_SELECT PIPELINE_SELECT; - enqueueVmeKernel(); - enqueueRegularKernel(); - - auto commands = getCommandsList(); - EXPECT_EQ(2u, commands.size()); - - auto pCmd = static_cast(commands.back()); - - auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - EXPECT_EQ(expectedMask, pCmd->getMaskBits()); - EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable()); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToFalse) { - auto csr = static_cast *>(&pCmdQ->getGpgpuCommandStreamReceiver()); - csr->lastVmeSubslicesConfig = true; - enqueueVmeKernel(); - EXPECT_TRUE(csr->lastVmeSubslicesConfig); -} - -GEN9TEST_F(MediaKernelTest, givenGen9CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToTrue) { - auto csr = static_cast *>(&pCmdQ->getGpgpuCommandStreamReceiver()); - csr->lastVmeSubslicesConfig = false; - enqueueVmeKernel(); - EXPECT_FALSE(csr->lastVmeSubslicesConfig); -} - -GEN9TEST_F(MediaKernelTest, GivenGen9WhenGettingCmdSizeForMediaSamplerThenZeroIsReturned) { - auto csr = static_cast *>(&pCmdQ->getGpgpuCommandStreamReceiver()); - - csr->lastVmeSubslicesConfig = false; - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false)); - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true)); - - csr->lastVmeSubslicesConfig = true; - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false)); - EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true)); -} diff --git a/opencl/test/unit_test/gen9/glk/CMakeLists.txt b/opencl/test/unit_test/gen9/glk/CMakeLists.txt deleted file mode 100644 index 004271605c..0000000000 --- a/opencl/test/unit_test/gen9/glk/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GLK) - set(IGDRCL_SRCS_tests_gen9_glk - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_glk.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/glk/linux/CMakeLists.txt b/opencl/test/unit_test/gen9/glk/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen9/glk/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen9/glk/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen9/glk/linux/dll/CMakeLists.txt deleted file mode 100644 index 9ece9e941d..0000000000 --- a/opencl/test/unit_test/gen9/glk/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen9_glk - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_glk.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_glk}) diff --git a/opencl/test/unit_test/gen9/glk/linux/dll/device_id_tests_glk.cpp b/opencl/test/unit_test/gen9/glk/linux/dll/device_id_tests_glk.cpp deleted file mode 100644 index acefda10e7..0000000000 --- a/opencl/test/unit_test/gen9/glk/linux/dll/device_id_tests_glk.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenGlkSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x3184, &GlkHw1x3x6::hwInfo, &GlkHw1x3x6::setupHardwareInfo}, - {0x3185, &GlkHw1x2x6::hwInfo, &GlkHw1x2x6::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp deleted file mode 100644 index fdf523ec6a..0000000000 --- a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/memory_manager/memory_manager.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using GlkDeviceCaps = Test; - -GLKTEST_F(GlkDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { - const auto &caps = pDevice->getDeviceInfo(); - EXPECT_EQ(52u, caps.outProfilingTimerResolution); -} - -GLKTEST_F(GlkDeviceCaps, givenGlkDeviceWhenAskedForDoubleSupportThenTrueIsReturned) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64); -} - -GLKTEST_F(GlkDeviceCaps, GlkIs32BitOsAllocatorAvailable) { - const auto &caps = pDevice->getDeviceInfo(); - auto memoryManager = pDevice->getMemoryManager(); - if constexpr (is64bit) { - EXPECT_TRUE(memoryManager->peekForce32BitAllocations()); - EXPECT_TRUE(caps.force32BitAddressess); - } else { - EXPECT_FALSE(memoryManager->peekForce32BitAllocations()); - EXPECT_FALSE(caps.force32BitAddressess); - } -} - -GLKTEST_F(GlkDeviceCaps, GivenGLKWhenCheckftr64KBpagesThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} - -GLKTEST_F(GlkDeviceCaps, givenGlkWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} diff --git a/opencl/test/unit_test/gen9/glk/windows/CMakeLists.txt b/opencl/test/unit_test/gen9/glk/windows/CMakeLists.txt deleted file mode 100644 index 3dbab9a951..0000000000 --- a/opencl/test/unit_test/gen9/glk/windows/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_tests_gen9_glk_windows - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_glk_windows.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk_windows}) -endif() diff --git a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp deleted file mode 100644 index 132e5365d7..0000000000 --- a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test GlkDeviceCapsWindows; - -GLKTEST_F(GlkDeviceCapsWindows, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEnabledCorrectly) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(30000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} diff --git a/opencl/test/unit_test/gen9/image_tests_gen9.cpp b/opencl/test/unit_test/gen9/image_tests_gen9.cpp deleted file mode 100644 index 2ac6e76b80..0000000000 --- a/opencl/test/unit_test/gen9/image_tests_gen9.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/image_fixture.h" -#include "opencl/test/unit_test/mocks/mock_context.h" - -using namespace NEO; - -typedef ::testing::Test gen9ImageTests; - -GEN9TEST_F(gen9ImageTests, appendSurfaceSWhenAppendingSurfaceStateParamsThenSurfaceStateDoesNotChangetateParamsDoesNothing) { - typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE; - MockContext context; - auto image = std::unique_ptr(ImageHelper::create(&context)); - auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState; - auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState; - auto imageHw = static_cast *>(image.get()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); - - imageHw->appendSurfaceStateParams(&surfaceStateAfter, context.getDevice(0)->getRootDeviceIndex()); - - EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); -} diff --git a/opencl/test/unit_test/gen9/kbl/CMakeLists.txt b/opencl/test/unit_test/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 91f389947e..0000000000 --- a/opencl/test/unit_test/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_KBL) - set(IGDRCL_SRCS_tests_gen9_kbl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_kbl.cpp - ) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/kbl/linux/CMakeLists.txt b/opencl/test/unit_test/gen9/kbl/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen9/kbl/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen9/kbl/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen9/kbl/linux/dll/CMakeLists.txt deleted file mode 100644 index 98d8bb6c79..0000000000 --- a/opencl/test/unit_test/gen9/kbl/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen9_kbl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_kbl.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_kbl}) diff --git a/opencl/test/unit_test/gen9/kbl/linux/dll/device_id_tests_kbl.cpp b/opencl/test/unit_test/gen9/kbl/linux/dll/device_id_tests_kbl.cpp deleted file mode 100644 index 423bc9f860..0000000000 --- a/opencl/test/unit_test/gen9/kbl/linux/dll/device_id_tests_kbl.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenKblSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x5902, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - {0x590B, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - {0x590A, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - {0x5906, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - {0x590E, &KblHw1x3x6::hwInfo, &KblHw1x3x6::setupHardwareInfo}, - {0x5908, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - - {0x5913, &KblHw1x3x6::hwInfo, &KblHw1x3x6::setupHardwareInfo}, - {0x5915, &KblHw1x2x6::hwInfo, &KblHw1x2x6::setupHardwareInfo}, - - {0x5912, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x591B, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x5917, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x591A, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x5916, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x591E, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x591D, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x591C, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - {0x5921, &KblHw1x3x8::hwInfo, &KblHw1x3x8::setupHardwareInfo}, - - {0x5926, &KblHw2x3x8::hwInfo, &KblHw2x3x8::setupHardwareInfo}, - {0x5927, &KblHw2x3x8::hwInfo, &KblHw2x3x8::setupHardwareInfo}, - {0x592B, &KblHw2x3x8::hwInfo, &KblHw2x3x8::setupHardwareInfo}, - {0x592A, &KblHw2x3x8::hwInfo, &KblHw2x3x8::setupHardwareInfo}, - {0x5923, &KblHw2x3x8::hwInfo, &KblHw2x3x8::setupHardwareInfo}, - - {0x5932, &KblHw3x3x8::hwInfo, &KblHw3x3x8::setupHardwareInfo}, - {0x593B, &KblHw3x3x8::hwInfo, &KblHw3x3x8::setupHardwareInfo}, - {0x593A, &KblHw3x3x8::hwInfo, &KblHw3x3x8::setupHardwareInfo}, - {0x593D, &KblHw3x3x8::hwInfo, &KblHw3x3x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp b/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp deleted file mode 100644 index 8baecc9255..0000000000 --- a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test KblDeviceCaps; - -KBLTEST_F(KblDeviceCaps, GivenKBLWhenCheckftr64KBpagesThenTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} - -KBLTEST_F(KblDeviceCaps, givenKblWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} diff --git a/opencl/test/unit_test/gen9/kbl/windows/CMakeLists.txt b/opencl/test/unit_test/gen9/kbl/windows/CMakeLists.txt deleted file mode 100644 index 13a63d1561..0000000000 --- a/opencl/test/unit_test/gen9/kbl/windows/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_tests_gen9_kbl_windows - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_kbl_windows.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl_windows}) -endif() diff --git a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp deleted file mode 100644 index 11a99f76f2..0000000000 --- a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/hw_test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test KblDeviceCapsWindows; - -KBLTEST_F(KblDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} diff --git a/opencl/test/unit_test/gen9/kernel_tests_gen9.cpp b/opencl/test/unit_test/gen9/kernel_tests_gen9.cpp deleted file mode 100644 index ad577f9734..0000000000 --- a/opencl/test/unit_test/gen9/kernel_tests_gen9.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/source/mem_obj/buffer.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -using namespace NEO; - -using Gen9KernelTest = Test; -GEN9TEST_F(Gen9KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsTrue) { - MockKernelWithInternals mockKernel(*pClDevice); - auto retVal = mockKernel.mockKernel->Kernel::canTransformImages(); - EXPECT_TRUE(retVal); -} -GEN9TEST_F(Gen9KernelTest, givenBuiltinKernelWhenCanTransformImagesIsCalledThenReturnsFalse) { - MockKernelWithInternals mockKernel(*pClDevice); - mockKernel.mockKernel->isBuiltIn = true; - auto retVal = mockKernel.mockKernel->Kernel::canTransformImages(); - EXPECT_FALSE(retVal); -} diff --git a/opencl/test/unit_test/gen9/skl/CMakeLists.txt b/opencl/test/unit_test/gen9/skl/CMakeLists.txt deleted file mode 100644 index 0de150f04e..0000000000 --- a/opencl/test/unit_test/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(IGDRCL_SRCS_tests_gen9_skl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl.cpp - ) - - get_property(NEO_CORE_TESTS_GEN9_SKL GLOBAL PROPERTY NEO_CORE_TESTS_GEN9_SKL) - list(APPEND IGDRCL_SRCS_tests_gen9_skl ${NEO_CORE_TESTS_GEN9_SKL}) - - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl}) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/gen9/skl/linux/CMakeLists.txt b/opencl/test/unit_test/gen9/skl/linux/CMakeLists.txt deleted file mode 100644 index 7417b567ec..0000000000 --- a/opencl/test/unit_test/gen9/skl/linux/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - add_subdirectory(dll) -endif() diff --git a/opencl/test/unit_test/gen9/skl/linux/dll/CMakeLists.txt b/opencl/test/unit_test/gen9/skl/linux/dll/CMakeLists.txt deleted file mode 100644 index 70dfad6319..0000000000 --- a/opencl/test/unit_test/gen9/skl/linux/dll/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_linux_dll_tests_gen9_skl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_skl.cpp -) -target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen9_skl}) diff --git a/opencl/test/unit_test/gen9/skl/linux/dll/device_id_tests_skl.cpp b/opencl/test/unit_test/gen9/skl/linux/dll/device_id_tests_skl.cpp deleted file mode 100644 index fe3ee856fa..0000000000 --- a/opencl/test/unit_test/gen9/skl/linux/dll/device_id_tests_skl.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/linux/device_id_fixture.h" - -using namespace NEO; - -TEST_F(DeviceIdTests, GivenSklSupportedDeviceIdThenHardwareInfoIsCorrect) { - std::array expectedDescriptors = {{ - {0x1902, &SklHw1x2x6::hwInfo, &SklHw1x2x6::setupHardwareInfo}, - {0x190B, &SklHw1x2x6::hwInfo, &SklHw1x2x6::setupHardwareInfo}, - {0x190A, &SklHw1x2x6::hwInfo, &SklHw1x2x6::setupHardwareInfo}, - {0x1906, &SklHw1x2x6::hwInfo, &SklHw1x2x6::setupHardwareInfo}, - {0x190E, &SklHw1x2x6::hwInfo, &SklHw1x2x6::setupHardwareInfo}, - - {0x1917, &SklHw1x3x6::hwInfo, &SklHw1x3x6::setupHardwareInfo}, - {0x1913, &SklHw1x3x6::hwInfo, &SklHw1x3x6::setupHardwareInfo}, - {0x1915, &SklHw1x3x6::hwInfo, &SklHw1x3x6::setupHardwareInfo}, - - {0x1912, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x191B, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x191A, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x1916, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x191E, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x191D, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x1921, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - {0x9905, &SklHw1x3x8::hwInfo, &SklHw1x3x8::setupHardwareInfo}, - - {0x192B, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - {0x192D, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - {0x192A, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - {0x1923, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - {0x1926, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - {0x1927, &SklHw2x3x8::hwInfo, &SklHw2x3x8::setupHardwareInfo}, - - {0x1932, &SklHw3x3x8::hwInfo, &SklHw3x3x8::setupHardwareInfo}, - {0x193B, &SklHw3x3x8::hwInfo, &SklHw3x3x8::setupHardwareInfo}, - {0x193A, &SklHw3x3x8::hwInfo, &SklHw3x3x8::setupHardwareInfo}, - {0x193D, &SklHw3x3x8::hwInfo, &SklHw3x3x8::setupHardwareInfo}, - }}; - - testImpl(expectedDescriptors); -} diff --git a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp b/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp deleted file mode 100644 index e34280e76b..0000000000 --- a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/memory_manager/memory_manager.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -typedef Test SklDeviceCaps; - -SKLTEST_F(SklDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { - const auto &caps = pDevice->getDeviceInfo(); - EXPECT_EQ(83u, caps.outProfilingTimerResolution); -} - -SKLTEST_F(SklDeviceCaps, givenSklDeviceWhenAskedFor32BitSupportThenFalseIsReturned) { - const auto &sharedCaps = pDevice->getDeviceInfo(); - auto memoryManager = pDevice->getMemoryManager(); - EXPECT_FALSE(memoryManager->peekForce32BitAllocations()); - EXPECT_FALSE(sharedCaps.force32BitAddressess); -} - -SKLTEST_F(SklDeviceCaps, WhenCheckingCapabilitiesThenSvmIsEnabled) { - const auto &caps = pClDevice->getDeviceInfo(); - cl_device_svm_capabilities expectedCaps = (CL_DEVICE_SVM_COARSE_GRAIN_BUFFER | - CL_DEVICE_SVM_FINE_GRAIN_BUFFER | - CL_DEVICE_SVM_ATOMICS); - EXPECT_EQ(expectedCaps, caps.svmCapabilities); -} - -SKLTEST_F(SklDeviceCaps, GivenSKLWhenCheckftr64KBpagesThenTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); -} - -SKLTEST_F(SklDeviceCaps, givenSklWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} diff --git a/opencl/test/unit_test/gen9/skl/windows/CMakeLists.txt b/opencl/test/unit_test/gen9/skl/windows/CMakeLists.txt deleted file mode 100644 index 403161b8ef..0000000000 --- a/opencl/test/unit_test/gen9/skl/windows/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018-2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -set(IGDRCL_SRCS_tests_gen9_skl_windows - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl_windows.cpp -) - -if(WIN32) - target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl_windows}) -endif() diff --git a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp deleted file mode 100644 index 8d23bdee4b..0000000000 --- a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - -using namespace NEO; - -typedef Test SklDeviceCapsWindows; - -SKLTEST_F(SklDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} diff --git a/opencl/test/unit_test/gen9/test_cl_device_caps_gen9.cpp b/opencl/test/unit_test/gen9/test_cl_device_caps_gen9.cpp deleted file mode 100644 index fe8351c1ab..0000000000 --- a/opencl/test/unit_test/gen9/test_cl_device_caps_gen9.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" - -using namespace NEO; - -using Gen9ClDeviceCaps = Test; - -GEN9TEST_F(Gen9ClDeviceCaps, WhenCheckingExtensionStringThenFp64CorrectlyReported) { - const auto &caps = pClDevice->getDeviceInfo(); - std::string extensionString = caps.deviceExtensions; - if (pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64) { - EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); - EXPECT_NE(0u, caps.doubleFpConfig); - } else { - EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); - EXPECT_EQ(0u, caps.doubleFpConfig); - } -} - -GEN9TEST_F(Gen9ClDeviceCaps, givenGen9WhenCheckExtensionsThenDeviceProperlyReportsClKhrSubgroupsExtension) { - const auto &caps = pClDevice->getDeviceInfo(); - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } else { - EXPECT_FALSE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_subgroups"))); - } -} - -GEN9TEST_F(Gen9ClDeviceCaps, givenGen9WhenCheckingCapsThenDeviceDoesProperlyReportsIndependentForwardProgress) { - const auto &caps = pClDevice->getDeviceInfo(); - - if (pClDevice->areOcl21FeaturesEnabled()) { - EXPECT_TRUE(caps.independentForwardProgress != 0); - } else { - EXPECT_FALSE(caps.independentForwardProgress != 0); - } -} - -GEN9TEST_F(Gen9ClDeviceCaps, WhenGettingDeviceInfoThenCorrectlyRoundedDivideSqrtIsEnabled) { - const auto &caps = pClDevice->getDeviceInfo(); - EXPECT_NE(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT); -} diff --git a/opencl/test/unit_test/gen9/test_platform_caps_gen9.cpp b/opencl/test/unit_test/gen9/test_platform_caps_gen9.cpp deleted file mode 100644 index 3106a8100f..0000000000 --- a/opencl/test/unit_test/gen9/test_platform_caps_gen9.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/cl_device/cl_device.h" -#include "opencl/source/platform/platform_info.h" -#include "opencl/test/unit_test/fixtures/platform_fixture.h" - -using namespace NEO; - -struct Gen9PlatformCaps : public PlatformFixture, public ::testing::Test { - void SetUp() override { - PlatformFixture::setUp(); - } - - void TearDown() override { - PlatformFixture::tearDown(); - } -}; - -GEN9TEST_F(Gen9PlatformCaps, GivenPlatformWhenCheckingExtensionStringThenFp64SupportIsCorrectlyReported) { - const auto &caps = pPlatform->getPlatformInfo(); - if (pPlatform->getClDevice(0)->getHardwareInfo().capabilityTable.ftrSupportsFP64) { - EXPECT_NE(std::string::npos, caps.extensions.find(std::string("cl_khr_fp64"))); - } else { - EXPECT_EQ(std::string::npos, caps.extensions.find(std::string("cl_khr_fp64"))); - } -} diff --git a/opencl/test/unit_test/gen9/test_preemption_gen9.cpp b/opencl/test/unit_test/gen9/test_preemption_gen9.cpp deleted file mode 100644 index 89ac4fd7eb..0000000000 --- a/opencl/test/unit_test/gen9/test_preemption_gen9.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/mocks/mock_command_stream_receiver.h" - -#include "opencl/source/helpers/cl_preemption_helper.h" -#include "opencl/test/unit_test/command_queue/enqueue_fixture.h" -#include "opencl/test/unit_test/fixtures/cl_preemption_fixture.h" -#include "opencl/test/unit_test/mocks/mock_command_queue.h" - -namespace NEO { - -template <> -void HardwareParse::findCsrBaseAddress() { - typedef typename Gen9::GPGPU_CSR_BASE_ADDRESS GPGPU_CSR_BASE_ADDRESS; - itorGpgpuCsrBaseAddress = find(cmdList.begin(), itorWalker); - if (itorGpgpuCsrBaseAddress != itorWalker) { - cmdGpgpuCsrBaseAddress = *itorGpgpuCsrBaseAddress; - } -} -} // namespace NEO - -using namespace NEO; - -using Gen9PreemptionEnqueueKernelTest = PreemptionEnqueueKernelTest; -using Gen9MidThreadPreemptionEnqueueKernelTest = MidThreadPreemptionEnqueueKernelTest; -using Gen9ThreadGroupPreemptionEnqueueKernelTest = ThreadGroupPreemptionEnqueueKernelTest; - -GEN9TEST_F(Gen9ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramThreadGroupNoWa) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - - pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - auto &csr = pDevice->getUltCommandStreamReceiver(); - csr.getMemoryManager()->setForce32BitAllocations(false); - csr.setMediaVFEStateDirty(false); - auto csrSurface = csr.getPreemptionAllocation(); - EXPECT_EQ(nullptr, csrSurface); - size_t off[3] = {0, 0, 0}; - size_t gws[3] = {1, 1, 1}; - - MockKernelWithInternals mockKernel(*pClDevice); - - HardwareParse hwParserCsr; - HardwareParse hwParserCmdQ; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwParserCsr.parseCommands(csr.commandStream); - hwParserCmdQ.parseCommands(pCmdQ->getCS(1024)); - auto offsetCsr = csr.commandStream.getUsed(); - auto offsetCmdQ = pCmdQ->getCS(1024).getUsed(); - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - hwParserCsr.parseCommands(csr.commandStream, offsetCsr); - hwParserCmdQ.parseCommands(pCmdQ->getCS(1024), offsetCmdQ); - - EXPECT_EQ(1U, countMmio(hwParserCsr.cmdList.begin(), hwParserCsr.cmdList.end(), 0x2580u)); - EXPECT_EQ(0U, countMmio(hwParserCsr.cmdList.begin(), hwParserCsr.cmdList.end(), 0x2600u)); - EXPECT_EQ(0U, countMmio(hwParserCmdQ.cmdList.begin(), hwParserCmdQ.cmdList.end(), 0x2580u)); - EXPECT_EQ(0U, countMmio(hwParserCmdQ.cmdList.begin(), hwParserCmdQ.cmdList.end(), 0x2600u)); -} - -GEN9TEST_F(Gen9ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramThreadGroupWa) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - - pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - auto &csr = pDevice->getUltCommandStreamReceiver(); - csr.getMemoryManager()->setForce32BitAllocations(false); - csr.setMediaVFEStateDirty(false); - auto csrSurface = csr.getPreemptionAllocation(); - EXPECT_EQ(nullptr, csrSurface); - HardwareParse hwCsrParser; - HardwareParse hwCmdQParser; - size_t off[3] = {0, 0, 0}; - size_t gws[3] = {1, 1, 1}; - - MockKernelWithInternals mockKernel(*pClDevice); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream); - hwCsrParser.findHardwareCommands(); - hwCmdQParser.parseCommands(pCmdQ->getCS(1024)); - hwCmdQParser.findHardwareCommands(); - auto offsetCsr = csr.commandStream.getUsed(); - auto offsetCmdQ = pCmdQ->getCS(1024).getUsed(); - - bool foundOne = false; - for (auto it : hwCsrParser.lriList) { - auto cmd = genCmdCast(it); - if (cmd->getRegisterOffset() == 0x2580u) { - EXPECT_FALSE(foundOne); - foundOne = true; - } - } - EXPECT_TRUE(foundOne); - hwCsrParser.cmdList.clear(); - hwCsrParser.lriList.clear(); - - int foundWaLri = 0; - int foundWaLriBegin = 0; - int foundWaLriEnd = 0; - for (auto it : hwCmdQParser.lriList) { - auto cmd = genCmdCast(it); - if (cmd->getRegisterOffset() == 0x2600u) { - foundWaLri++; - if (cmd->getDataDword() == 0xFFFFFFFF) { - foundWaLriBegin++; - } - if (cmd->getDataDword() == 0x0) { - foundWaLriEnd++; - } - } - } - EXPECT_EQ(2, foundWaLri); - EXPECT_EQ(1, foundWaLriBegin); - EXPECT_EQ(1, foundWaLriEnd); - hwCmdQParser.cmdList.clear(); - hwCmdQParser.lriList.clear(); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream, offsetCsr); - hwCsrParser.findHardwareCommands(); - - hwCmdQParser.parseCommands(pCmdQ->getCS(1024), offsetCmdQ); - hwCmdQParser.findHardwareCommands(); - - for (auto it : hwCsrParser.lriList) { - auto cmd = genCmdCast(it); - EXPECT_FALSE(cmd->getRegisterOffset() == 0x2580u); - } - - foundWaLri = 0; - foundWaLriBegin = 0; - foundWaLriEnd = 0; - for (auto it : hwCmdQParser.lriList) { - auto cmd = genCmdCast(it); - if (cmd->getRegisterOffset() == 0x2600u) { - foundWaLri++; - if (cmd->getDataDword() == 0xFFFFFFFF) { - foundWaLriBegin++; - } - if (cmd->getDataDword() == 0x0) { - foundWaLriEnd++; - } - } - } - EXPECT_EQ(2, foundWaLri); - EXPECT_EQ(1, foundWaLriBegin); - EXPECT_EQ(1, foundWaLriEnd); -} - -GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionModeThreadGroup) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - MultiDispatchInfo multiDispatch(mockKernel.mockKernel); - EXPECT_EQ(PreemptionMode::ThreadGroup, ClPreemptionHelper::taskPreemptionMode(*pDevice, multiDispatch)); - - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode); -} - -GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionModeThreadGroup) { - pDevice->setPreemptionMode(PreemptionMode::ThreadGroup); - - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - MultiDispatchInfo multiDispatch(mockKernel.mockKernel); - EXPECT_EQ(PreemptionMode::ThreadGroup, ClPreemptionHelper::taskPreemptionMode(*pDevice, multiDispatch)); - - UserEvent userEventObj; - cl_event userEvent = &userEventObj; - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 1, &userEvent, nullptr); - pCmdQ->flush(); - EXPECT_EQ(0u, mockCsr->flushCalledCount); - - userEventObj.setStatus(CL_COMPLETE); - pCmdQ->flush(); - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode); -} - -GEN9TEST_F(Gen9MidThreadPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramMidThreadNoWa) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename FamilyType::GPGPU_CSR_BASE_ADDRESS GPGPU_CSR_BASE_ADDRESS; - - pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - - auto &csr = pDevice->getUltCommandStreamReceiver(); - csr.getMemoryManager()->setForce32BitAllocations(false); - csr.setMediaVFEStateDirty(false); - auto csrSurface = csr.getPreemptionAllocation(); - ASSERT_NE(nullptr, csrSurface); - HardwareParse hwCsrParser; - HardwareParse hwCmdQParser; - size_t off[3] = {0, 0, 0}; - size_t gws[3] = {1, 1, 1}; - - MockKernelWithInternals mockKernel(*pClDevice); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream); - hwCsrParser.findHardwareCommands(); - hwCmdQParser.parseCommands(pCmdQ->getCS(1024)); - hwCmdQParser.findHardwareCommands(); - auto offsetCsr = csr.commandStream.getUsed(); - auto offsetCmdQ = pCmdQ->getCS(1024).getUsed(); - - bool foundOneLri = false; - for (auto it : hwCsrParser.lriList) { - auto cmdLri = genCmdCast(it); - if (cmdLri->getRegisterOffset() == 0x2580u) { - EXPECT_FALSE(foundOneLri); - foundOneLri = true; - } - } - EXPECT_TRUE(foundOneLri); - - bool foundWaLri = false; - for (auto it : hwCmdQParser.lriList) { - auto cmdLri = genCmdCast(it); - if (cmdLri->getRegisterOffset() == 0x2600u) { - foundWaLri = true; - } - } - EXPECT_FALSE(foundWaLri); - - hwCsrParser.findCsrBaseAddress(); - ASSERT_NE(nullptr, hwCsrParser.cmdGpgpuCsrBaseAddress); - auto cmdCsr = genCmdCast(hwCsrParser.cmdGpgpuCsrBaseAddress); - ASSERT_NE(nullptr, cmdCsr); - EXPECT_EQ(csrSurface->getGpuAddressToPatch(), cmdCsr->getGpgpuCsrBaseAddress()); - - hwCsrParser.cmdList.clear(); - hwCsrParser.lriList.clear(); - hwCsrParser.cmdGpgpuCsrBaseAddress = nullptr; - hwCmdQParser.cmdList.clear(); - hwCmdQParser.lriList.clear(); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream, offsetCsr); - hwCsrParser.findHardwareCommands(); - hwCmdQParser.parseCommands(pCmdQ->getCS(1024), offsetCmdQ); - hwCmdQParser.findHardwareCommands(); - - for (auto it : hwCsrParser.lriList) { - auto cmd = genCmdCast(it); - EXPECT_FALSE(cmd->getRegisterOffset() == 0x2580u); - } - - hwCsrParser.findCsrBaseAddress(); - EXPECT_EQ(nullptr, hwCsrParser.cmdGpgpuCsrBaseAddress); - - for (auto it : hwCmdQParser.lriList) { - auto cmd = genCmdCast(it); - EXPECT_FALSE(cmd->getRegisterOffset() == 0x2600u); - } -} - -GEN9TEST_F(Gen9MidThreadPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramMidThreadWa) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename FamilyType::GPGPU_CSR_BASE_ADDRESS GPGPU_CSR_BASE_ADDRESS; - - pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - - auto &csr = pDevice->getUltCommandStreamReceiver(); - csr.getMemoryManager()->setForce32BitAllocations(false); - csr.setMediaVFEStateDirty(false); - auto csrSurface = csr.getPreemptionAllocation(); - ASSERT_NE(nullptr, csrSurface); - HardwareParse hwCsrParser; - HardwareParse hwCmdQParser; - size_t off[3] = {0, 0, 0}; - size_t gws[3] = {1, 1, 1}; - - MockKernelWithInternals mockKernel(*pClDevice); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream); - hwCsrParser.findHardwareCommands(); - hwCmdQParser.parseCommands(pCmdQ->getCS(1024)); - hwCmdQParser.findHardwareCommands(); - auto offsetCsr = csr.commandStream.getUsed(); - auto offsetCmdQ = pCmdQ->getCS(1024).getUsed(); - - bool foundOneLri = false; - for (auto it : hwCsrParser.lriList) { - auto cmdLri = genCmdCast(it); - if (cmdLri->getRegisterOffset() == 0x2580u) { - EXPECT_FALSE(foundOneLri); - foundOneLri = true; - } - } - EXPECT_TRUE(foundOneLri); - - int foundWaLri = 0; - int foundWaLriBegin = 0; - int foundWaLriEnd = 0; - for (auto it : hwCmdQParser.lriList) { - auto cmdLri = genCmdCast(it); - if (cmdLri->getRegisterOffset() == 0x2600u) { - foundWaLri++; - if (cmdLri->getDataDword() == 0xFFFFFFFF) { - foundWaLriBegin++; - } - if (cmdLri->getDataDword() == 0x0) { - foundWaLriEnd++; - } - } - } - EXPECT_EQ(2, foundWaLri); - EXPECT_EQ(1, foundWaLriBegin); - EXPECT_EQ(1, foundWaLriEnd); - - hwCsrParser.findCsrBaseAddress(); - ASSERT_NE(nullptr, hwCsrParser.cmdGpgpuCsrBaseAddress); - auto cmdCsr = genCmdCast(hwCsrParser.cmdGpgpuCsrBaseAddress); - ASSERT_NE(nullptr, cmdCsr); - EXPECT_EQ(csrSurface->getGpuAddressToPatch(), cmdCsr->getGpgpuCsrBaseAddress()); - - hwCsrParser.cmdList.clear(); - hwCsrParser.lriList.clear(); - hwCsrParser.cmdGpgpuCsrBaseAddress = nullptr; - hwCmdQParser.cmdList.clear(); - hwCmdQParser.lriList.clear(); - - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr); - hwCsrParser.parseCommands(csr.commandStream, offsetCsr); - hwCsrParser.findHardwareCommands(); - hwCmdQParser.parseCommands(pCmdQ->getCS(1024), offsetCmdQ); - hwCmdQParser.findHardwareCommands(); - - for (auto it : hwCsrParser.lriList) { - auto cmd = genCmdCast(it); - EXPECT_FALSE(cmd->getRegisterOffset() == 0x2580u); - } - - hwCsrParser.findCsrBaseAddress(); - EXPECT_EQ(nullptr, hwCsrParser.cmdGpgpuCsrBaseAddress); - - foundWaLri = 0; - foundWaLriBegin = 0; - foundWaLriEnd = 0; - for (auto it : hwCmdQParser.lriList) { - auto cmd = genCmdCast(it); - if (cmd->getRegisterOffset() == 0x2600u) { - foundWaLri++; - if (cmd->getDataDword() == 0xFFFFFFFF) { - foundWaLriBegin++; - } - if (cmd->getDataDword() == 0x0) { - foundWaLriEnd++; - } - } - } - EXPECT_EQ(2, foundWaLri); - EXPECT_EQ(1, foundWaLriBegin); - EXPECT_EQ(1, foundWaLriEnd); -} - -GEN9TEST_F(Gen9PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) { - pDevice->setPreemptionMode(PreemptionMode::Disabled); - - auto mockCsr = new MockCsrHw2(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); - pDevice->resetCommandStreamReceiver(mockCsr); - - MockKernelWithInternals mockKernel(*pClDevice); - MultiDispatchInfo multiDispatch(mockKernel.mockKernel); - EXPECT_EQ(PreemptionMode::Disabled, ClPreemptionHelper::taskPreemptionMode(*pDevice, multiDispatch)); - - size_t gws[3] = {1, 0, 0}; - pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - pCmdQ->flush(); - - EXPECT_EQ(1u, mockCsr->flushCalledCount); - EXPECT_EQ(PreemptionMode::Disabled, mockCsr->passedDispatchFlags.preemptionMode); -} diff --git a/opencl/test/unit_test/mt_tests/gen11/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen11/CMakeLists.txt deleted file mode 100644 index f0d6cef0f7..0000000000 --- a/opencl/test/unit_test/mt_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/mt_tests/gen11/icllp/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen11/icllp/CMakeLists.txt deleted file mode 100644 index d7269246b3..0000000000 --- a/opencl/test/unit_test/mt_tests/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ICLLP) - set(mt_test_config "icllp/1/8/8/0") - include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake) -endif() diff --git a/opencl/test/unit_test/mt_tests/gen8/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen8/CMakeLists.txt deleted file mode 100644 index 0265f5a14f..0000000000 --- a/opencl/test/unit_test/mt_tests/gen8/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/mt_tests/gen8/bdw/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen8/bdw/CMakeLists.txt deleted file mode 100644 index d1e786d20a..0000000000 --- a/opencl/test/unit_test/mt_tests/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - set(mt_test_config "bdw/1/3/8/0") - include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake) -endif() diff --git a/opencl/test/unit_test/mt_tests/gen9/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen9/CMakeLists.txt deleted file mode 100644 index ccdc6fabb6..0000000000 --- a/opencl/test/unit_test/mt_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/mt_tests/gen9/skl/CMakeLists.txt b/opencl/test/unit_test/mt_tests/gen9/skl/CMakeLists.txt deleted file mode 100644 index ab9b0e8bc9..0000000000 --- a/opencl/test/unit_test/mt_tests/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(mt_test_config "skl/1/3/8/9") - include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake) -endif() diff --git a/opencl/test/unit_test/offline_compiler/gen8/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/gen8/CMakeLists.txt deleted file mode 100644 index 5357cc856f..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen8/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - set(IGDRCL_SRCS_offline_compiler_tests_gen8 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ) - target_sources(ocloc_tests PRIVATE ${IGDRCL_SRCS_offline_compiler_tests_gen8}) - - add_subdirectories() - -endif() diff --git a/opencl/test/unit_test/offline_compiler/gen8/bdw/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/gen8/bdw/CMakeLists.txt deleted file mode 100644 index 0f94c9e7f5..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - set(IGDRCL_SRCS_offline_compiler_tests_bdw - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/offline_compiler_tests_bdw.cpp - ) - target_sources(ocloc_tests PRIVATE ${IGDRCL_SRCS_offline_compiler_tests_bdw}) - -endif() diff --git a/opencl/test/unit_test/offline_compiler/gen8/bdw/offline_compiler_tests_bdw.cpp b/opencl/test/unit_test/offline_compiler/gen8/bdw/offline_compiler_tests_bdw.cpp deleted file mode 100644 index 9a90c9f41e..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen8/bdw/offline_compiler_tests_bdw.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/compiler_interface/compiler_options.h" -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/helpers/test_files.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h" -#include "opencl/test/unit_test/offline_compiler/offline_compiler_tests.h" - -#include "gtest/gtest.h" - -using namespace NEO; - -using MockOfflineCompilerBdwTests = ::testing::Test; - -BDWTEST_F(MockOfflineCompilerBdwTests, givenDebugOptionAndBdwThenInternalOptionShouldNotContainKernelDebugEnable) { - std::vector argv = { - "ocloc", - "-q", - "-options", - "-g", - "-file", - clFiles + "copybuffer.cl", - "-device", - "bdw"}; - - auto mockOfflineCompiler = std::unique_ptr(new MockOfflineCompiler()); - ASSERT_NE(nullptr, mockOfflineCompiler); - mockOfflineCompiler->initialize(argv.size(), argv); - - std::string internalOptions = mockOfflineCompiler->internalOptions; - - EXPECT_FALSE(hasSubstr(internalOptions, "-cl-kernel-debug-enable")); -} - -BDWTEST_F(MockOfflineCompilerBdwTests, GivenBdwWhenParseDebugSettingsThenContainsHasBufferOffsetArg) { - MockOfflineCompiler mockOfflineCompiler; - mockOfflineCompiler.deviceName = "bdw"; - mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); - - mockOfflineCompiler.parseDebugSettings(); - - std::string internalOptions = mockOfflineCompiler.internalOptions; - size_t found = internalOptions.find(NEO::CompilerOptions::hasBufferOffsetArg.data()); - EXPECT_EQ(std::string::npos, found); -} diff --git a/opencl/test/unit_test/offline_compiler/gen9/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/gen9/CMakeLists.txt deleted file mode 100644 index c4e2248f26..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen9/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - set(IGDRCL_SRCS_offline_compiler_tests_gen9 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ) - target_sources(ocloc_tests PRIVATE ${IGDRCL_SRCS_offline_compiler_tests_gen9}) - - add_subdirectories() -endif() diff --git a/opencl/test/unit_test/offline_compiler/gen9/skl/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/gen9/skl/CMakeLists.txt deleted file mode 100644 index e90f4565cc..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(IGDRCL_SRCS_offline_compiler_tests_skl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/offline_compiler_tests_skl.cpp - ) - target_sources(ocloc_tests PRIVATE ${IGDRCL_SRCS_offline_compiler_tests_skl}) - -endif() diff --git a/opencl/test/unit_test/offline_compiler/gen9/skl/offline_compiler_tests_skl.cpp b/opencl/test/unit_test/offline_compiler/gen9/skl/offline_compiler_tests_skl.cpp deleted file mode 100644 index e2888bb7bb..0000000000 --- a/opencl/test/unit_test/offline_compiler/gen9/skl/offline_compiler_tests_skl.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/compiler_interface/compiler_options.h" -#include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h" -#include "opencl/test/unit_test/offline_compiler/offline_compiler_tests.h" - -namespace NEO { - -using MockOfflineCompilerSklTests = ::testing::Test; - -SKLTEST_F(MockOfflineCompilerSklTests, GivenSklWhenParseDebugSettingsThenStatelessToStatefulOptimizationIsEnabled) { - MockOfflineCompiler mockOfflineCompiler; - mockOfflineCompiler.deviceName = "skl"; - mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); - mockOfflineCompiler.parseDebugSettings(); - std::string internalOptions = mockOfflineCompiler.internalOptions; - size_t found = internalOptions.find(NEO::CompilerOptions::hasBufferOffsetArg.data()); - EXPECT_NE(std::string::npos, found); -} - -SKLTEST_F(MockOfflineCompilerSklTests, GivenSklAndDisabledViaDebugThenStatelessToStatefulOptimizationDisabled) { - DebugManagerStateRestore stateRestore; - MockOfflineCompiler mockOfflineCompiler; - mockOfflineCompiler.deviceName = "skl"; - debugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.set(0); - mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); - mockOfflineCompiler.setStatelessToStatefulBufferOffsetFlag(); - std::string internalOptions = mockOfflineCompiler.internalOptions; - size_t found = internalOptions.find(NEO::CompilerOptions::hasBufferOffsetArg.data()); - EXPECT_EQ(std::string::npos, found); -} - -SKLTEST_F(MockOfflineCompilerSklTests, givenSklWhenAppendExtraInternalOptionsThenForceEmuInt32DivRemSPIsNotApplied) { - MockOfflineCompiler mockOfflineCompiler; - mockOfflineCompiler.deviceName = "skl"; - mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); - std::string internalOptions = mockOfflineCompiler.internalOptions; - mockOfflineCompiler.appendExtraInternalOptions(internalOptions); - size_t found = internalOptions.find(NEO::CompilerOptions::forceEmuInt32DivRemSP.data()); - EXPECT_EQ(std::string::npos, found); -} - -SKLTEST_F(MockOfflineCompilerSklTests, givenSklWhenAppendExtraInternalOptionsThenGreaterThan4gbBuffersRequiredIsNotSet) { - MockOfflineCompiler mockOfflineCompiler; - mockOfflineCompiler.deviceName = "skl"; - mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName); - std::string internalOptions = mockOfflineCompiler.internalOptions; - mockOfflineCompiler.forceStatelessToStatefulOptimization = false; - mockOfflineCompiler.appendExtraInternalOptions(internalOptions); - size_t found = internalOptions.find(NEO::CompilerOptions::greaterThan4gbBuffersRequired.data()); - EXPECT_EQ(std::string::npos, found); -} - -} // namespace NEO \ No newline at end of file diff --git a/shared/source/ail/gen11/ehl/ail_configuration_ehl.cpp b/shared/source/ail/gen11/ehl/ail_configuration_ehl.cpp deleted file mode 100644 index 305908c2c1..0000000000 --- a/shared/source/ail/gen11/ehl/ail_configuration_ehl.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILEHL; - -std::map> applicationMapEHL = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapEHL.find(processName); - if (search != applicationMapEHL.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen11/icllp/ail_configuration_icllp.cpp b/shared/source/ail/gen11/icllp/ail_configuration_icllp.cpp deleted file mode 100644 index 081d801978..0000000000 --- a/shared/source/ail/gen11/icllp/ail_configuration_icllp.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILICLLP; - -std::map> applicationMapICLLP = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapICLLP.find(processName); - if (search != applicationMapICLLP.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen11/lkf/ail_configuration_lkf.cpp b/shared/source/ail/gen11/lkf/ail_configuration_lkf.cpp deleted file mode 100644 index a6d192f85b..0000000000 --- a/shared/source/ail/gen11/lkf/ail_configuration_lkf.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILLKF; - -std::map> applicationMapLKF = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapLKF.find(processName); - if (search != applicationMapLKF.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen8/bdw/ail_configuration_bdw.cpp b/shared/source/ail/gen8/bdw/ail_configuration_bdw.cpp deleted file mode 100644 index b3f0d7dd52..0000000000 --- a/shared/source/ail/gen8/bdw/ail_configuration_bdw.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2023-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" - -namespace NEO { -static EnableAIL enableAILBDW; - -template class AILConfigurationHw; - -} // namespace NEO diff --git a/shared/source/ail/gen9/bxt/ail_configuration_bxt.cpp b/shared/source/ail/gen9/bxt/ail_configuration_bxt.cpp deleted file mode 100644 index 8c17e389ce..0000000000 --- a/shared/source/ail/gen9/bxt/ail_configuration_bxt.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILBXT; - -std::map> applicationMapBXT = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapBXT.find(processName); - if (search != applicationMapBXT.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen9/cfl/ail_configuration_cfl.cpp b/shared/source/ail/gen9/cfl/ail_configuration_cfl.cpp deleted file mode 100644 index 77a91a932b..0000000000 --- a/shared/source/ail/gen9/cfl/ail_configuration_cfl.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILCFL; - -std::map> applicationMapCFL = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapCFL.find(processName); - if (search != applicationMapCFL.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen9/glk/ail_configuration_glk.cpp b/shared/source/ail/gen9/glk/ail_configuration_glk.cpp deleted file mode 100644 index 7bcdf57b98..0000000000 --- a/shared/source/ail/gen9/glk/ail_configuration_glk.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILGLK; - -std::map> applicationMapGLK = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapGLK.find(processName); - if (search != applicationMapGLK.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen9/kbl/ail_configuration_kbl.cpp b/shared/source/ail/gen9/kbl/ail_configuration_kbl.cpp deleted file mode 100644 index f2ed8ba7b1..0000000000 --- a/shared/source/ail/gen9/kbl/ail_configuration_kbl.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILKBL; - -std::map> applicationMapKBL = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapKBL.find(processName); - if (search != applicationMapKBL.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/ail/gen9/skl/ail_configuration_skl.cpp b/shared/source/ail/gen9/skl/ail_configuration_skl.cpp deleted file mode 100644 index 51a78dfcb8..0000000000 --- a/shared/source/ail/gen9/skl/ail_configuration_skl.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/ail/ail_configuration_base.inl" -#include "shared/source/helpers/hw_info.h" - -#include -#include - -namespace NEO { -static EnableAIL enableAILSKL; - -std::map> applicationMapSKL = { - {"resolve", {AILEnumeration::disableHostPtrTracking}} // Disable hostPtrTracking for DaVinci Resolve -}; - -template <> -inline void AILConfigurationHw::applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) { - auto search = applicationMapSKL.find(processName); - if (search != applicationMapSKL.end()) { - for (size_t i = 0; i < search->second.size(); ++i) { - switch (search->second[i]) { - case AILEnumeration::disableHostPtrTracking: - runtimeCapabilityTable.hostPtrTrackingEnabled = false; - break; - default: - break; - } - } - } -} - -template class AILConfigurationHw; -} // namespace NEO diff --git a/shared/source/gen11/CMakeLists.txt b/shared/source/gen11/CMakeLists.txt deleted file mode 100644 index ae3e5cadea..0000000000 --- a/shared/source/gen11/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN11) - add_subdirectories() -endif() diff --git a/shared/source/gen11/aub_command_stream_receiver_gen11.cpp b/shared/source/gen11/aub_command_stream_receiver_gen11.cpp deleted file mode 100644 index a05af36c0c..0000000000 --- a/shared/source/gen11/aub_command_stream_receiver_gen11.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -template <> -constexpr uint32_t AUBCommandStreamReceiverHw::getMaskAndValueForPollForCompletion() { - return 0x00008000; -} - -template <> -void populateFactoryTable>() { - extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory)); - aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw::create; -} - -template class AUBCommandStreamReceiverHw; -} // namespace NEO diff --git a/shared/source/gen11/aub_mapper.h b/shared/source/gen11/aub_mapper.h deleted file mode 100644 index 30740955ea..0000000000 --- a/shared/source/gen11/aub_mapper.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/aub/aub_mapper_base.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { -struct Gen11Family; - -template <> -struct AUBFamilyMapper { - enum { device = AubMemDump::DeviceValues::Icllp }; - - using AubTraits = AubMemDump::Traits; - - static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; - - static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; - - typedef AubMemDump::AubDump AUB; -}; -} // namespace NEO diff --git a/shared/source/gen11/aub_mem_dump_gen11.cpp b/shared/source/gen11/aub_mem_dump_gen11.cpp deleted file mode 100644 index 17ed4aae1a..0000000000 --- a/shared/source/gen11/aub_mem_dump_gen11.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub/aub_helper_bdw_and_later.inl" -#include "shared/source/aub_mem_dump/aub_alloc_dump.inl" -#include "shared/source/aub_mem_dump/aub_mem_dump.inl" -#include "shared/source/gen11/aub_mapper.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/completion_stamp.h" -#include "shared/source/helpers/gfx_core_helper.h" - -#include "config.h" - -namespace AubMemDump { - -enum { - device = DeviceValues::Icllp -}; - -// Instantiate these common template implementations. -template struct AubDump>; -template struct AubDump>; - -template struct AubPageTableHelper32>; -template struct AubPageTableHelper64>; -} // namespace AubMemDump - -namespace NEO { -using Family = Gen11Family; - -static const AubMemDump::LrcaHelperRcs rcs(0x002000); -static const AubMemDump::LrcaHelperBcs bcs(0x022000); -static const AubMemDump::LrcaHelperVcs vcs(0x1c0000); -static const AubMemDump::LrcaHelperVecs vecs(0x1c8000); - -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { - &rcs, - &bcs, - &vcs, - &vecs}; - -const MMIOList AUBFamilyMapper::globalMMIO; - -static const MMIOList mmioListRCS = { - MMIOPair(0x000020d8, 0x00020000), - MMIOPair(AubMemDump::computeRegisterOffset(rcs.mmioBase, 0x229c), 0xffff8280), - MMIOPair(0x0000C800, 0x00000009), - MMIOPair(0x0000C804, 0x00000038), - MMIOPair(0x0000C808, 0x0000003B), - MMIOPair(0x0000C80C, 0x00000039), - MMIOPair(0x0000C810, 0x00000037), - MMIOPair(0x0000C814, 0x00000039), - MMIOPair(0x0000C818, 0x00000037), - MMIOPair(0x0000C81C, 0x0000001B), - MMIOPair(0x0000C820, 0x00060037), - MMIOPair(0x0000C824, 0x00000032), - MMIOPair(0x0000C828, 0x00000033), - MMIOPair(0x0000C82C, 0x0000003B), - MMIOPair(0x0000C8C0, 0x00000037), - MMIOPair(0x0000E18C, 0x00200020), -}; - -static const MMIOList mmioListBCS = { - MMIOPair(AubMemDump::computeRegisterOffset(bcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVCS = { - MMIOPair(AubMemDump::computeRegisterOffset(vcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVECS = { - MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), -}; - -const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { - &mmioListRCS, - &mmioListBCS, - &mmioListVCS, - &mmioListVECS}; - -template class AubHelperHw; -} // namespace NEO - -namespace AubAllocDump { -using namespace NEO; - -template SurfaceInfo *getDumpSurfaceInfo(GraphicsAllocation &gfxAllocation, const GmmHelper &gmmHelper, DumpFormat dumpFormat); - -template uint32_t getImageSurfaceTypeFromGmmResourceType(GMM_RESOURCE_TYPE gmmResourceType); - -template void dumpBufferInBinFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInBmpFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpBufferInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpAllocation(DumpFormat dumpFormat, GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); -} // namespace AubAllocDump diff --git a/shared/source/gen11/command_encoder_gen11.cpp b/shared/source/gen11/command_encoder_gen11.cpp deleted file mode 100644 index 7fb47c1c82..0000000000 --- a/shared/source/gen11/command_encoder_gen11.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_container/command_encoder.inl" -#include "shared/source/command_container/command_encoder_bdw_and_later.inl" -#include "shared/source/command_container/command_encoder_pre_xe2_hpg_core.inl" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/gen11/reg_configs.h" -#include "shared/source/gen_common/reg_configs_common.h" - -using Family = NEO::Gen11Family; - -#include "shared/source/command_container/command_encoder_heap_addressing.inl" -#include "shared/source/command_container/encode_compute_mode_bdw_and_later.inl" -#include "shared/source/command_container/image_surface_state/compression_params_bdw_and_later.inl" - -#include "stream_properties.inl" - -namespace NEO { - -template <> -bool EncodeSurfaceState::isBindingTablePrefetchPreferred() { - return false; -} - -template <> -void EncodeSurfaceState::setAuxParamsForMCSCCS(R_SURFACE_STATE *surfaceState, const ReleaseHelper *releaseHelper) { -} - -template <> -void EncodeSurfaceState::setClearColorParams(R_SURFACE_STATE *surfaceState, Gmm *gmm) { -} - -template <> -void EncodeSurfaceState::setFlagsForMediaCompression(R_SURFACE_STATE *surfaceState, Gmm *gmm) { - if (gmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed) { - surfaceState->setAuxiliarySurfaceMode(Family::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); - } -} - -template -size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs) { - return sizeof(typename Family::PIPE_CONTROL) + 2u * sizeof(typename Family::MI_LOAD_REGISTER_IMM); -} - -template <> -inline size_t EncodeComputeMode::getSizeForComputeMode() { - return 0; -} - -template <> -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, - const RootDeviceEnvironment &rootDeviceEnvironment) { - using PIPE_CONTROL = typename Family::PIPE_CONTROL; - - if (properties.threadArbitrationPolicy.isDirty) { - PipeControlArgs args; - args.csStallOnly = true; - MemorySynchronizationCommands::addSingleBarrier(csr, args); - - LriHelper::program(&csr, - RowChickenReg4::address, - RowChickenReg4::regDataForArbitrationPolicy[properties.threadArbitrationPolicy.value], - false, - false); - } - if (properties.isCoherencyRequired.isDirty) { - auto nonCoherentEnable = !properties.isCoherencyRequired.value; - LriHelper::program(&csr, - gen11HdcModeRegister::address, - DwordBuilder::build(gen11HdcModeRegister::forceNonCoherentEnableBit, true, nonCoherentEnable), - false, - false); - } -} - -} // namespace NEO - -#include "shared/source/command_container/command_encoder_enablers.inl" - -namespace NEO { -template struct EncodeL3State; - -template void InOrderPatchCommandHelpers::PatchCmd::patchComputeWalker(uint64_t appendCounterValue); -} // namespace NEO - -#include "shared/source/command_container/implicit_scaling_before_xe_hp.inl" \ No newline at end of file diff --git a/shared/source/gen11/command_stream_receiver_hw_gen11.cpp b/shared/source/gen11/command_stream_receiver_hw_gen11.cpp deleted file mode 100644 index f9ea2d7155..0000000000 --- a/shared/source/gen11/command_stream_receiver_hw_gen11.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl" -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/gen11/reg_configs.h" -#include "shared/source/helpers/blit_commands_helper_bdw_and_later.inl" -#include "shared/source/helpers/populate_factory.h" -#include "shared/source/memory_manager/allocation_properties.h" - -namespace NEO { -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -template <> -void CommandStreamReceiverHw::programMediaSampler(LinearStream &stream, DispatchFlags &dispatchFlags) { - using PWR_CLK_STATE_REGISTER = Family::PWR_CLK_STATE_REGISTER; - - const auto &hwInfo = peekHwInfo(); - auto &productHelper = this->getProductHelper(); - if (productHelper.isAdditionalMediaSamplerProgrammingRequired()) { - if (dispatchFlags.pipelineSelectArgs.mediaSamplerRequired) { - if (!lastVmeSubslicesConfig) { - PipeControlArgs args; - args.dcFlushEnable = this->dcFlushSupport; - args.renderTargetCacheFlushEnable = true; - args.instructionCacheInvalidateEnable = true; - args.textureCacheInvalidationEnable = true; - args.pipeControlFlushEnable = true; - args.vfCacheInvalidationEnable = true; - args.constantCacheInvalidationEnable = true; - args.stateCacheInvalidationEnable = true; - MemorySynchronizationCommands::addSingleBarrier(stream, args); - - uint32_t numSubslices = hwInfo.gtSystemInfo.SubSliceCount; - uint32_t numSubslicesWithVme = numSubslices / 2; // 1 VME unit per DSS - uint32_t numSlicesForPowerGating = 1; // power gating supported only if #Slices = 1 - - PWR_CLK_STATE_REGISTER reg = Family::cmdInitPwrClkStateRegister; - reg.TheStructure.Common.EUmin = hwInfo.gtSystemInfo.MaxEuPerSubSlice; - reg.TheStructure.Common.EUmax = hwInfo.gtSystemInfo.MaxEuPerSubSlice; - reg.TheStructure.Common.SSCountEn = 1; // Enable SScount - reg.TheStructure.Common.SScount = numSubslicesWithVme; - reg.TheStructure.Common.EnableSliceCountRequest = 1; // Enable SliceCountRequest - reg.TheStructure.Common.SliceCountRequest = numSlicesForPowerGating; - LriHelper::program(&stream, - PWR_CLK_STATE_REGISTER::REG_ADDRESS, - reg.TheStructure.RawData[0], - false, - false); - - args = {}; - MemorySynchronizationCommands::addSingleBarrier(stream, args); - - lastVmeSubslicesConfig = true; - } - } else { - if (lastVmeSubslicesConfig) { - PipeControlArgs args; - args.dcFlushEnable = this->dcFlushSupport; - args.renderTargetCacheFlushEnable = true; - args.instructionCacheInvalidateEnable = true; - args.textureCacheInvalidationEnable = true; - args.pipeControlFlushEnable = true; - args.vfCacheInvalidationEnable = true; - args.constantCacheInvalidationEnable = true; - args.stateCacheInvalidationEnable = true; - args.genericMediaStateClear = true; - MemorySynchronizationCommands::addSingleBarrier(stream, args); - - args = {}; - MemorySynchronizationCommands::addSingleBarrier(stream, args); - - // In Gen11-LP, software programs this register as if GT consists of - // 2 slices with 4 subslices in each slice. Hardware maps this to the - // LP 1 slice/8-subslice physical layout - uint32_t numSubslices = hwInfo.gtSystemInfo.SubSliceCount; - uint32_t numSubslicesMapped = numSubslices / 2; - uint32_t numSlicesMapped = hwInfo.gtSystemInfo.SliceCount * 2; - - PWR_CLK_STATE_REGISTER reg = Family::cmdInitPwrClkStateRegister; - reg.TheStructure.Common.EUmin = hwInfo.gtSystemInfo.MaxEuPerSubSlice; - reg.TheStructure.Common.EUmax = hwInfo.gtSystemInfo.MaxEuPerSubSlice; - reg.TheStructure.Common.SSCountEn = 1; // Enable SScount - reg.TheStructure.Common.SScount = numSubslicesMapped; - reg.TheStructure.Common.EnableSliceCountRequest = 1; // Enable SliceCountRequest - reg.TheStructure.Common.SliceCountRequest = numSlicesMapped; - - LriHelper::program(&stream, - PWR_CLK_STATE_REGISTER::REG_ADDRESS, - reg.TheStructure.RawData[0], - false, - false); - - MemorySynchronizationCommands::addSingleBarrier(stream, args); - } - } - } -} - -template <> -bool CommandStreamReceiverHw::detectInitProgrammingFlagsRequired(const DispatchFlags &dispatchFlags) const { - bool flag = debugManager.flags.ForceCsrReprogramming.get(); - auto &productHelper = this->getProductHelper(); - if (productHelper.isInitialFlagsProgrammingRequired()) { - if (!dispatchFlags.pipelineSelectArgs.mediaSamplerRequired) { - if (lastVmeSubslicesConfig) { - flag = true; - } - } - } - return flag; -} - -template <> -size_t CommandStreamReceiverHw::getCmdSizeForMediaSampler(bool mediaSamplerRequired) const { - typedef typename Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef typename Family::PIPE_CONTROL PIPE_CONTROL; - auto &productHelper = this->getProductHelper(); - if (productHelper.isReturnedCmdSizeForMediaSamplerAdjustmentRequired()) { - if (mediaSamplerRequired) { - if (!lastVmeSubslicesConfig) { - return sizeof(MI_LOAD_REGISTER_IMM) + 2 * sizeof(PIPE_CONTROL); - } - } else { - if (lastVmeSubslicesConfig) { - return sizeof(MI_LOAD_REGISTER_IMM) + 3 * sizeof(PIPE_CONTROL); - } - } - } - return 0; -} - -template <> -void populateFactoryTable>() { - extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE]; - commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; -} - -template class CommandStreamReceiverHw; -template struct BlitCommandsHelper; - -const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); -const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); -const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit(); -const Family::MEDIA_STATE_FLUSH Family::cmdInitMediaStateFlush = Family::MEDIA_STATE_FLUSH::sInit(); -const Family::MI_BATCH_BUFFER_START Family::cmdInitBatchBufferStart = Family::MI_BATCH_BUFFER_START::sInit(); -const Family::MI_BATCH_BUFFER_END Family::cmdInitBatchBufferEnd = Family::MI_BATCH_BUFFER_END::sInit(); -const Family::PIPE_CONTROL Family::cmdInitPipeControl = Family::PIPE_CONTROL::sInit(); -const Family::MI_SEMAPHORE_WAIT Family::cmdInitMiSemaphoreWait = Family::MI_SEMAPHORE_WAIT::sInit(); -const Family::RENDER_SURFACE_STATE Family::cmdInitRenderSurfaceState = Family::RENDER_SURFACE_STATE::sInit(); -const Family::PWR_CLK_STATE_REGISTER Family::cmdInitPwrClkStateRegister = Family::PWR_CLK_STATE_REGISTER::sInit(); -const Family::MI_LOAD_REGISTER_IMM Family::cmdInitLoadRegisterImm = Family::MI_LOAD_REGISTER_IMM::sInit(); -const Family::MI_LOAD_REGISTER_REG Family::cmdInitLoadRegisterReg = Family::MI_LOAD_REGISTER_REG::sInit(); -const Family::MI_LOAD_REGISTER_MEM Family::cmdInitLoadRegisterMem = Family::MI_LOAD_REGISTER_MEM::sInit(); -const Family::MI_STORE_DATA_IMM Family::cmdInitStoreDataImm = Family::MI_STORE_DATA_IMM::sInit(); -const Family::MI_STORE_REGISTER_MEM Family::cmdInitStoreRegisterMem = Family::MI_STORE_REGISTER_MEM::sInit(); -const Family::MI_NOOP Family::cmdInitNoop = Family::MI_NOOP::sInit(); -const Family::MI_REPORT_PERF_COUNT Family::cmdInitReportPerfCount = Family::MI_REPORT_PERF_COUNT::sInit(); -const Family::MI_ATOMIC Family::cmdInitAtomic = Family::MI_ATOMIC::sInit(); -const Family::PIPELINE_SELECT Family::cmdInitPipelineSelect = Family::PIPELINE_SELECT::sInit(); -const Family::MI_ARB_CHECK Family::cmdInitArbCheck = Family::MI_ARB_CHECK::sInit(); -const Family::MEDIA_VFE_STATE Family::cmdInitMediaVfeState = Family::MEDIA_VFE_STATE::sInit(); -const Family::STATE_BASE_ADDRESS Family::cmdInitStateBaseAddress = Family::STATE_BASE_ADDRESS::sInit(); -const Family::MEDIA_SURFACE_STATE Family::cmdInitMediaSurfaceState = Family::MEDIA_SURFACE_STATE::sInit(); -const Family::SAMPLER_STATE Family::cmdInitSamplerState = Family::SAMPLER_STATE::sInit(); -const Family::GPGPU_CSR_BASE_ADDRESS Family::cmdInitGpgpuCsrBaseAddress = Family::GPGPU_CSR_BASE_ADDRESS::sInit(); -const Family::STATE_SIP Family::cmdInitStateSip = Family::STATE_SIP::sInit(); -const Family::BINDING_TABLE_STATE Family::cmdInitBindingTableState = Family::BINDING_TABLE_STATE::sInit(); -const Family::MI_USER_INTERRUPT Family::cmdInitUserInterrupt = Family::MI_USER_INTERRUPT::sInit(); -const Family::XY_BLOCK_COPY_BLT Family::cmdInitXyBlockCopyBlt = Family::XY_BLOCK_COPY_BLT::sInit(); -const Family::XY_SRC_COPY_BLT Family::cmdInitXyCopyBlt = Family::XY_SRC_COPY_BLT::sInit(); -const Family::MI_FLUSH_DW Family::cmdInitMiFlushDw = Family::MI_FLUSH_DW::sInit(); -const Family::XY_COLOR_BLT Family::cmdInitXyColorBlt = Family::XY_COLOR_BLT::sInit(); -} // namespace NEO diff --git a/shared/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp b/shared/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp deleted file mode 100644 index 811d2ddcb6..0000000000 --- a/shared/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" - -namespace NEO { -typedef Gen11Family Family; - -template <> -void CommandStreamReceiverSimulatedCommonHw::submitLRCA(const MiContextDescriptorReg &contextDescriptor) { - auto mmioBase = getCsTraits(osContext->getEngineType()).mmioBase; - stream->writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2510), contextDescriptor.ulData[0]); - stream->writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2514), contextDescriptor.ulData[1]); - - // Load our new exec list - stream->writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2550), 1); -} - -template class CommandStreamReceiverSimulatedCommonHw; -} // namespace NEO diff --git a/shared/source/gen11/create_device_command_stream_receiver_gen11.cpp b/shared/source/gen11/create_device_command_stream_receiver_gen11.cpp deleted file mode 100644 index cb419b6e4f..0000000000 --- a/shared/source/gen11/create_device_command_stream_receiver_gen11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/gen11/hw_cmds.h" - -#include "create_command_stream_receiver.inl" - -namespace NEO { - -template <> -CommandStreamReceiver *createDeviceCommandStreamReceiver(bool withAubDump, - ExecutionEnvironment &executionEnvironment, - uint32_t rootDeviceIndex, - const DeviceBitfield deviceBitfield) { - return createCommandStreamReceiver(withAubDump, executionEnvironment, rootDeviceIndex, deviceBitfield); -} - -} // namespace NEO diff --git a/shared/source/gen11/debugger_gen11.cpp b/shared/source/gen11/debugger_gen11.cpp deleted file mode 100644 index 47cf767fdf..0000000000 --- a/shared/source/gen11/debugger_gen11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/debugger/debugger_l0.inl" -#include "shared/source/debugger/debugger_l0_base.inl" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { -struct Gen11Family; -using GfxFamily = Gen11Family; -static auto coreFamily = IGFX_GEN11_CORE; - -template <> -void populateFactoryTable>() { - extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE]; - debuggerL0Factory[coreFamily] = DebuggerL0Hw::allocate; -} -template class DebuggerL0Hw; -} // namespace NEO diff --git a/shared/source/gen11/ehl/device_ids_configs_ehl.h b/shared/source/gen11/ehl/device_ids_configs_ehl.h deleted file mode 100644 index 67ac7b8cfc..0000000000 --- a/shared/source/gen11/ehl/device_ids_configs_ehl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector ehlDeviceIds{ - 0x4500, - 0x4541, - 0x4551, - 0x4571, - 0x4555, - 0x4E51, - 0x4E61, - 0x4E71, - 0x4E55}; -} // namespace NEO diff --git a/shared/source/gen11/enable_compiler_product_helper_ehl.cpp b/shared/source/gen11/enable_compiler_product_helper_ehl.cpp deleted file mode 100644 index b23f4fb50d..0000000000 --- a/shared/source/gen11/enable_compiler_product_helper_ehl.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100040008; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::EHL; -} - -static EnableCompilerProductHelper enableCompilerProductHelperEHL; - -} // namespace NEO diff --git a/shared/source/gen11/enable_compiler_product_helper_icllp.cpp b/shared/source/gen11/enable_compiler_product_helper_icllp.cpp deleted file mode 100644 index 603f14b9a0..0000000000 --- a/shared/source/gen11/enable_compiler_product_helper_icllp.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100080008; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::ICL; -} - -template <> -bool CompilerProductHelperHw::oclocEnforceZebinFormat() const { - return true; -} - -static EnableCompilerProductHelper enableCompilerProductHelperICLLP; - -} // namespace NEO diff --git a/shared/source/gen11/enable_compiler_product_helper_lkf.cpp b/shared/source/gen11/enable_compiler_product_helper_lkf.cpp deleted file mode 100644 index 0aeda91426..0000000000 --- a/shared/source/gen11/enable_compiler_product_helper_lkf.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100080008; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::LKF; -} - -static EnableCompilerProductHelper enableCompilerProductHelperLKF; - -} // namespace NEO diff --git a/shared/source/gen11/enable_family_full_core_gen11.cpp b/shared/source/gen11/enable_family_full_core_gen11.cpp deleted file mode 100644 index 6faaa32ba1..0000000000 --- a/shared/source/gen11/enable_family_full_core_gen11.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/debugger/debugger_l0.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE]; - -using Family = Gen11Family; -static auto gfxFamily = IGFX_GEN11_CORE; - -struct EnableCoreGen11 { - EnableCoreGen11() { - gfxCoreHelperFactory[gfxFamily] = GfxCoreHelperHw::create; - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableCoreGen11 enable; -} // namespace NEO diff --git a/shared/source/gen11/enable_gen11.cpp b/shared/source/gen11/enable_gen11.cpp deleted file mode 100644 index 929b2a8a1f..0000000000 --- a/shared/source/gen11/enable_gen11.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/cache_policy_bdw_and_later.inl" -#include "shared/source/helpers/enable_product.inl" -#include "shared/source/os_interface/product_helper.h" - -namespace NEO { - -#ifdef SUPPORT_ICLLP -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwICLLP; - -#endif -#ifdef SUPPORT_LKF -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwLKF; - -#endif -#ifdef SUPPORT_EHL -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwEHL; - -#endif - -} // namespace NEO diff --git a/shared/source/gen11/enable_product_helper_ehl.cpp b/shared/source/gen11/enable_product_helper_ehl.cpp deleted file mode 100644 index 6733e6fe16..0000000000 --- a/shared/source/gen11/enable_product_helper_ehl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableEHL; - -} // namespace NEO diff --git a/shared/source/gen11/enable_product_helper_icllp.cpp b/shared/source/gen11/enable_product_helper_icllp.cpp deleted file mode 100644 index 706a4d46ad..0000000000 --- a/shared/source/gen11/enable_product_helper_icllp.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableICLLP; - -} // namespace NEO diff --git a/shared/source/gen11/enable_product_helper_lkf.cpp b/shared/source/gen11/enable_product_helper_lkf.cpp deleted file mode 100644 index f21b289bf2..0000000000 --- a/shared/source/gen11/enable_product_helper_lkf.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableLKF; - -} // namespace NEO diff --git a/shared/source/gen11/gfx_core_helper_gen11.cpp b/shared/source/gen11/gfx_core_helper_gen11.cpp deleted file mode 100644 index 73428273aa..0000000000 --- a/shared/source/gen11/gfx_core_helper_gen11.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/aub_mapper.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/flat_batch_buffer_helper_hw.inl" -#include "shared/source/helpers/gfx_core_helper_base.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" - -namespace NEO { -typedef Gen11Family Family; - -template <> -uint32_t GfxCoreHelperHw::getComputeUnitsUsedForScratch(const RootDeviceEnvironment &rootDeviceEnvironment) const { - auto hwInfo = rootDeviceEnvironment.getHardwareInfo(); - return hwInfo->gtSystemInfo.MaxSubSlicesSupported * hwInfo->gtSystemInfo.MaxEuPerSubSlice * 8; -} - -template <> -int32_t GfxCoreHelperHw::getDefaultThreadArbitrationPolicy() const { - return ThreadArbitrationPolicy::RoundRobinAfterDependency; -} - -template <> -bool GfxCoreHelperHw::packedFormatsSupported() const { - return true; -} - -template class GfxCoreHelperHw; -template class FlatBatchBufferHelperHw; -template struct MemorySynchronizationCommands; -template struct LriHelper; - -} // namespace NEO diff --git a/shared/source/gen11/hw_cmds.h b/shared/source/gen11/hw_cmds.h deleted file mode 100644 index b3577b4136..0000000000 --- a/shared/source/gen11/hw_cmds.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_ICLLP -#include "hw_cmds_icllp.h" -#endif -#ifdef SUPPORT_LKF -#include "hw_cmds_lkf.h" -#endif -#ifdef SUPPORT_EHL -#include "hw_cmds_ehl.h" -#endif diff --git a/shared/source/gen11/hw_cmds_base.h b/shared/source/gen11/hw_cmds_base.h deleted file mode 100644 index 033b8835c0..0000000000 --- a/shared/source/gen11/hw_cmds_base.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/commands/bxml_generator_glue.h" -#include "shared/source/gen11/hw_info.h" -#include "shared/source/helpers/debug_helpers.h" - -#include "igfxfmid.h" - -#include -#include -#include - -template -struct CmdParse; - -namespace NEO { -struct Gen11 { -#include "shared/source/generated/gen11/hw_cmds_generated_gen11.inl" - - static constexpr bool supportsSampler = true; - static constexpr bool isUsingGenericMediaStateClear = true; - static constexpr bool isUsingMiMemFence = false; - static constexpr bool isUsingMiSetPredicate = false; - static constexpr bool isUsingMiMathMocs = false; - static constexpr uint32_t bcsEngineCount = 1u; - static constexpr uint32_t timestampPacketCount = 1u; - - struct FrontEndStateSupport { - static constexpr bool scratchSize = true; - static constexpr bool privateScratchSize = false; - static constexpr bool computeDispatchAllWalker = false; - static constexpr bool disableEuFusion = false; - static constexpr bool disableOverdispatch = false; - static constexpr bool singleSliceDispatchCcsMode = false; - }; - - struct StateComputeModeStateSupport { - static constexpr bool threadArbitrationPolicy = true; - static constexpr bool coherencyRequired = true; - static constexpr bool largeGrfMode = false; - static constexpr bool zPassAsyncComputeThreadLimit = false; - static constexpr bool pixelAsyncComputeThreadLimit = false; - static constexpr bool devicePreemptionMode = false; - }; - - struct StateBaseAddressStateSupport { - static constexpr bool bindingTablePoolBaseAddress = false; - }; - - struct PipelineSelectStateSupport { - static constexpr bool mediaSamplerDopClockGate = true; - static constexpr bool systolicMode = false; - }; - - struct PreemptionDebugSupport { - static constexpr bool preemptionMode = true; - static constexpr bool stateSip = true; - static constexpr bool csrSurface = true; - }; - - struct DataPortBindlessSurfaceExtendedMessageDescriptor { - union { - struct { - uint32_t bindlessSurfaceOffset : 20; - uint32_t reserved : 1; - uint32_t executionUnitExtendedMessageDescriptorDefinition : 11; - }; - uint32_t packed; - }; - - DataPortBindlessSurfaceExtendedMessageDescriptor() { - packed = 0; - } - - void setBindlessSurfaceOffset(uint32_t offsetInBindlessSurfaceHeapInBytes) { - bindlessSurfaceOffset = offsetInBindlessSurfaceHeapInBytes >> 6; - } - - uint32_t getBindlessSurfaceOffsetToPatch() { - return bindlessSurfaceOffset << 12; - } - }; - - static constexpr uint32_t cacheLineSize = 0x40; - static constexpr bool isDcFlushAllowed = true; - - static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), ""); -}; -struct Gen11Family : public Gen11 { - using Parse = CmdParse; - using GfxFamily = Gen11Family; - using DefaultWalkerType = GPGPU_WALKER; - using FrontEndStateCommand = MEDIA_VFE_STATE; - using XY_BLOCK_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; - using TimestampPacketType = uint32_t; - static const GPGPU_WALKER cmdInitGpgpuWalker; - static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; - static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; - static const MEDIA_STATE_FLUSH cmdInitMediaStateFlush; - static const MI_BATCH_BUFFER_END cmdInitBatchBufferEnd; - static const MI_BATCH_BUFFER_START cmdInitBatchBufferStart; - static const PIPE_CONTROL cmdInitPipeControl; - static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait; - static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState; - static const PWR_CLK_STATE_REGISTER cmdInitPwrClkStateRegister; - static const MI_LOAD_REGISTER_IMM cmdInitLoadRegisterImm; - static const MI_LOAD_REGISTER_REG cmdInitLoadRegisterReg; - static const MI_LOAD_REGISTER_MEM cmdInitLoadRegisterMem; - static const MI_STORE_DATA_IMM cmdInitStoreDataImm; - static const MI_STORE_REGISTER_MEM cmdInitStoreRegisterMem; - static const MI_NOOP cmdInitNoop; - static const MI_REPORT_PERF_COUNT cmdInitReportPerfCount; - static const MI_ATOMIC cmdInitAtomic; - static const PIPELINE_SELECT cmdInitPipelineSelect; - static const MI_ARB_CHECK cmdInitArbCheck; - static const MEDIA_VFE_STATE cmdInitMediaVfeState; - static const STATE_BASE_ADDRESS cmdInitStateBaseAddress; - static const MEDIA_SURFACE_STATE cmdInitMediaSurfaceState; - static const SAMPLER_STATE cmdInitSamplerState; - static const GPGPU_CSR_BASE_ADDRESS cmdInitGpgpuCsrBaseAddress; - static const STATE_SIP cmdInitStateSip; - static const BINDING_TABLE_STATE cmdInitBindingTableState; - static const MI_USER_INTERRUPT cmdInitUserInterrupt; - static const XY_BLOCK_COPY_BLT cmdInitXyBlockCopyBlt; - static const XY_SRC_COPY_BLT cmdInitXyCopyBlt; - static const MI_FLUSH_DW cmdInitMiFlushDw; - static const XY_COLOR_BLT cmdInitXyColorBlt; - static constexpr bool isQwordInOrderCounter = false; - static constexpr bool walkerPostSyncSupport = false; - static constexpr size_t indirectDataAlignment = GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE; - - static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) { - return cmdSetBaseFamily == IGFX_GEN8_CORE; - } - - template - static constexpr size_t getInterfaceDescriptorSize() { - return sizeof(INTERFACE_DESCRIPTOR_DATA); - } - - template - static WalkerType getInitGpuWalker() { - return cmdInitGpgpuWalker; - } - - template - static InterfaceDescriptorType getInitInterfaceDescriptor() { - return cmdInitInterfaceDescriptorData; - } - - template - static constexpr bool isHeaplessMode() { - return false; - } - - using WalkerVariant = std::variant; -}; -} // namespace NEO diff --git a/shared/source/gen11/hw_cmds_ehl.h b/shared/source/gen11/hw_cmds_ehl.h deleted file mode 100644 index 5afe77b172..0000000000 --- a/shared/source/gen11/hw_cmds_ehl.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct EHL : public Gen11Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 1; - static const uint32_t maxSubslicesSupported = 4; - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class EhlHwConfig : public EHL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -} // namespace NEO diff --git a/shared/source/gen11/hw_cmds_icllp.h b/shared/source/gen11/hw_cmds_icllp.h deleted file mode 100644 index ca7df0e423..0000000000 --- a/shared/source/gen11/hw_cmds_icllp.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct ICLLP : public Gen11Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 1; - static const uint32_t maxSubslicesSupported = 8; - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class IcllpHw1x8x8 : public ICLLP { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class IcllpHw1x4x8 : public ICLLP { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -class IcllpHw1x6x8 : public ICLLP { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -} // namespace NEO diff --git a/shared/source/gen11/hw_cmds_lkf.h b/shared/source/gen11/hw_cmds_lkf.h deleted file mode 100644 index 8fd40c220c..0000000000 --- a/shared/source/gen11/hw_cmds_lkf.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct LKF : public Gen11Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 1; - static const uint32_t maxSubslicesSupported = 8; - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; -class LkfHw1x8x8 : public LKF { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -} // namespace NEO diff --git a/shared/source/gen11/hw_info.h b/shared/source/gen11/hw_info.h deleted file mode 100644 index d12a06cefb..0000000000 --- a/shared/source/gen11/hw_info.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_ICLLP -#include "hw_info_icllp.h" -#endif -#ifdef SUPPORT_LKF -#include "hw_info_lkf.h" -#endif -#ifdef SUPPORT_EHL -#include "hw_info_ehl.h" -#endif diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp deleted file mode 100644 index b4e6e1c3a3..0000000000 --- a/shared/source/gen11/hw_info_ehl.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "ehl"; - -const PLATFORM EHL::platform = { - IGFX_ELKHARTLAKE, - PCH_UNKNOWN, - IGFX_GEN11_CORE, - IGFX_GEN11_CORE, - PLATFORM_NONE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable EHL::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max36BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Ehl, // aubDeviceId - 1, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(EHL::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - false, // ftrSupportsInteger64BitAtomics - false, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - false, // ftrSupports64BitMath - false, // ftrSvm - false, // ftrSupportsCoherency - false, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - false, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - false, // supportsPipes - false, // supportsOcl21Features - false, // supportsOnDemandPageFaults - false, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable EHL::workaroundTable = {}; -FeatureTable EHL::featureTable = {}; - -void EHL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrStandardMipTailFormat = true; - - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrTileMappedResource = true; - - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - featureTable->flags.ftrAstcHdr2D = true; - featureTable->flags.ftrAstcLdr2D = true; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; -}; - -void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 0; - gtSysInfo->TotalHsThreads = 0; - gtSysInfo->TotalDsThreads = 0; - gtSysInfo->TotalGsThreads = 0; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = EHL::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = EHL::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = EHL::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo EhlHwConfig::hwInfo = { - &EHL::platform, - &EHL::featureTable, - &EHL::workaroundTable, - &EhlHwConfig::gtSystemInfo, - EHL::capabilityTable}; - -GT_SYSTEM_INFO EhlHwConfig::gtSystemInfo = {0}; -void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 1280; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo EHL::hwInfo = EhlHwConfig::hwInfo; - -void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); -} -void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupEHLHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_ehl.h b/shared/source/gen11/hw_info_ehl.h deleted file mode 100644 index 44b7bc1312..0000000000 --- a/shared/source/gen11/hw_info_ehl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_info_gen11.h" - -namespace NEO { - -struct EHL; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN11_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef EHL GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_gen11.cpp b/shared/source/gen11/hw_info_gen11.cpp deleted file mode 100644 index 8e0d3920e6..0000000000 --- a/shared/source/gen11/hw_info_gen11.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_info_gen11.h" - -namespace NEO { -const char *GfxFamilyMapper::name = "Gen11"; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_gen11.h b/shared/source/gen11/hw_info_gen11.h deleted file mode 100644 index 0b241b28d3..0000000000 --- a/shared/source/gen11/hw_info_gen11.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/helpers/hw_mapper.h" - -namespace NEO { - -struct Gen11Family; - -template <> -struct GfxFamilyMapper { - typedef Gen11Family GfxFamily; - static const char *name; -}; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp deleted file mode 100644 index 284a11865e..0000000000 --- a/shared/source/gen11/hw_info_icllp.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "icllp"; - -const PLATFORM ICLLP::platform = { - IGFX_ICELAKE_LP, - PCH_UNKNOWN, - IGFX_GEN11_CORE, - IGFX_GEN11_CORE, - PLATFORM_NONE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable ICLLP::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Icllp, // aubDeviceId - 1, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(ICLLP::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - false, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - false, // ftrSupports64BitMath - true, // ftrSvm - false, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - true, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - false, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - true, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable ICLLP::workaroundTable = {}; -FeatureTable ICLLP::featureTable = {}; - -void ICLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrStandardMipTailFormat = true; - - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrTileMappedResource = true; - - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - featureTable->flags.ftrAstcHdr2D = true; - featureTable->flags.ftrAstcLdr2D = true; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; -}; - -void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalHsThreads = 224; - gtSysInfo->TotalGsThreads = 224; - gtSysInfo->TotalVsThreads = 336; - gtSysInfo->TotalDsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 128; - gtSysInfo->CsrSizeInMb = 5; - gtSysInfo->MaxEuPerSubSlice = ICLLP::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = ICLLP::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = ICLLP::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo IcllpHw1x8x8::hwInfo = { - &ICLLP::platform, - &ICLLP::featureTable, - &ICLLP::workaroundTable, - &IcllpHw1x8x8::gtSystemInfo, - ICLLP::capabilityTable}; - -GT_SYSTEM_INFO IcllpHw1x8x8::gtSystemInfo = {0}; -void IcllpHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 3072; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; - gtSysInfo->TotalHsThreads = 336; - gtSysInfo->TotalGsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 64; -}; - -const HardwareInfo IcllpHw1x4x8::hwInfo = { - &ICLLP::platform, - &ICLLP::featureTable, - &ICLLP::workaroundTable, - &IcllpHw1x4x8::gtSystemInfo, - ICLLP::capabilityTable}; - -GT_SYSTEM_INFO IcllpHw1x4x8::gtSystemInfo = {0}; -void IcllpHw1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 2304; - gtSysInfo->L3BankCount = 6; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo IcllpHw1x6x8::hwInfo = { - &ICLLP::platform, - &ICLLP::featureTable, - &ICLLP::workaroundTable, - &IcllpHw1x6x8::gtSystemInfo, - ICLLP::capabilityTable}; - -GT_SYSTEM_INFO IcllpHw1x6x8::gtSystemInfo = {0}; -void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 2304; - gtSysInfo->L3BankCount = 6; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo ICLLP::hwInfo = IcllpHw1x8x8::hwInfo; - -void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100080008) { - IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100040008) { - IcllpHw1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100060008) { - IcllpHw1x6x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*ICLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupICLLPHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_icllp.h b/shared/source/gen11/hw_info_icllp.h deleted file mode 100644 index 169660476b..0000000000 --- a/shared/source/gen11/hw_info_icllp.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen11.h" - -namespace NEO { - -struct ICLLP; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN11_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef ICLLP GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp deleted file mode 100644 index 4a1cbf79ea..0000000000 --- a/shared/source/gen11/hw_info_lkf.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "lkf"; - -const PLATFORM LKF::platform = { - IGFX_LAKEFIELD, - PCH_UNKNOWN, - IGFX_GEN11_CORE, - IGFX_GEN11_CORE, - PLATFORM_NONE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable LKF::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max36BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Lkf, // aubDeviceId - 1, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(LKF::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - false, // ftrSupportsInteger64BitAtomics - false, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - false, // ftrSupports64BitMath - false, // ftrSvm - false, // ftrSupportsCoherency - false, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - false, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - false, // supportsPipes - false, // supportsOcl21Features - false, // supportsOnDemandPageFaults - false, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable LKF::workaroundTable = {}; -FeatureTable LKF::featureTable = {}; - -void LKF::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrStandardMipTailFormat = true; - - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrTileMappedResource = true; - - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - featureTable->flags.ftrAstcHdr2D = true; - featureTable->flags.ftrAstcLdr2D = true; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; -}; - -void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 448; - gtSysInfo->TotalHsThreads = 448; - gtSysInfo->TotalDsThreads = 448; - gtSysInfo->TotalGsThreads = 448; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = LKF::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = LKF::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = LKF::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo LkfHw1x8x8::hwInfo = { - &LKF::platform, - &LKF::featureTable, - &LKF::workaroundTable, - &LkfHw1x8x8::gtSystemInfo, - LKF::capabilityTable}; - -GT_SYSTEM_INFO LkfHw1x8x8::gtSystemInfo = {0}; -void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 2560; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; -}; - -const HardwareInfo LKF::hwInfo = LkfHw1x8x8::hwInfo; - -void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100080008) { - LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*LKF::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupLKFHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen11/hw_info_lkf.h b/shared/source/gen11/hw_info_lkf.h deleted file mode 100644 index 48b572be5c..0000000000 --- a/shared/source/gen11/hw_info_lkf.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen11/hw_info_gen11.h" - -namespace NEO { - -struct LKF; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN11_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef LKF GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen11/icllp/device_ids_configs_icllp.h b/shared/source/gen11/icllp/device_ids_configs_icllp.h deleted file mode 100644 index 4730f55145..0000000000 --- a/shared/source/gen11/icllp/device_ids_configs_icllp.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector icllpDeviceIds{ - 0xFF05, - 0x8A56, - 0x8A58, - 0x8A5C, - 0x8A5A, - 0x8A50, - 0x8A52, - 0x8A51}; -} // namespace NEO diff --git a/shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl b/shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl deleted file mode 100644 index 7689bd6156..0000000000 --- a/shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { -template <> -bool ProductHelperHw::isAdditionalMediaSamplerProgrammingRequired() const { - return true; -} - -template <> -bool ProductHelperHw::isInitialFlagsProgrammingRequired() const { - return true; -} - -template <> -bool ProductHelperHw::isReturnedCmdSizeForMediaSamplerAdjustmentRequired() const { - return true; -} - -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Icllp; -}; - -} // namespace NEO diff --git a/shared/source/gen11/image_core_gen11.cpp b/shared/source/gen11/image_core_gen11.cpp deleted file mode 100644 index 5b86e5faf8..0000000000 --- a/shared/source/gen11/image_core_gen11.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/image/image_surface_state.h" - -namespace NEO { - -typedef Gen11Family Family; - -#include "shared/source/image/image_skl_and_later.inl" -} // namespace NEO diff --git a/shared/source/gen11/linux/command_stream_receiver_gen11.cpp b/shared/source/gen11/linux/command_stream_receiver_gen11.cpp deleted file mode 100644 index 2290372cef..0000000000 --- a/shared/source/gen11/linux/command_stream_receiver_gen11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/os_interface/linux/device_command_stream.inl" -#include "shared/source/os_interface/linux/drm_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class DrmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen11/linux/direct_submission_gen11.cpp b/shared/source/gen11/linux/direct_submission_gen11.cpp deleted file mode 100644 index 63ae51fbc5..0000000000 --- a/shared/source/gen11/linux/direct_submission_gen11.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/linux/drm_direct_submission.inl" -#include "shared/source/gen11/hw_cmds.h" - -namespace NEO { -using GfxFamily = Gen11Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class DrmDirectSubmission>; -template class DrmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen11/linux/product_helper_ehl.cpp b/shared/source/gen11/linux/product_helper_ehl.cpp deleted file mode 100644 index a777afb5c6..0000000000 --- a/shared/source/gen11/linux/product_helper_ehl.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_ELKHARTLAKE; -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->SliceCount = 1; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen11/linux/product_helper_icllp.cpp b/shared/source/gen11/linux/product_helper_icllp.cpp deleted file mode 100644 index 5448a7f321..0000000000 --- a/shared/source/gen11/linux/product_helper_icllp.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_ICELAKE_LP; -#include "shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->SliceCount = 1; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen11/linux/product_helper_lkf.cpp b/shared/source/gen11/linux/product_helper_lkf.cpp deleted file mode 100644 index 7a4ba1d8c7..0000000000 --- a/shared/source/gen11/linux/product_helper_lkf.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_LAKEFIELD; -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->SliceCount = 1; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen11/lkf/device_ids_configs_lkf.h b/shared/source/gen11/lkf/device_ids_configs_lkf.h deleted file mode 100644 index 1e7287ce32..0000000000 --- a/shared/source/gen11/lkf/device_ids_configs_lkf.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector lkfDeviceIds{0x9840}; -} // namespace NEO diff --git a/shared/source/gen11/preamble_gen11.cpp b/shared/source/gen11/preamble_gen11.cpp deleted file mode 100644 index 3c15a3c0da..0000000000 --- a/shared/source/gen11/preamble_gen11.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/csr_definitions.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/pipe_control_args.h" -#include "shared/source/helpers/pipeline_select_helper.h" -#include "shared/source/helpers/preamble_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen11Family; - -template <> -uint32_t PreambleHelper::getL3Config(const HardwareInfo &hwInfo, bool useSLM) { - uint32_t l3Config = 0; - - switch (hwInfo.platform.eProductFamily) { - case IGFX_ICELAKE_LP: - l3Config = getL3ConfigHelper(useSLM); - break; - default: - l3Config = getL3ConfigHelper(true); - } - return l3Config; -} - -template <> -void PreambleHelper::programPipelineSelect(LinearStream *pCommandStream, - const PipelineSelectArgs &pipelineSelectArgs, - const RootDeviceEnvironment &rootDeviceEnvironment) { - - using PIPELINE_SELECT = typename Family::PIPELINE_SELECT; - - auto pCmd = pCommandStream->getSpaceForCmd(); - PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect; - - auto mask = pipelineSelectEnablePipelineSelectMaskBits | - pipelineSelectMediaSamplerDopClockGateMaskBits | - pipelineSelectMediaSamplerPowerClockGateMaskBits; - - cmd.setMaskBits(mask); - cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); - cmd.setMediaSamplerDopClockGateEnable(!pipelineSelectArgs.mediaSamplerRequired); - cmd.setMediaSamplerPowerClockGateDisable(pipelineSelectArgs.mediaSamplerRequired); - - *pCmd = cmd; -} - -template <> -void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) { - PipeControlArgs args = {}; - if (hwInfo->workaroundTable.flags.waSendMIFLUSHBeforeVFE) { - args.renderTargetCacheFlushEnable = true; - args.depthCacheFlushEnable = true; - args.dcFlushEnable = true; - } - MemorySynchronizationCommands::addSingleBarrier(*pCommandStream, args); -} - -template <> -std::vector PreambleHelper::getSupportedThreadArbitrationPolicies() { - std::vector retVal; - int32_t policySize = sizeof(RowChickenReg4::regDataForArbitrationPolicy) / - sizeof(RowChickenReg4::regDataForArbitrationPolicy[0]); - for (int32_t i = 0; i < policySize; i++) { - retVal.push_back(i); - } - return retVal; -} -template <> -size_t PreambleHelper::getAdditionalCommandsSize(const Device &device) { - size_t totalSize = PreemptionHelper::getRequiredPreambleSize(device); - bool debuggingEnabled = device.getDebugger() != nullptr; - totalSize += getKernelDebuggingCommandsSize(debuggingEnabled); - return totalSize; -} - -template struct PreambleHelper; -} // namespace NEO diff --git a/shared/source/gen11/preemption_gen11.cpp b/shared/source/gen11/preemption_gen11.cpp deleted file mode 100644 index 3c17d6bba8..0000000000 --- a/shared/source/gen11/preemption_gen11.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption.h" -#include "shared/source/command_stream/preemption.inl" -#include "shared/source/gen11/hw_cmds_base.h" - -namespace NEO { - -using GfxFamily = Gen11Family; - -template void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, - PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); -template size_t PreemptionHelper::getRequiredPreambleSize(const Device &device); -template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); -template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); -template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); -template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, bool useFullAddress); -template size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs); -template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); -template size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device); -template void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device); -template void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device); -template void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA *idd, PreemptionMode preemptionMode); - -} // namespace NEO diff --git a/shared/source/gen11/reg_configs.h b/shared/source/gen11/reg_configs.h deleted file mode 100644 index ee8536409c..0000000000 --- a/shared/source/gen11/reg_configs.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/helpers/preamble.h" - -namespace NEO { - -struct Gen11Family; - -template <> -struct L3CNTLREGConfig { - static const uint32_t valueForSLM = 0xA0000720u; - static const uint32_t valueForNoSLM = 0xA0000720u; -}; - -template <> -struct L3CNTLRegisterOffset { - static const uint32_t registerOffset = 0x7034; -}; - -template <> -struct DebugModeRegisterOffset { - enum { - registerOffset = 0x20d8, - debugEnabledValue = (1 << 5) | (1 << 21) - }; -}; - -namespace gen11HdcModeRegister { -const uint32_t address = 0xE5F4; -const uint32_t forceNonCoherentEnableBit = 4; -} // namespace gen11HdcModeRegister - -namespace gen11PowerClockStateRegister { -const uint32_t address = 0x20C8; -const uint32_t minEuCountShift = 0; -const uint32_t maxEuCountShift = 4; -const uint32_t subSliceCountShift = 8; -const uint32_t sliceCountShift = 12; -const uint32_t vmeSliceCount = 1; -const uint32_t enabledValue = 0x80040800u; -const uint32_t disabledValue = 0x80040800u; -} // namespace gen11PowerClockStateRegister -} // namespace NEO diff --git a/shared/source/gen11/state_base_address_gen11.cpp b/shared/source/gen11/state_base_address_gen11.cpp deleted file mode 100644 index 4b3c48e78a..0000000000 --- a/shared/source/gen11/state_base_address_gen11.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/state_base_address.h" -#include "shared/source/helpers/state_base_address_bdw_and_later.inl" -#include "shared/source/helpers/state_base_address_icllp_and_later.inl" - -namespace NEO { -template struct StateBaseAddressHelper; -} diff --git a/shared/source/gen11/tbx_command_stream_receiver_gen11.cpp b/shared/source/gen11/tbx_command_stream_receiver_gen11.cpp deleted file mode 100644 index d7596ae210..0000000000 --- a/shared/source/gen11/tbx_command_stream_receiver_gen11.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { -typedef Gen11Family Family; -static auto gfxCore = IGFX_GEN11_CORE; - -template <> -uint32_t TbxCommandStreamReceiverHw::getMaskAndValueForPollForCompletion() const { - return 0x80; -} - -template <> -bool TbxCommandStreamReceiverHw::getpollNotEqualValueForPollForCompletion() const { - return true; -} - -template <> -void populateFactoryTable>() { - extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory)); - tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw::create; -} - -template class TbxCommandStreamReceiverHw; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen11/windows/command_stream_receiver_gen11.cpp b/shared/source/gen11/windows/command_stream_receiver_gen11.cpp deleted file mode 100644 index c9dc199e58..0000000000 --- a/shared/source/gen11/windows/command_stream_receiver_gen11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/os_interface/windows/device_command_stream.inl" -#include "shared/source/os_interface/windows/wddm_device_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class WddmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen11/windows/direct_submission_gen11.cpp b/shared/source/gen11/windows/direct_submission_gen11.cpp deleted file mode 100644 index 348265d203..0000000000 --- a/shared/source/gen11/windows/direct_submission_gen11.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/windows/wddm_direct_submission.inl" -#include "shared/source/gen11/hw_cmds_base.h" - -namespace NEO { -using GfxFamily = Gen11Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class WddmDirectSubmission>; -template class WddmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen11/windows/gmm_callbacks_gen11.cpp b/shared/source/gen11/windows/gmm_callbacks_gen11.cpp deleted file mode 100644 index 70c00e2332..0000000000 --- a/shared/source/gen11/windows/gmm_callbacks_gen11.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/source/helpers/windows/gmm_callbacks.inl" - -namespace NEO { -template struct DeviceCallbacks; -template struct TTCallbacks; -} // namespace NEO diff --git a/shared/source/gen11/windows/product_helper_ehl.cpp b/shared/source/gen11/windows/product_helper_ehl.cpp deleted file mode 100644 index 2e6b50ca9e..0000000000 --- a/shared/source/gen11/windows/product_helper_ehl.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_ELKHARTLAKE; - -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen11/windows/product_helper_icllp.cpp b/shared/source/gen11/windows/product_helper_icllp.cpp deleted file mode 100644 index f66f9f1f59..0000000000 --- a/shared/source/gen11/windows/product_helper_icllp.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_ICELAKE_LP; - -#include "shared/source/gen11/icllp/os_agnostic_product_helper_icllp.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen11/windows/product_helper_lkf.cpp b/shared/source/gen11/windows/product_helper_lkf.cpp deleted file mode 100644 index c8a613d844..0000000000 --- a/shared/source/gen11/windows/product_helper_lkf.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_LAKEFIELD; - -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen8/CMakeLists.txt b/shared/source/gen8/CMakeLists.txt deleted file mode 100644 index f87b51bba9..0000000000 --- a/shared/source/gen8/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN8) - add_subdirectories() -endif() diff --git a/shared/source/gen8/aub_command_stream_receiver_gen8.cpp b/shared/source/gen8/aub_command_stream_receiver_gen8.cpp deleted file mode 100644 index 3d32fc2422..0000000000 --- a/shared/source/gen8/aub_command_stream_receiver_gen8.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -template <> -void populateFactoryTable>() { - extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory)); - aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw::create; -} - -template class AUBCommandStreamReceiverHw; -} // namespace NEO diff --git a/shared/source/gen8/aub_mapper.h b/shared/source/gen8/aub_mapper.h deleted file mode 100644 index 7659c6c161..0000000000 --- a/shared/source/gen8/aub_mapper.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/aub/aub_mapper_base.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { -struct Gen8Family; - -template <> -struct AUBFamilyMapper { - enum { device = AubMemDump::DeviceValues::Bdw }; - - using AubTraits = AubMemDump::Traits; - - static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; - - static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; - - typedef AubMemDump::AubDump AUB; -}; -} // namespace NEO diff --git a/shared/source/gen8/aub_mem_dump_gen8.cpp b/shared/source/gen8/aub_mem_dump_gen8.cpp deleted file mode 100644 index 35daa7a94d..0000000000 --- a/shared/source/gen8/aub_mem_dump_gen8.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub/aub_helper_bdw_and_later.inl" -#include "shared/source/aub_mem_dump/aub_alloc_dump.inl" -#include "shared/source/aub_mem_dump/aub_mem_dump.inl" -#include "shared/source/gen8/aub_mapper.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" - -namespace AubMemDump { - -enum { - device = DeviceValues::Bdw -}; - -// Instantiate these common template implementations. -template struct AubDump>; -template struct AubDump>; - -template struct AubPageTableHelper32>; -template struct AubPageTableHelper64>; -} // namespace AubMemDump - -namespace NEO { -using Family = Gen8Family; - -static const AubMemDump::LrcaHelperRcs rcs(0x002000); -static const AubMemDump::LrcaHelperBcs bcs(0x022000); -static const AubMemDump::LrcaHelperVcs vcs(0x012000); -static const AubMemDump::LrcaHelperVecs vecs(0x01a000); - -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { - &rcs, - &bcs, - &vcs, - &vecs}; - -const MMIOList AUBFamilyMapper::globalMMIO; - -static const MMIOList mmioListRCS = { - MMIOPair(0x000020d8, 0x00020000), - MMIOPair(AubMemDump::computeRegisterOffset(rcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListBCS = { - MMIOPair(AubMemDump::computeRegisterOffset(bcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVCS = { - MMIOPair(AubMemDump::computeRegisterOffset(vcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVECS = { - MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), -}; - -const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { - &mmioListRCS, - &mmioListBCS, - &mmioListVCS, - &mmioListVECS}; - -template class AubHelperHw; -} // namespace NEO - -namespace AubAllocDump { -using namespace NEO; - -template SurfaceInfo *getDumpSurfaceInfo(GraphicsAllocation &gfxAllocation, const GmmHelper &gmmHelper, DumpFormat dumpFormat); - -template uint32_t getImageSurfaceTypeFromGmmResourceType(GMM_RESOURCE_TYPE gmmResourceType); - -template void dumpBufferInBinFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInBmpFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpBufferInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpAllocation(DumpFormat dumpFormat, GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); -} // namespace AubAllocDump diff --git a/shared/source/gen8/bdw/device_ids_configs_bdw.h b/shared/source/gen8/bdw/device_ids_configs_bdw.h deleted file mode 100644 index 48e47df55e..0000000000 --- a/shared/source/gen8/bdw/device_ids_configs_bdw.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector bdwDeviceIds{ - 0x1602, - 0x160A, - 0x1606, - 0x160E, - 0x160D, - 0x1612, - 0x161A, - 0x1616, - 0x161E, - 0x161D, - 0x1622, - 0x162A, - 0x1626, - 0x162B, - 0x162E, - 0x162D}; -} // namespace NEO diff --git a/shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl b/shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl deleted file mode 100644 index 53f340b5e5..0000000000 --- a/shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Bdw; -}; - -} // namespace NEO diff --git a/shared/source/gen8/command_encoder_gen8.cpp b/shared/source/gen8/command_encoder_gen8.cpp deleted file mode 100644 index e5f1aa8d6d..0000000000 --- a/shared/source/gen8/command_encoder_gen8.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_container/command_encoder.inl" -#include "shared/source/command_container/command_encoder_bdw_and_later.inl" -#include "shared/source/command_container/command_encoder_pre_xe2_hpg_core.inl" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/gen8/reg_configs.h" - -using Family = NEO::Gen8Family; - -#include "shared/source/command_container/command_encoder_heap_addressing.inl" -#include "shared/source/command_container/encode_compute_mode_bdw_and_later.inl" -#include "shared/source/command_container/image_surface_state/compression_params_bdw_and_later.inl" - -namespace NEO { - -template <> -void EncodeSurfaceState::setAuxParamsForMCSCCS(R_SURFACE_STATE *surfaceState, const ReleaseHelper *releaseHelper) { -} - -template <> -void EncodeSurfaceState::setClearColorParams(R_SURFACE_STATE *surfaceState, Gmm *gmm) { -} - -template <> -void EncodeSurfaceState::setFlagsForMediaCompression(R_SURFACE_STATE *surfaceState, Gmm *gmm) { - if (gmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed) { - surfaceState->setAuxiliarySurfaceMode(Family::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); - } -} - -template -size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs) { - return 0u; -} - -template <> -inline size_t EncodeComputeMode::getSizeForComputeMode() { - return 0; -} - -template -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) { -} - -template <> -void EncodeStateBaseAddress::setSbaAddressesForDebugger(NEO::Debugger::SbaAddresses &sbaAddress, const STATE_BASE_ADDRESS &sbaCmd) { - sbaAddress.indirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress(); - sbaAddress.dynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress(); - sbaAddress.generalStateBaseAddress = sbaCmd.getGeneralStateBaseAddress(); - sbaAddress.instructionBaseAddress = sbaCmd.getInstructionBaseAddress(); - sbaAddress.surfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress(); -} - -template <> -void EncodeBatchBufferStartOrEnd::appendBatchBufferStart(MI_BATCH_BUFFER_START &cmd, bool indirect, bool predicate) { -} - -static uint32_t slmSizeId[] = {0, 1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16}; - -template <> -uint32_t EncodeDispatchKernel::alignSlmSize(uint32_t slmSize) { - if (slmSize == 0u) { - return 0u; - } - slmSize = std::max(slmSize, 4096u); - slmSize = Math::nextPowerOfTwo(slmSize); - return slmSize; -} - -template <> -uint32_t EncodeDispatchKernel::computeSlmValues(const HardwareInfo &hwInfo, uint32_t slmSize) { - slmSize += (4 * MemoryConstants::kiloByte - 1); - slmSize = slmSize >> 12; - slmSize = std::min(slmSize, 15u); - slmSize = slmSizeId[slmSize]; - return slmSize; -} - -} // namespace NEO - -#include "shared/source/command_container/command_encoder_enablers.inl" - -namespace NEO { -template struct EncodeL3State; - -template void InOrderPatchCommandHelpers::PatchCmd::patchComputeWalker(uint64_t appendCounterValue); -} // namespace NEO - -#include "shared/source/command_container/implicit_scaling_before_xe_hp.inl" \ No newline at end of file diff --git a/shared/source/gen8/command_stream_receiver_hw_gen8.cpp b/shared/source/gen8/command_stream_receiver_hw_gen8.cpp deleted file mode 100644 index 075ae27e6c..0000000000 --- a/shared/source/gen8/command_stream_receiver_hw_gen8.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl" -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/blit_commands_helper_bdw_and_later.inl" -#include "shared/source/helpers/populate_factory.h" -#include "shared/source/helpers/state_base_address_bdw.inl" -#include "shared/source/memory_manager/allocation_properties.h" - -namespace NEO { -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -template <> -void populateFactoryTable>() { - extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE]; - commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; -} - -template <> -void CommandStreamReceiverHw::setClearSlmWorkAroundParameter(PipeControlArgs &args) { - args.protectedMemoryDisable = true; -} - -template class CommandStreamReceiverHw; -template struct BlitCommandsHelper; - -const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); -const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); -const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit(); -const Family::MEDIA_STATE_FLUSH Family::cmdInitMediaStateFlush = Family::MEDIA_STATE_FLUSH::sInit(); -const Family::MI_BATCH_BUFFER_START Family::cmdInitBatchBufferStart = Family::MI_BATCH_BUFFER_START::sInit(); -const Family::MI_BATCH_BUFFER_END Family::cmdInitBatchBufferEnd = Family::MI_BATCH_BUFFER_END::sInit(); -const Family::PIPE_CONTROL Family::cmdInitPipeControl = Family::PIPE_CONTROL::sInit(); -const Family::MI_SEMAPHORE_WAIT Family::cmdInitMiSemaphoreWait = Family::MI_SEMAPHORE_WAIT::sInit(); -const Family::RENDER_SURFACE_STATE Family::cmdInitRenderSurfaceState = Family::RENDER_SURFACE_STATE::sInit(); -const Family::MI_LOAD_REGISTER_IMM Family::cmdInitLoadRegisterImm = Family::MI_LOAD_REGISTER_IMM::sInit(); -const Family::MI_LOAD_REGISTER_REG Family::cmdInitLoadRegisterReg = Family::MI_LOAD_REGISTER_REG::sInit(); -const Family::MI_LOAD_REGISTER_MEM Family::cmdInitLoadRegisterMem = Family::MI_LOAD_REGISTER_MEM::sInit(); -const Family::MI_STORE_DATA_IMM Family::cmdInitStoreDataImm = Family::MI_STORE_DATA_IMM::sInit(); -const Family::MI_STORE_REGISTER_MEM Family::cmdInitStoreRegisterMem = Family::MI_STORE_REGISTER_MEM::sInit(); -const Family::MI_NOOP Family::cmdInitNoop = Family::MI_NOOP::sInit(); -const Family::MI_REPORT_PERF_COUNT Family::cmdInitReportPerfCount = Family::MI_REPORT_PERF_COUNT::sInit(); -const Family::MI_ATOMIC Family::cmdInitAtomic = Family::MI_ATOMIC::sInit(); -const Family::PIPELINE_SELECT Family::cmdInitPipelineSelect = Family::PIPELINE_SELECT::sInit(); -const Family::MI_ARB_CHECK Family::cmdInitArbCheck = Family::MI_ARB_CHECK::sInit(); -const Family::MEDIA_VFE_STATE Family::cmdInitMediaVfeState = Family::MEDIA_VFE_STATE::sInit(); -const Family::STATE_BASE_ADDRESS Family::cmdInitStateBaseAddress = Family::STATE_BASE_ADDRESS::sInit(); -const Family::MEDIA_SURFACE_STATE Family::cmdInitMediaSurfaceState = Family::MEDIA_SURFACE_STATE::sInit(); -const Family::SAMPLER_STATE Family::cmdInitSamplerState = Family::SAMPLER_STATE::sInit(); -const Family::GPGPU_CSR_BASE_ADDRESS Family::cmdInitGpgpuCsrBaseAddress = Family::GPGPU_CSR_BASE_ADDRESS::sInit(); -const Family::STATE_SIP Family::cmdInitStateSip = Family::STATE_SIP::sInit(); -const Family::BINDING_TABLE_STATE Family::cmdInitBindingTableState = Family::BINDING_TABLE_STATE::sInit(); -const Family::MI_USER_INTERRUPT Family::cmdInitUserInterrupt = Family::MI_USER_INTERRUPT::sInit(); -const Family::XY_BLOCK_COPY_BLT Family::cmdInitXyBlockCopyBlt = Family::XY_BLOCK_COPY_BLT::sInit(); -const Family::XY_SRC_COPY_BLT Family::cmdInitXyCopyBlt = Family::XY_SRC_COPY_BLT::sInit(); -const Family::MI_FLUSH_DW Family::cmdInitMiFlushDw = Family::MI_FLUSH_DW::sInit(); -const Family::XY_COLOR_BLT Family::cmdInitXyColorBlt = Family::XY_COLOR_BLT::sInit(); -} // namespace NEO diff --git a/shared/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp b/shared/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp deleted file mode 100644 index 4c342d3c99..0000000000 --- a/shared/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" - -namespace NEO { -typedef Gen8Family Family; - -template class CommandStreamReceiverSimulatedCommonHw; -} // namespace NEO diff --git a/shared/source/gen8/create_device_command_stream_receiver_gen8.cpp b/shared/source/gen8/create_device_command_stream_receiver_gen8.cpp deleted file mode 100644 index d9bb8735f2..0000000000 --- a/shared/source/gen8/create_device_command_stream_receiver_gen8.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/gen8/hw_cmds.h" - -#include "create_command_stream_receiver.inl" - -namespace NEO { - -template <> -CommandStreamReceiver *createDeviceCommandStreamReceiver(bool withAubDump, - ExecutionEnvironment &executionEnvironment, - uint32_t rootDeviceIndex, - const DeviceBitfield deviceBitfield) { - return createCommandStreamReceiver(withAubDump, executionEnvironment, rootDeviceIndex, deviceBitfield); -} - -} // namespace NEO diff --git a/shared/source/gen8/debugger_gen8.cpp b/shared/source/gen8/debugger_gen8.cpp deleted file mode 100644 index df2c8d4948..0000000000 --- a/shared/source/gen8/debugger_gen8.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/debugger/debugger_l0.inl" -#include "shared/source/debugger/debugger_l0_base.inl" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -struct Gen8Family; -using GfxFamily = Gen8Family; -static auto coreFamily = IGFX_GEN8_CORE; - -template <> -void populateFactoryTable>() { - extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE]; - debuggerL0Factory[coreFamily] = DebuggerL0Hw::allocate; -} -template class DebuggerL0Hw; -} // namespace NEO diff --git a/shared/source/gen8/enable_compiler_product_helper_bdw.cpp b/shared/source/gen8/enable_compiler_product_helper_bdw.cpp deleted file mode 100644 index 1d11c990c7..0000000000 --- a/shared/source/gen8/enable_compiler_product_helper_bdw.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::BDW; -} - -template <> -bool CompilerProductHelperHw::isStatelessToStatefulBufferOffsetSupported() const { - return false; -} - -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030008; -} - -static EnableCompilerProductHelper enableCompilerProductHelperBDW; - -} // namespace NEO diff --git a/shared/source/gen8/enable_family_full_core_gen8.cpp b/shared/source/gen8/enable_family_full_core_gen8.cpp deleted file mode 100644 index 153a58fa7e..0000000000 --- a/shared/source/gen8/enable_family_full_core_gen8.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/debugger/debugger_l0.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/populate_factory.h" - -#include - -namespace NEO { - -extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE]; - -using Family = Gen8Family; -static const auto gfxFamily = IGFX_GEN8_CORE; - -struct EnableCoreGen8 { - EnableCoreGen8() { - gfxCoreHelperFactory[gfxFamily] = GfxCoreHelperHw::create; - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableCoreGen8 enable; -} // namespace NEO diff --git a/shared/source/gen8/enable_gen8.cpp b/shared/source/gen8/enable_gen8.cpp deleted file mode 100644 index adf30547b8..0000000000 --- a/shared/source/gen8/enable_gen8.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/cache_policy_bdw_and_later.inl" -#include "shared/source/helpers/enable_product.inl" -#include "shared/source/os_interface/product_helper.h" - -namespace NEO { - -#ifdef SUPPORT_BDW -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwBDW; -#endif - -} // namespace NEO diff --git a/shared/source/gen8/enable_product_helper_bdw.cpp b/shared/source/gen8/enable_product_helper_bdw.cpp deleted file mode 100644 index 1b7f55ec41..0000000000 --- a/shared/source/gen8/enable_product_helper_bdw.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableBDW; - -} // namespace NEO diff --git a/shared/source/gen8/gfx_core_helper_gen8.cpp b/shared/source/gen8/gfx_core_helper_gen8.cpp deleted file mode 100644 index 9f020bba2d..0000000000 --- a/shared/source/gen8/gfx_core_helper_gen8.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/aub_mapper.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/constants.h" -#include "shared/source/helpers/flat_batch_buffer_helper_hw.inl" -#include "shared/source/helpers/gfx_core_helper_base.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" - -namespace NEO { -typedef Gen8Family Family; - -template <> -size_t GfxCoreHelperHw::getMaxBarrierRegisterPerSlice() const { - return 16; -} - -template <> -size_t GfxCoreHelperHw::getMax3dImageWidthOrHeight() const { - return 2048; -} - -template <> -uint64_t GfxCoreHelperHw::getMaxMemAllocSize() const { - return (2 * MemoryConstants::gigaByte) - (8 * MemoryConstants::kiloByte); -} - -template <> -bool GfxCoreHelperHw::isStatelessToStatefulWithOffsetSupported() const { - return false; -} - -template <> -void MemorySynchronizationCommands::addSingleBarrier(LinearStream &commandStream, PipeControlArgs &args) { - Family::PIPE_CONTROL cmd = Family::cmdInitPipeControl; - MemorySynchronizationCommands::setSingleBarrier(&cmd, args); - - cmd.setDcFlushEnable(true); - - if (debugManager.flags.DoNotFlushCaches.get()) { - cmd.setDcFlushEnable(false); - } - - Family::PIPE_CONTROL *cmdBuffer = commandStream.getSpaceForCmd(); - *cmdBuffer = cmd; -} - -template class GfxCoreHelperHw; -template class FlatBatchBufferHelperHw; -template struct MemorySynchronizationCommands; -template struct LriHelper; -} // namespace NEO diff --git a/shared/source/gen8/hw_cmds.h b/shared/source/gen8/hw_cmds.h deleted file mode 100644 index 836fa8b019..0000000000 --- a/shared/source/gen8/hw_cmds.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_BDW -#include "hw_cmds_bdw.h" -#endif diff --git a/shared/source/gen8/hw_cmds_base.h b/shared/source/gen8/hw_cmds_base.h deleted file mode 100644 index 01874a8478..0000000000 --- a/shared/source/gen8/hw_cmds_base.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/commands/bxml_generator_glue.h" -#include "shared/source/gen8/hw_info.h" -#include "shared/source/helpers/debug_helpers.h" - -#include "igfxfmid.h" - -#include -#include -#include - -// forward declaration for parsing logic -template -struct CmdParse; - -namespace NEO { -struct Gen8 { -#include "shared/source/generated/gen8/hw_cmds_generated_gen8.inl" - - static constexpr bool supportsSampler = true; - static constexpr bool isUsingGenericMediaStateClear = true; - static constexpr bool isUsingMiMemFence = false; - static constexpr bool isUsingMiSetPredicate = false; - static constexpr bool isUsingMiMathMocs = false; - static constexpr uint32_t bcsEngineCount = 1u; - static constexpr uint32_t timestampPacketCount = 1u; - - struct FrontEndStateSupport { - static constexpr bool scratchSize = true; - static constexpr bool privateScratchSize = false; - static constexpr bool computeDispatchAllWalker = false; - static constexpr bool disableEuFusion = false; - static constexpr bool disableOverdispatch = false; - static constexpr bool singleSliceDispatchCcsMode = false; - }; - - struct StateComputeModeStateSupport { - static constexpr bool threadArbitrationPolicy = false; - static constexpr bool coherencyRequired = true; - static constexpr bool largeGrfMode = false; - static constexpr bool zPassAsyncComputeThreadLimit = false; - static constexpr bool pixelAsyncComputeThreadLimit = false; - static constexpr bool devicePreemptionMode = false; - }; - - struct StateBaseAddressStateSupport { - static constexpr bool bindingTablePoolBaseAddress = false; - }; - - struct PipelineSelectStateSupport { - static constexpr bool mediaSamplerDopClockGate = false; - static constexpr bool systolicMode = false; - }; - - struct PreemptionDebugSupport { - static constexpr bool preemptionMode = true; - static constexpr bool stateSip = true; - static constexpr bool csrSurface = false; - }; - - struct DataPortBindlessSurfaceExtendedMessageDescriptor { - union { - struct { - uint32_t bindlessSurfaceOffset : 20; - uint32_t reserved : 1; - uint32_t executionUnitExtendedMessageDescriptorDefinition : 11; - }; - uint32_t packed; - }; - - DataPortBindlessSurfaceExtendedMessageDescriptor() { - packed = 0; - } - - void setBindlessSurfaceOffset(uint32_t offsetInBindlessSurfaceHeapInBytes) { - bindlessSurfaceOffset = offsetInBindlessSurfaceHeapInBytes >> 6; - } - - uint32_t getBindlessSurfaceOffsetToPatch() { - return bindlessSurfaceOffset << 12; - } - }; - - static constexpr uint32_t cacheLineSize = 0x40; - static constexpr bool isDcFlushAllowed = true; - - static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), ""); -}; -struct Gen8Family : public Gen8 { - using Parse = CmdParse; - using GfxFamily = Gen8Family; - using DefaultWalkerType = GPGPU_WALKER; - using FrontEndStateCommand = MEDIA_VFE_STATE; - using XY_BLOCK_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; - using TimestampPacketType = uint32_t; - static const GPGPU_WALKER cmdInitGpgpuWalker; - static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; - static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; - static const MEDIA_STATE_FLUSH cmdInitMediaStateFlush; - static const MI_BATCH_BUFFER_END cmdInitBatchBufferEnd; - static const MI_BATCH_BUFFER_START cmdInitBatchBufferStart; - static const PIPE_CONTROL cmdInitPipeControl; - static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait; - static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState; - static const MI_LOAD_REGISTER_IMM cmdInitLoadRegisterImm; - static const MI_LOAD_REGISTER_REG cmdInitLoadRegisterReg; - static const MI_LOAD_REGISTER_MEM cmdInitLoadRegisterMem; - static const MI_STORE_DATA_IMM cmdInitStoreDataImm; - static const MI_STORE_REGISTER_MEM cmdInitStoreRegisterMem; - static const MI_NOOP cmdInitNoop; - static const MI_REPORT_PERF_COUNT cmdInitReportPerfCount; - static const MI_ATOMIC cmdInitAtomic; - static const PIPELINE_SELECT cmdInitPipelineSelect; - static const MI_ARB_CHECK cmdInitArbCheck; - static const MEDIA_VFE_STATE cmdInitMediaVfeState; - static const STATE_BASE_ADDRESS cmdInitStateBaseAddress; - static const MEDIA_SURFACE_STATE cmdInitMediaSurfaceState; - static const SAMPLER_STATE cmdInitSamplerState; - static const GPGPU_CSR_BASE_ADDRESS cmdInitGpgpuCsrBaseAddress; - static const STATE_SIP cmdInitStateSip; - static const BINDING_TABLE_STATE cmdInitBindingTableState; - static const MI_USER_INTERRUPT cmdInitUserInterrupt; - static const XY_BLOCK_COPY_BLT cmdInitXyBlockCopyBlt; - static const XY_SRC_COPY_BLT cmdInitXyCopyBlt; - static const MI_FLUSH_DW cmdInitMiFlushDw; - static const XY_COLOR_BLT cmdInitXyColorBlt; - static constexpr bool isQwordInOrderCounter = false; - static constexpr bool walkerPostSyncSupport = false; - static constexpr size_t indirectDataAlignment = GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE; - - static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) { - return cmdSetBaseFamily == IGFX_GEN8_CORE; - } - - template - static constexpr size_t getInterfaceDescriptorSize() { - return sizeof(INTERFACE_DESCRIPTOR_DATA); - } - - template - static WalkerType getInitGpuWalker() { - return cmdInitGpgpuWalker; - } - - template - static InterfaceDescriptorType getInitInterfaceDescriptor() { - return cmdInitInterfaceDescriptorData; - } - - template - static constexpr bool isHeaplessMode() { - return false; - } - - using WalkerVariant = std::variant; -}; - -} // namespace NEO diff --git a/shared/source/gen8/hw_cmds_bdw.h b/shared/source/gen8/hw_cmds_bdw.h deleted file mode 100644 index c8d9380e58..0000000000 --- a/shared/source/gen8/hw_cmds_bdw.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -#include - -namespace NEO { - -struct BDW : public Gen8Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 2; - static const uint32_t maxSubslicesSupported = 6; - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; -class BdwHw1x2x6 : public BDW { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -class BdwHw1x3x6 : public BDW { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -class BdwHw1x3x8 : public BDW { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -class BdwHw2x3x8 : public BDW { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen8/hw_info.h b/shared/source/gen8/hw_info.h deleted file mode 100644 index 7fb1567090..0000000000 --- a/shared/source/gen8/hw_info.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_BDW -#include "hw_info_bdw.h" -#endif diff --git a/shared/source/gen8/hw_info_bdw.cpp b/shared/source/gen8/hw_info_bdw.cpp deleted file mode 100644 index a201aaf691..0000000000 --- a/shared/source/gen8/hw_info_bdw.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "bdw"; - -const PLATFORM BDW::platform = { - IGFX_BROADWELL, - PCH_UNKNOWN, - IGFX_GEN8_CORE, - IGFX_GEN8_CORE, - PLATFORM_NONE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable BDW::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {50000, 5000, 200000, 0, true, true, true, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 80, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::Disabled, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Bdw, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(BDW::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - true, // ftrSvm - true, // ftrSupportsCoherency - false, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - false, // ftr64KBpages - true, // instrumentationEnabled - false, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable BDW::workaroundTable = {}; -FeatureTable BDW::featureTable = {}; - -void BDW::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waDisableLSQCROPERFforOCL = true; - workaroundTable->flags.waUseVAlign16OnTileXYBpp816 = true; - workaroundTable->flags.waModifyVFEStateAfterGPGPUPreemption = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; -} - -void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 336; - gtSysInfo->TotalHsThreads = 336; - gtSysInfo->TotalDsThreads = 336; - gtSysInfo->TotalGsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = BDW::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = BDW::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = BDW::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo BdwHw1x2x6::hwInfo = { - &BDW::platform, - &BDW::featureTable, - &BDW::workaroundTable, - &BdwHw1x2x6::gtSystemInfo, - BDW::capabilityTable}; - -GT_SYSTEM_INFO BdwHw1x2x6::gtSystemInfo = {0}; -void BdwHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo BdwHw1x3x6::hwInfo = { - &BDW::platform, - &BDW::featureTable, - &BDW::workaroundTable, - &BdwHw1x3x6::gtSystemInfo, - BDW::capabilityTable}; -GT_SYSTEM_INFO BdwHw1x3x6::gtSystemInfo = {0}; -void BdwHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo BdwHw1x3x8::hwInfo = { - &BDW::platform, - &BDW::featureTable, - &BDW::workaroundTable, - &BdwHw1x3x8::gtSystemInfo, - BDW::capabilityTable}; -GT_SYSTEM_INFO BdwHw1x3x8::gtSystemInfo = {0}; -void BdwHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo BdwHw2x3x8::hwInfo = { - &BDW::platform, - &BDW::featureTable, - &BDW::workaroundTable, - &BdwHw2x3x8::gtSystemInfo, - BDW::capabilityTable}; -GT_SYSTEM_INFO BdwHw2x3x8::gtSystemInfo = {0}; -void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 2; - gtSysInfo->L3CacheSizeInKb = 1536; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; -}; - -const HardwareInfo BDW::hwInfo = BdwHw1x3x8::hwInfo; - -void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x200030008) { - BdwHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030008) { - BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - BdwHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100020006) { - BdwHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*BDW::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupBDWHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen8/hw_info_bdw.h b/shared/source/gen8/hw_info_bdw.h deleted file mode 100644 index 5686f87305..0000000000 --- a/shared/source/gen8/hw_info_bdw.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen8.h" - -namespace NEO { - -struct BDW; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN8_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef BDW GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen8/hw_info_gen8.cpp b/shared/source/gen8/hw_info_gen8.cpp deleted file mode 100644 index c7797108a3..0000000000 --- a/shared/source/gen8/hw_info_gen8.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_info_gen8.h" - -namespace NEO { -const char *GfxFamilyMapper::name = "Gen8"; -} // namespace NEO diff --git a/shared/source/gen8/hw_info_gen8.h b/shared/source/gen8/hw_info_gen8.h deleted file mode 100644 index fc5eef2a72..0000000000 --- a/shared/source/gen8/hw_info_gen8.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/helpers/hw_mapper.h" - -namespace NEO { - -struct Gen8Family; - -template <> -struct GfxFamilyMapper { - typedef Gen8Family GfxFamily; - static const char *name; -}; -} // namespace NEO diff --git a/shared/source/gen8/image_core_gen8.cpp b/shared/source/gen8/image_core_gen8.cpp deleted file mode 100644 index c396cfd2e4..0000000000 --- a/shared/source/gen8/image_core_gen8.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/image/image_surface_state.h" - -namespace NEO { - -typedef Gen8Family Family; - -template <> -void setMipTailStartLod(Family::RENDER_SURFACE_STATE *surfaceState, Gmm *gmm) {} -} // namespace NEO diff --git a/shared/source/gen8/linux/command_stream_receiver_gen8.cpp b/shared/source/gen8/linux/command_stream_receiver_gen8.cpp deleted file mode 100644 index bc04e0e33a..0000000000 --- a/shared/source/gen8/linux/command_stream_receiver_gen8.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/os_interface/linux/device_command_stream.inl" -#include "shared/source/os_interface/linux/drm_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class DrmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen8/linux/direct_submission_gen8.cpp b/shared/source/gen8/linux/direct_submission_gen8.cpp deleted file mode 100644 index 14f1f2edcb..0000000000 --- a/shared/source/gen8/linux/direct_submission_gen8.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/linux/drm_direct_submission.inl" -#include "shared/source/gen8/hw_cmds.h" - -namespace NEO { -using GfxFamily = Gen8Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class DrmDirectSubmission>; -template class DrmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen8/linux/product_helper_bdw.cpp b/shared/source/gen8/linux/product_helper_bdw.cpp deleted file mode 100644 index bafed921ae..0000000000 --- a/shared/source/gen8/linux/product_helper_bdw.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_BROADWELL; - -#include "shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - // There is no interface to read total slice count from drm/i915, so we - // derive this from the number of EUs and subslices. - // otherwise there is one slice. - if (gtSystemInfo->SubSliceCount > 3) { - gtSystemInfo->SliceCount = 2; - } else { - gtSystemInfo->SliceCount = 1; - } - - if (hwInfo->platform.usDeviceID == IBDW_GT3_HALO_MOBL_DEVICE_F0_ID || - hwInfo->platform.usDeviceID == IBDW_GT3_SERV_DEVICE_F0_ID) { - gtSystemInfo->EdramSizeInKb = 128 * 1024; - } - return 0; -} - -template class ProductHelperHw; - -} // namespace NEO diff --git a/shared/source/gen8/preamble_gen8.cpp b/shared/source/gen8/preamble_gen8.cpp deleted file mode 100644 index eb773c54ed..0000000000 --- a/shared/source/gen8/preamble_gen8.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/pipe_control_args.h" -#include "shared/source/helpers/pipeline_select_helper.h" -#include "shared/source/helpers/preamble_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen8Family; - -template <> -void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) { - PipeControlArgs args = {}; - args.dcFlushEnable = true; - MemorySynchronizationCommands::addSingleBarrier(*pCommandStream, args); -} - -template <> -uint32_t PreambleHelper::getL3Config(const HardwareInfo &hwInfo, bool useSLM) { - uint32_t l3Config = 0; - - switch (hwInfo.platform.eProductFamily) { - case IGFX_BROADWELL: - l3Config = getL3ConfigHelper(useSLM); - break; - default: - l3Config = getL3ConfigHelper(true); - } - return l3Config; -} - -template <> -void PreambleHelper::programPipelineSelect(LinearStream *pCommandStream, - const PipelineSelectArgs &pipelineSelectArgs, - const RootDeviceEnvironment &rootDeviceEnvironment) { - - using PIPELINE_SELECT = typename Family::PIPELINE_SELECT; - auto pCmd = pCommandStream->getSpaceForCmd(); - PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect; - - cmd.setMaskBits(pipelineSelectEnablePipelineSelectMaskBits); - cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); - - *pCmd = cmd; -} - -template <> -size_t PreambleHelper::getAdditionalCommandsSize(const Device &device) { - bool debuggingEnabled = device.getDebugger() != nullptr; - return getKernelDebuggingCommandsSize(debuggingEnabled); -} - -template struct PreambleHelper; -} // namespace NEO diff --git a/shared/source/gen8/preemption_gen8.cpp b/shared/source/gen8/preemption_gen8.cpp deleted file mode 100644 index ac54494414..0000000000 --- a/shared/source/gen8/preemption_gen8.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption.h" -#include "shared/source/command_stream/preemption.inl" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/register_offsets.h" - -namespace NEO { - -using GfxFamily = Gen8Family; - -template <> -struct PreemptionConfig { - static constexpr uint32_t mmioAddress = 0x2248; - static constexpr uint32_t maskVal = 0; - static constexpr uint32_t maskShift = 0; - static constexpr uint32_t mask = 0; - - static constexpr uint32_t threadGroupVal = 0; - static constexpr uint32_t cmdLevelVal = (1 << 2); - static constexpr uint32_t midThreadVal = 0; -}; - -template <> -void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode, - GraphicsAllocation *preemptionCsr) { - if (newPreemptionMode == oldPreemptionMode) { - return; - } - - uint32_t regVal = 0; - if (newPreemptionMode == PreemptionMode::ThreadGroup) { - regVal = PreemptionConfig::threadGroupVal; - } else { - regVal = PreemptionConfig::cmdLevelVal; - } - - LriHelper::program(&cmdStream, PreemptionConfig::mmioAddress, regVal, false, false); -} - -template <> -size_t PreemptionHelper::getRequiredPreambleSize(const Device &device) { - return 0; -} - -template <> -size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs) { - return 0; -} - -template <> -void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) { -} - -template <> -void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr) { -} - -template <> -void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context) { -} - -template <> -void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, bool useFullAddress) { -} - -template <> -size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t size = 0; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - size += 2 * sizeof(MI_LOAD_REGISTER_IMM); - } - } - return size; -} - -template <> -void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - LriHelper::program(pCommandStream, - RegisterOffsets::csGprR0, - RegisterConstants::gpgpuWalkerCookieValueBeforeWalker, - false, - false); - } - } -} - -template <> -void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - LriHelper::program(pCommandStream, - RegisterOffsets::csGprR0, - RegisterConstants::gpgpuWalkerCookieValueAfterWalker, - false, - false); - } - } -} - -template <> -void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA *idd, PreemptionMode preemptionMode) { -} - -template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); -} // namespace NEO diff --git a/shared/source/gen8/reg_configs.h b/shared/source/gen8/reg_configs.h deleted file mode 100644 index 09794aa376..0000000000 --- a/shared/source/gen8/reg_configs.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/helpers/preamble.h" - -namespace NEO { - -struct Gen8Family; -template <> -struct L3CNTLREGConfig { - static const uint32_t valueForSLM = 0x60000321u; - static const uint32_t valueForNoSLM = 0x80000340u; -}; - -template <> -struct L3CNTLRegisterOffset { - static const uint32_t registerOffset = 0x7034; -}; -} // namespace NEO diff --git a/shared/source/gen8/state_base_address_gen8.cpp b/shared/source/gen8/state_base_address_gen8.cpp deleted file mode 100644 index 5a94be14d0..0000000000 --- a/shared/source/gen8/state_base_address_gen8.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/state_base_address.h" -#include "shared/source/helpers/state_base_address_bdw.inl" -#include "shared/source/helpers/state_base_address_bdw_and_later.inl" - -namespace NEO { -using Family = Gen8Family; - -template <> -void StateBaseAddressHelper::programStateBaseAddress( - StateBaseAddressHelperArgs &args) { - - *args.stateBaseAddressCmd = Family::cmdInitStateBaseAddress; - - if (args.sbaProperties) { - if (args.sbaProperties->dynamicStateBaseAddress.value != StreamProperty64::initValue) { - args.stateBaseAddressCmd->setDynamicStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setDynamicStateBufferSizeModifyEnable(true); - args.stateBaseAddressCmd->setDynamicStateBaseAddress(static_cast(args.sbaProperties->dynamicStateBaseAddress.value)); - args.stateBaseAddressCmd->setDynamicStateBufferSize(static_cast(args.sbaProperties->dynamicStateSize.value)); - } - if (args.sbaProperties->surfaceStateBaseAddress.value != StreamProperty64::initValue) { - args.stateBaseAddressCmd->setSurfaceStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setSurfaceStateBaseAddress(static_cast(args.sbaProperties->surfaceStateBaseAddress.value)); - } - if (args.sbaProperties->statelessMocs.value != StreamProperty::initValue) { - args.statelessMocsIndex = static_cast(args.sbaProperties->statelessMocs.value); - } - } - - if (args.dsh) { - args.stateBaseAddressCmd->setDynamicStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setDynamicStateBufferSizeModifyEnable(true); - args.stateBaseAddressCmd->setDynamicStateBaseAddress(args.dsh->getHeapGpuBase()); - args.stateBaseAddressCmd->setDynamicStateBufferSize(args.dsh->getHeapSizeInPages()); - } - - StateBaseAddressHelper::appendIohParameters(args); - - if (args.ssh) { - args.stateBaseAddressCmd->setSurfaceStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setSurfaceStateBaseAddress(args.ssh->getHeapGpuBase()); - } - - if (args.setInstructionStateBaseAddress) { - args.stateBaseAddressCmd->setInstructionBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setInstructionBaseAddress(args.instructionHeapBaseAddress); - args.stateBaseAddressCmd->setInstructionBufferSizeModifyEnable(true); - args.stateBaseAddressCmd->setInstructionBufferSize(MemoryConstants::sizeOf4GBinPageEntities); - args.stateBaseAddressCmd->setInstructionMemoryObjectControlState(args.gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER)); - } - - if (args.setGeneralStateBaseAddress) { - args.stateBaseAddressCmd->setGeneralStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setGeneralStateBufferSizeModifyEnable(true); - // GSH must be set to 0 for stateless - args.stateBaseAddressCmd->setGeneralStateBaseAddress(args.gmmHelper->decanonize(args.generalStateBaseAddress)); - args.stateBaseAddressCmd->setGeneralStateBufferSize(0xfffff); - } - - if (args.overrideSurfaceStateBaseAddress) { - args.stateBaseAddressCmd->setSurfaceStateBaseAddressModifyEnable(true); - args.stateBaseAddressCmd->setSurfaceStateBaseAddress(args.surfaceStateBaseAddress); - } - - if (debugManager.flags.OverrideStatelessMocsIndex.get() != -1) { - args.statelessMocsIndex = debugManager.flags.OverrideStatelessMocsIndex.get(); - } - - args.statelessMocsIndex = args.statelessMocsIndex << 1; - - GmmHelper::applyMocsEncryptionBit(args.statelessMocsIndex); - - args.stateBaseAddressCmd->setStatelessDataPortAccessMemoryObjectControlState(args.statelessMocsIndex); - - appendStateBaseAddressParameters(args); -} -template struct StateBaseAddressHelper; -} // namespace NEO diff --git a/shared/source/gen8/tbx_command_stream_receiver_gen8.cpp b/shared/source/gen8/tbx_command_stream_receiver_gen8.cpp deleted file mode 100644 index 8e8dbcb13a..0000000000 --- a/shared/source/gen8/tbx_command_stream_receiver_gen8.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -typedef Gen8Family Family; -static auto gfxCore = IGFX_GEN8_CORE; - -template <> -void populateFactoryTable>() { - extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory)); - tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw::create; -} - -template class TbxCommandStreamReceiverHw; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen8/windows/command_stream_receiver_gen8.cpp b/shared/source/gen8/windows/command_stream_receiver_gen8.cpp deleted file mode 100644 index 14d6af0586..0000000000 --- a/shared/source/gen8/windows/command_stream_receiver_gen8.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/os_interface/windows/device_command_stream.inl" -#include "shared/source/os_interface/windows/wddm_device_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class WddmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen8/windows/direct_submission_gen8.cpp b/shared/source/gen8/windows/direct_submission_gen8.cpp deleted file mode 100644 index 3d4f8dd5bb..0000000000 --- a/shared/source/gen8/windows/direct_submission_gen8.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/windows/wddm_direct_submission.inl" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/gen8/hw_cmds_base.h" - -namespace NEO { -using GfxFamily = Gen8Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class WddmDirectSubmission>; -template class WddmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen8/windows/gmm_callbacks_gen8.cpp b/shared/source/gen8/windows/gmm_callbacks_gen8.cpp deleted file mode 100644 index d886f07555..0000000000 --- a/shared/source/gen8/windows/gmm_callbacks_gen8.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/source/helpers/windows/gmm_callbacks.inl" - -namespace NEO { -template struct DeviceCallbacks; -template struct TTCallbacks; -} // namespace NEO diff --git a/shared/source/gen8/windows/product_helper_bdw.cpp b/shared/source/gen8/windows/product_helper_bdw.cpp deleted file mode 100644 index 599502e8e5..0000000000 --- a/shared/source/gen8/windows/product_helper_bdw.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_BROADWELL; - -#include "shared/source/gen8/bdw/os_agnostic_product_helper_bdw.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen9/CMakeLists.txt b/shared/source/gen9/CMakeLists.txt deleted file mode 100644 index 554a28bcb9..0000000000 --- a/shared/source/gen9/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(SUPPORT_GEN9) - add_subdirectories() -endif() diff --git a/shared/source/gen9/aub_command_stream_receiver_gen9.cpp b/shared/source/gen9/aub_command_stream_receiver_gen9.cpp deleted file mode 100644 index 9dbecfa2d2..0000000000 --- a/shared/source/gen9/aub_command_stream_receiver_gen9.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -template <> -void populateFactoryTable>() { - extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory)); - aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw::create; -} - -template class AUBCommandStreamReceiverHw; -} // namespace NEO diff --git a/shared/source/gen9/aub_mapper.h b/shared/source/gen9/aub_mapper.h deleted file mode 100644 index 8935a91c25..0000000000 --- a/shared/source/gen9/aub_mapper.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/aub/aub_mapper_base.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { -struct Gen9Family; - -template <> -struct AUBFamilyMapper { - enum { device = AubMemDump::DeviceValues::Skl }; - - using AubTraits = AubMemDump::Traits; - - static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; - - static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; - - typedef AubMemDump::AubDump AUB; -}; -} // namespace NEO diff --git a/shared/source/gen9/aub_mem_dump_gen9.cpp b/shared/source/gen9/aub_mem_dump_gen9.cpp deleted file mode 100644 index c7a1dc988e..0000000000 --- a/shared/source/gen9/aub_mem_dump_gen9.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub/aub_helper_bdw_and_later.inl" -#include "shared/source/aub_mem_dump/aub_alloc_dump.inl" -#include "shared/source/aub_mem_dump/aub_mem_dump.inl" -#include "shared/source/gen9/aub_mapper.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" - -namespace AubMemDump { - -enum { - device = DeviceValues::Skl -}; - -// Instantiate these common template implementations. -template struct AubDump>; -template struct AubDump>; - -template struct AubPageTableHelper32>; -template struct AubPageTableHelper64>; -} // namespace AubMemDump - -namespace NEO { -using Family = Gen9Family; - -static const AubMemDump::LrcaHelperRcs rcs(0x002000); -static const AubMemDump::LrcaHelperBcs bcs(0x022000); -static const AubMemDump::LrcaHelperVcs vcs(0x012000); -static const AubMemDump::LrcaHelperVecs vecs(0x01a000); - -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { - &rcs, - &bcs, - &vcs, - &vecs}; - -const MMIOList AUBFamilyMapper::globalMMIO; - -static const MMIOList mmioListRCS = { - MMIOPair(0x000020d8, 0x00020000), - MMIOPair(AubMemDump::computeRegisterOffset(rcs.mmioBase, 0x229c), 0xffff8280), - MMIOPair(0x0000C800, 0x00000009), - MMIOPair(0x0000C804, 0x00000038), - MMIOPair(0x0000C808, 0x0000003B), - MMIOPair(0x0000C80C, 0x00000039), - MMIOPair(0x0000C810, 0x00000037), - MMIOPair(0x0000C814, 0x00000039), - MMIOPair(0x0000C818, 0x00000037), - MMIOPair(0x0000C81C, 0x0000001B), - MMIOPair(0x0000C820, 0x00060037), - MMIOPair(0x0000C824, 0x00000032), - MMIOPair(0x0000C828, 0x00000033), - MMIOPair(0x0000C82C, 0x0000003B), -}; - -static const MMIOList mmioListBCS = { - MMIOPair(AubMemDump::computeRegisterOffset(bcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVCS = { - MMIOPair(AubMemDump::computeRegisterOffset(vcs.mmioBase, 0x229c), 0xffff8280), -}; - -static const MMIOList mmioListVECS = { - MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), -}; - -const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { - &mmioListRCS, - &mmioListBCS, - &mmioListVCS, - &mmioListVECS}; - -template class AubHelperHw; -} // namespace NEO - -namespace AubAllocDump { -using namespace NEO; - -template SurfaceInfo *getDumpSurfaceInfo(GraphicsAllocation &gfxAllocation, const GmmHelper &gmmHelper, DumpFormat dumpFormat); - -template uint32_t getImageSurfaceTypeFromGmmResourceType(GMM_RESOURCE_TYPE gmmResourceType); - -template void dumpBufferInBinFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInBmpFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpBufferInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpImageInTreFormat(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); - -template void dumpAllocation(DumpFormat dumpFormat, GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context); -} // namespace AubAllocDump diff --git a/shared/source/gen9/bxt/device_ids_configs_bxt.h b/shared/source/gen9/bxt/device_ids_configs_bxt.h deleted file mode 100644 index c4ab6ed9d0..0000000000 --- a/shared/source/gen9/bxt/device_ids_configs_bxt.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector bxtDeviceIds{ - 0x9906, - 0x9907, - 0x0A84, - 0x5A84, - 0x5A85, - 0x1A85, - 0x1A84, - 0x9908}; -} // namespace NEO diff --git a/shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl b/shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl deleted file mode 100644 index 598e1fe4ea..0000000000 --- a/shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Bxt; -}; - -} // namespace NEO diff --git a/shared/source/gen9/cfl/device_ids_configs_cfl.h b/shared/source/gen9/cfl/device_ids_configs_cfl.h deleted file mode 100644 index 368bb8b7c6..0000000000 --- a/shared/source/gen9/cfl/device_ids_configs_cfl.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector cflDeviceIds{ - 0x3E90, - 0x3E93, - 0x3E99, - 0x3E92, - 0x3E9B, - 0x3E94, - 0x3E91, - 0x3E96, - 0x3E9A, - 0x3EA9, - 0x3E98, - 0x3E95, - 0x3EA6, - 0x3EA7, - 0x3EA8, - 0x3EA5, - 0x9BAB, - 0x9BA0, - 0x9BC0}; - -const std::vector whlDeviceIds{ - 0x3EA1, - 0x3EA3, - 0x3EA4, - 0x3EA0, - 0x3EA2}; - -const std::vector cmlDeviceIds{ - 0x9B21, - 0x9B41, - 0x9BA2, - 0x9BA4, - 0x9BA5, - 0x9BA8, - 0x9BAA, - 0x9BAC, - 0x9BC2, - 0x9BC4, - 0x9BC5, - 0x9BC6, - 0x9BC8, - 0x9BCA, - 0x9BCB, - 0x9BCC, - 0x9BE6, - 0x9BF6}; -} // namespace NEO diff --git a/shared/source/gen9/cfl/os_agnostic_product_helper_cfl.inl b/shared/source/gen9/cfl/os_agnostic_product_helper_cfl.inl deleted file mode 100644 index 92d8428b52..0000000000 --- a/shared/source/gen9/cfl/os_agnostic_product_helper_cfl.inl +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { - -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Cfl; -}; - -} // namespace NEO diff --git a/shared/source/gen9/command_encoder_gen9.cpp b/shared/source/gen9/command_encoder_gen9.cpp deleted file mode 100644 index ca44111503..0000000000 --- a/shared/source/gen9/command_encoder_gen9.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_container/command_encoder.inl" -#include "shared/source/command_container/command_encoder_bdw_and_later.inl" -#include "shared/source/command_container/command_encoder_pre_xe2_hpg_core.inl" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/gen9/reg_configs.h" - -using Family = NEO::Gen9Family; - -#include "shared/source/command_container/command_encoder_heap_addressing.inl" -#include "shared/source/command_container/encode_compute_mode_bdw_and_later.inl" -#include "shared/source/command_container/image_surface_state/compression_params_bdw_and_later.inl" - -#include "stream_properties.inl" - -namespace NEO { -template <> -void EncodeSurfaceState::setAuxParamsForMCSCCS(R_SURFACE_STATE *surfaceState, const ReleaseHelper *releaseHelper) { -} - -template <> -void EncodeSurfaceState::setClearColorParams(R_SURFACE_STATE *surfaceState, Gmm *gmm) { -} - -template <> -void EncodeSurfaceState::setFlagsForMediaCompression(R_SURFACE_STATE *surfaceState, Gmm *gmm) { - if (gmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed) { - surfaceState->setAuxiliarySurfaceMode(Family::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); - } -} -template -size_t EncodeComputeMode::getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs) { - return sizeof(typename Family::PIPE_CONTROL) + sizeof(typename Family::MI_LOAD_REGISTER_IMM); -} - -template <> -inline size_t EncodeComputeMode::getSizeForComputeMode() { - return 0; -} - -template -void EncodeComputeMode::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, - const RootDeviceEnvironment &rootDeviceEnvironment) { - using PIPE_CONTROL = typename Family::PIPE_CONTROL; - UNRECOVERABLE_IF(properties.threadArbitrationPolicy.value == ThreadArbitrationPolicy::NotPresent); - - if (properties.threadArbitrationPolicy.isDirty) { - PipeControlArgs args; - args.csStallOnly = true; - MemorySynchronizationCommands::addSingleBarrier(csr, args); - - LriHelper::program(&csr, - DebugControlReg2::address, - DebugControlReg2::getRegData(properties.threadArbitrationPolicy.value), - false, - false); - } -} - -} // namespace NEO - -#include "shared/source/command_container/command_encoder_enablers.inl" - -namespace NEO { -template struct EncodeL3State; - -template void InOrderPatchCommandHelpers::PatchCmd::patchComputeWalker(uint64_t appendCounterValue); -} // namespace NEO - -#include "shared/source/command_container/implicit_scaling_before_xe_hp.inl" diff --git a/shared/source/gen9/command_stream_receiver_hw_gen9.cpp b/shared/source/gen9/command_stream_receiver_hw_gen9.cpp deleted file mode 100644 index 7da909c5ba..0000000000 --- a/shared/source/gen9/command_stream_receiver_hw_gen9.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl" -#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl" -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/blit_commands_helper_bdw_and_later.inl" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -template <> -void populateFactoryTable>() { - extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE]; - commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; -} - -template class CommandStreamReceiverHw; -template struct BlitCommandsHelper; - -const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); -const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); -const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit(); -const Family::MEDIA_STATE_FLUSH Family::cmdInitMediaStateFlush = Family::MEDIA_STATE_FLUSH::sInit(); -const Family::MI_BATCH_BUFFER_START Family::cmdInitBatchBufferStart = Family::MI_BATCH_BUFFER_START::sInit(); -const Family::MI_BATCH_BUFFER_END Family::cmdInitBatchBufferEnd = Family::MI_BATCH_BUFFER_END::sInit(); -const Family::PIPE_CONTROL Family::cmdInitPipeControl = Family::PIPE_CONTROL::sInit(); -const Family::MI_SEMAPHORE_WAIT Family::cmdInitMiSemaphoreWait = Family::MI_SEMAPHORE_WAIT::sInit(); -const Family::RENDER_SURFACE_STATE Family::cmdInitRenderSurfaceState = Family::RENDER_SURFACE_STATE::sInit(); -const Family::MI_LOAD_REGISTER_IMM Family::cmdInitLoadRegisterImm = Family::MI_LOAD_REGISTER_IMM::sInit(); -const Family::MI_LOAD_REGISTER_REG Family::cmdInitLoadRegisterReg = Family::MI_LOAD_REGISTER_REG::sInit(); -const Family::MI_LOAD_REGISTER_MEM Family::cmdInitLoadRegisterMem = Family::MI_LOAD_REGISTER_MEM::sInit(); -const Family::MI_STORE_DATA_IMM Family::cmdInitStoreDataImm = Family::MI_STORE_DATA_IMM::sInit(); -const Family::MI_STORE_REGISTER_MEM Family::cmdInitStoreRegisterMem = Family::MI_STORE_REGISTER_MEM::sInit(); -const Family::MI_NOOP Family::cmdInitNoop = Family::MI_NOOP::sInit(); -const Family::MI_REPORT_PERF_COUNT Family::cmdInitReportPerfCount = Family::MI_REPORT_PERF_COUNT::sInit(); -const Family::MI_ATOMIC Family::cmdInitAtomic = Family::MI_ATOMIC::sInit(); -const Family::PIPELINE_SELECT Family::cmdInitPipelineSelect = Family::PIPELINE_SELECT::sInit(); -const Family::MI_ARB_CHECK Family::cmdInitArbCheck = Family::MI_ARB_CHECK::sInit(); -const Family::MEDIA_VFE_STATE Family::cmdInitMediaVfeState = Family::MEDIA_VFE_STATE::sInit(); -const Family::STATE_BASE_ADDRESS Family::cmdInitStateBaseAddress = Family::STATE_BASE_ADDRESS::sInit(); -const Family::MEDIA_SURFACE_STATE Family::cmdInitMediaSurfaceState = Family::MEDIA_SURFACE_STATE::sInit(); -const Family::SAMPLER_STATE Family::cmdInitSamplerState = Family::SAMPLER_STATE::sInit(); -const Family::GPGPU_CSR_BASE_ADDRESS Family::cmdInitGpgpuCsrBaseAddress = Family::GPGPU_CSR_BASE_ADDRESS::sInit(); -const Family::STATE_SIP Family::cmdInitStateSip = Family::STATE_SIP::sInit(); -const Family::BINDING_TABLE_STATE Family::cmdInitBindingTableState = Family::BINDING_TABLE_STATE::sInit(); -const Family::MI_USER_INTERRUPT Family::cmdInitUserInterrupt = Family::MI_USER_INTERRUPT::sInit(); -const Family::XY_BLOCK_COPY_BLT Family::cmdInitXyBlockCopyBlt = Family::XY_BLOCK_COPY_BLT::sInit(); -const Family::XY_SRC_COPY_BLT Family::cmdInitXyCopyBlt = Family::XY_SRC_COPY_BLT::sInit(); -const Family::MI_FLUSH_DW Family::cmdInitMiFlushDw = Family::MI_FLUSH_DW::sInit(); -const Family::XY_COLOR_BLT Family::cmdInitXyColorBlt = Family::XY_COLOR_BLT::sInit(); -} // namespace NEO diff --git a/shared/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp b/shared/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp deleted file mode 100644 index 04c452235a..0000000000 --- a/shared/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" - -namespace NEO { -typedef Gen9Family Family; - -template class CommandStreamReceiverSimulatedCommonHw; -} // namespace NEO diff --git a/shared/source/gen9/create_device_command_stream_receiver_gen9.cpp b/shared/source/gen9/create_device_command_stream_receiver_gen9.cpp deleted file mode 100644 index 44bea1f538..0000000000 --- a/shared/source/gen9/create_device_command_stream_receiver_gen9.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/gen9/hw_cmds.h" - -#include "create_command_stream_receiver.inl" - -namespace NEO { - -template <> -CommandStreamReceiver *createDeviceCommandStreamReceiver(bool withAubDump, - ExecutionEnvironment &executionEnvironment, - uint32_t rootDeviceIndex, - const DeviceBitfield deviceBitfield) { - return createCommandStreamReceiver(withAubDump, executionEnvironment, rootDeviceIndex, deviceBitfield); -} - -} // namespace NEO diff --git a/shared/source/gen9/debugger_gen9.cpp b/shared/source/gen9/debugger_gen9.cpp deleted file mode 100644 index 1ece4f60f3..0000000000 --- a/shared/source/gen9/debugger_gen9.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/debugger/debugger_l0.inl" -#include "shared/source/debugger/debugger_l0_base.inl" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { -struct Gen9Family; -using GfxFamily = Gen9Family; - -static auto coreFamily = IGFX_GEN9_CORE; - -template <> -void populateFactoryTable>() { - extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE]; - debuggerL0Factory[coreFamily] = DebuggerL0Hw::allocate; -} -template class DebuggerL0Hw; -} // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp b/shared/source/gen9/enable_compiler_product_helper_bxt.cpp deleted file mode 100644 index 8438bb8a17..0000000000 --- a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { - -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030006; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::APL; -} - -static EnableCompilerProductHelper enableCompilerProductHelperBXT; - -} // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_cfl.cpp b/shared/source/gen9/enable_compiler_product_helper_cfl.cpp deleted file mode 100644 index 18076c1cad..0000000000 --- a/shared/source/gen9/enable_compiler_product_helper_cfl.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/cfl/device_ids_configs_cfl.h" -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" - -#include "platforms.h" - -#include - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030006; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::CFL; -} - -template <> -uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const { - auto deviceId = hwInfo.platform.usDeviceID; - bool isCfl = (std::find(cflDeviceIds.begin(), cflDeviceIds.end(), deviceId) != cflDeviceIds.end()); - bool isWhl = (std::find(whlDeviceIds.begin(), whlDeviceIds.end(), deviceId) != whlDeviceIds.end()); - bool isCml = (std::find(cmlDeviceIds.begin(), cmlDeviceIds.end(), deviceId) != cmlDeviceIds.end()); - - if (isCfl) { - return AOT::CFL; - } else if (isCml) { - return AOT::CML; - } else if (isWhl) { - return AOT::WHL; - } - return getDefaultHwIpVersion(); -} - -static EnableCompilerProductHelper enableCompilerProductHelperCFL; - -} // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_glk.cpp b/shared/source/gen9/enable_compiler_product_helper_glk.cpp deleted file mode 100644 index daa3854e48..0000000000 --- a/shared/source/gen9/enable_compiler_product_helper_glk.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030006; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::GLK; -} - -static EnableCompilerProductHelper enableCompilerProductHelperGLK; - -} // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_kbl.cpp b/shared/source/gen9/enable_compiler_product_helper_kbl.cpp deleted file mode 100644 index a13b12f952..0000000000 --- a/shared/source/gen9/enable_compiler_product_helper_kbl.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/kbl/device_ids_configs_kbl.h" -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" - -#include "platforms.h" - -#include - -namespace NEO { -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030006; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::KBL; -} - -template <> -uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const { - auto deviceId = hwInfo.platform.usDeviceID; - bool isKbl = (std::find(kblDeviceIds.begin(), kblDeviceIds.end(), deviceId) != kblDeviceIds.end()); - bool isAml = (std::find(amlDeviceIds.begin(), amlDeviceIds.end(), deviceId) != amlDeviceIds.end()); - - if (isKbl) { - return AOT::KBL; - } else if (isAml) { - return AOT::AML; - } - return getDefaultHwIpVersion(); -} - -static EnableCompilerProductHelper enableCompilerProductHelperKBL; - -} // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_skl.cpp b/shared/source/gen9/enable_compiler_product_helper_skl.cpp deleted file mode 100644 index 62c08e9026..0000000000 --- a/shared/source/gen9/enable_compiler_product_helper_skl.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/compiler_aot_config_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/compiler_product_helper_base.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" -#include "shared/source/helpers/compiler_product_helper_bdw_to_icllp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl" -#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" -#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl" -#include "shared/source/helpers/compiler_product_helper_product_config_default.inl" - -#include "platforms.h" - -namespace NEO { - -template <> -uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { - return 0x100030008; -} - -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::SKL; -} - -static EnableCompilerProductHelper enableCompilerProductHelperSKL; - -} // namespace NEO diff --git a/shared/source/gen9/enable_family_full_core_gen9.cpp b/shared/source/gen9/enable_family_full_core_gen9.cpp deleted file mode 100644 index d41305c29c..0000000000 --- a/shared/source/gen9/enable_family_full_core_gen9.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/command_stream/command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/debugger/debugger_l0.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/populate_factory.h" - -#include - -namespace NEO { - -extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE]; - -using Family = Gen9Family; -static const auto gfxFamily = IGFX_GEN9_CORE; - -struct EnableCoreGen9 { - EnableCoreGen9() { - gfxCoreHelperFactory[gfxFamily] = GfxCoreHelperHw::create; - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - populateFactoryTable>(); - } -}; - -static EnableCoreGen9 enable; -} // namespace NEO diff --git a/shared/source/gen9/enable_gen9.cpp b/shared/source/gen9/enable_gen9.cpp deleted file mode 100644 index 30ec340cce..0000000000 --- a/shared/source/gen9/enable_gen9.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/cache_policy_bdw_and_later.inl" -#include "shared/source/helpers/enable_product.inl" -#include "shared/source/os_interface/product_helper.h" - -namespace NEO { - -#ifdef SUPPORT_BXT -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwBXT; -#endif -#ifdef SUPPORT_CFL -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwCFL; -#endif -#ifdef SUPPORT_GLK -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwGLK; -#endif -#ifdef SUPPORT_KBL -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwKBL; -#endif -#ifdef SUPPORT_SKL -template struct L1CachePolicyHelper; -static EnableGfxProductHw enableGfxProductHwSKL; -#endif - -} // namespace NEO diff --git a/shared/source/gen9/enable_product_helper_bxt.cpp b/shared/source/gen9/enable_product_helper_bxt.cpp deleted file mode 100644 index 12288a49a4..0000000000 --- a/shared/source/gen9/enable_product_helper_bxt.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableBXT; - -} // namespace NEO diff --git a/shared/source/gen9/enable_product_helper_cfl.cpp b/shared/source/gen9/enable_product_helper_cfl.cpp deleted file mode 100644 index dd05aeb4ec..0000000000 --- a/shared/source/gen9/enable_product_helper_cfl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableCFL; - -} // namespace NEO diff --git a/shared/source/gen9/enable_product_helper_glk.cpp b/shared/source/gen9/enable_product_helper_glk.cpp deleted file mode 100644 index 0851006c23..0000000000 --- a/shared/source/gen9/enable_product_helper_glk.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableGLK; - -} // namespace NEO diff --git a/shared/source/gen9/enable_product_helper_kbl.cpp b/shared/source/gen9/enable_product_helper_kbl.cpp deleted file mode 100644 index bd151b6bb9..0000000000 --- a/shared/source/gen9/enable_product_helper_kbl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableKBL; - -} // namespace NEO diff --git a/shared/source/gen9/enable_product_helper_skl.cpp b/shared/source/gen9/enable_product_helper_skl.cpp deleted file mode 100644 index a8118046e3..0000000000 --- a/shared/source/gen9/enable_product_helper_skl.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper_hw.h" - -namespace NEO { - -static EnableProductHelper enableSKL; - -} // namespace NEO diff --git a/shared/source/gen9/gfx_core_helper_gen9.cpp b/shared/source/gen9/gfx_core_helper_gen9.cpp deleted file mode 100644 index 66ac67cdbf..0000000000 --- a/shared/source/gen9/gfx_core_helper_gen9.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/aub_mapper.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/flat_batch_buffer_helper_hw.inl" -#include "shared/source/helpers/gfx_core_helper_base.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" -#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" - -#include - -namespace NEO { -typedef Gen9Family Family; - -template <> -SipKernelType GfxCoreHelperHw::getSipKernelType(bool debuggingActive) const { - if (!debuggingActive) { - return SipKernelType::csr; - } - return debugManager.flags.UseBindlessDebugSip.get() ? SipKernelType::dbgBindless : SipKernelType::dbgCsrLocal; -} - -template <> -uint32_t GfxCoreHelperHw::getMetricsLibraryGenId() const { - return static_cast(MetricsLibraryApi::ClientGen::Gen9); -} - -template <> -int32_t GfxCoreHelperHw::getDefaultThreadArbitrationPolicy() const { - return ThreadArbitrationPolicy::RoundRobin; -} - -template <> -bool MemorySynchronizationCommands::isBarrierWaRequired(const RootDeviceEnvironment &rootDeviceEnvironment) { return true; } - -template <> -bool GfxCoreHelperHw::isTimestampShiftRequired() const { - return false; -} - -template class GfxCoreHelperHw; -template class FlatBatchBufferHelperHw; -template struct MemorySynchronizationCommands; -template struct LriHelper; -} // namespace NEO diff --git a/shared/source/gen9/glk/device_ids_configs_glk.h b/shared/source/gen9/glk/device_ids_configs_glk.h deleted file mode 100644 index b1d397e588..0000000000 --- a/shared/source/gen9/glk/device_ids_configs_glk.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector glkDeviceIds{ - 0x3184, - 0x3185}; -} // namespace NEO diff --git a/shared/source/gen9/glk/os_agnostic_product_helper_glk.inl b/shared/source/gen9/glk/os_agnostic_product_helper_glk.inl deleted file mode 100644 index bb4d6b1e6b..0000000000 --- a/shared/source/gen9/glk/os_agnostic_product_helper_glk.inl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Glk; -}; - -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds.h b/shared/source/gen9/hw_cmds.h deleted file mode 100644 index 22e9e41188..0000000000 --- a/shared/source/gen9/hw_cmds.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_SKL -#include "hw_cmds_skl.h" -#endif -#ifdef SUPPORT_KBL -#include "hw_cmds_kbl.h" -#endif -#ifdef SUPPORT_BXT -#include "hw_cmds_bxt.h" -#endif -#ifdef SUPPORT_GLK -#include "hw_cmds_glk.h" -#endif -#ifdef SUPPORT_CFL -#include "hw_cmds_cfl.h" -#endif diff --git a/shared/source/gen9/hw_cmds_base.h b/shared/source/gen9/hw_cmds_base.h deleted file mode 100644 index 3c1c7eefc6..0000000000 --- a/shared/source/gen9/hw_cmds_base.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/commands/bxml_generator_glue.h" -#include "shared/source/gen9/hw_info.h" -#include "shared/source/helpers/debug_helpers.h" - -#include "igfxfmid.h" - -#include -#include -#include - -template -struct CmdParse; - -namespace NEO { -struct Gen9 { -#include "shared/source/generated/gen9/hw_cmds_generated_gen9.inl" - - static constexpr bool supportsSampler = true; - static constexpr bool isUsingGenericMediaStateClear = true; - static constexpr bool isUsingMiMemFence = false; - static constexpr bool isUsingMiSetPredicate = false; - static constexpr bool isUsingMiMathMocs = false; - static constexpr uint32_t bcsEngineCount = 1u; - static constexpr uint32_t timestampPacketCount = 1u; - - struct FrontEndStateSupport { - static constexpr bool scratchSize = true; - static constexpr bool privateScratchSize = false; - static constexpr bool computeDispatchAllWalker = false; - static constexpr bool disableEuFusion = false; - static constexpr bool disableOverdispatch = false; - static constexpr bool singleSliceDispatchCcsMode = false; - }; - - struct StateComputeModeStateSupport { - static constexpr bool threadArbitrationPolicy = true; - static constexpr bool coherencyRequired = false; - static constexpr bool largeGrfMode = false; - static constexpr bool zPassAsyncComputeThreadLimit = false; - static constexpr bool pixelAsyncComputeThreadLimit = false; - static constexpr bool devicePreemptionMode = false; - }; - - struct StateBaseAddressStateSupport { - static constexpr bool bindingTablePoolBaseAddress = false; - }; - - struct PipelineSelectStateSupport { - static constexpr bool mediaSamplerDopClockGate = true; - static constexpr bool systolicMode = false; - }; - - struct PreemptionDebugSupport { - static constexpr bool preemptionMode = true; - static constexpr bool stateSip = true; - static constexpr bool csrSurface = true; - }; - - struct DataPortBindlessSurfaceExtendedMessageDescriptor { - union { - struct { - uint32_t bindlessSurfaceOffset : 20; - uint32_t reserved : 1; - uint32_t executionUnitExtendedMessageDescriptorDefinition : 11; - }; - uint32_t packed; - }; - - DataPortBindlessSurfaceExtendedMessageDescriptor() { - packed = 0; - } - - void setBindlessSurfaceOffset(uint32_t offsetInBindlessSurfaceHeapInBytes) { - bindlessSurfaceOffset = offsetInBindlessSurfaceHeapInBytes >> 6; - } - - uint32_t getBindlessSurfaceOffsetToPatch() { - return bindlessSurfaceOffset << 12; - } - }; - - static constexpr uint32_t cacheLineSize = 0x40; - static constexpr bool isDcFlushAllowed = true; - - static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), ""); -}; - -struct Gen9Family : public Gen9 { - using Parse = CmdParse; - using GfxFamily = Gen9Family; - using DefaultWalkerType = GPGPU_WALKER; - using FrontEndStateCommand = MEDIA_VFE_STATE; - using XY_BLOCK_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; - using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; - using TimestampPacketType = uint32_t; - static const GPGPU_WALKER cmdInitGpgpuWalker; - static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; - static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; - static const MEDIA_STATE_FLUSH cmdInitMediaStateFlush; - static const MI_BATCH_BUFFER_END cmdInitBatchBufferEnd; - static const MI_BATCH_BUFFER_START cmdInitBatchBufferStart; - static const PIPE_CONTROL cmdInitPipeControl; - static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait; - static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState; - static const MI_LOAD_REGISTER_IMM cmdInitLoadRegisterImm; - static const MI_LOAD_REGISTER_REG cmdInitLoadRegisterReg; - static const MI_LOAD_REGISTER_MEM cmdInitLoadRegisterMem; - static const MI_STORE_DATA_IMM cmdInitStoreDataImm; - static const MI_STORE_REGISTER_MEM cmdInitStoreRegisterMem; - static const MI_NOOP cmdInitNoop; - static const MI_REPORT_PERF_COUNT cmdInitReportPerfCount; - static const MI_ATOMIC cmdInitAtomic; - static const PIPELINE_SELECT cmdInitPipelineSelect; - static const MI_ARB_CHECK cmdInitArbCheck; - static const MEDIA_VFE_STATE cmdInitMediaVfeState; - static const STATE_BASE_ADDRESS cmdInitStateBaseAddress; - static const MEDIA_SURFACE_STATE cmdInitMediaSurfaceState; - static const SAMPLER_STATE cmdInitSamplerState; - static const GPGPU_CSR_BASE_ADDRESS cmdInitGpgpuCsrBaseAddress; - static const STATE_SIP cmdInitStateSip; - static const BINDING_TABLE_STATE cmdInitBindingTableState; - static const MI_USER_INTERRUPT cmdInitUserInterrupt; - static const XY_BLOCK_COPY_BLT cmdInitXyBlockCopyBlt; - static const XY_SRC_COPY_BLT cmdInitXyCopyBlt; - static const MI_FLUSH_DW cmdInitMiFlushDw; - static const XY_COLOR_BLT cmdInitXyColorBlt; - static constexpr bool isQwordInOrderCounter = false; - static constexpr bool walkerPostSyncSupport = false; - static constexpr size_t indirectDataAlignment = GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE; - - static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) { - return cmdSetBaseFamily == IGFX_GEN8_CORE; - } - - template - static constexpr size_t getInterfaceDescriptorSize() { - return sizeof(INTERFACE_DESCRIPTOR_DATA); - } - - template - static WalkerType getInitGpuWalker() { - return cmdInitGpgpuWalker; - } - - template - static InterfaceDescriptorType getInitInterfaceDescriptor() { - return cmdInitInterfaceDescriptorData; - } - - template - static constexpr bool isHeaplessMode() { - return false; - } - - using WalkerVariant = std::variant; -}; - -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds_bxt.h b/shared/source/gen9/hw_cmds_bxt.h deleted file mode 100644 index 286d77c830..0000000000 --- a/shared/source/gen9/hw_cmds_bxt.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct BXT : public Gen9Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 6; - static const uint32_t maxSlicesSupported = 1; - static const uint32_t maxSubslicesSupported = 3; - - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class BxtHw1x2x6 : public BXT { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class BxtHw1x3x6 : public BXT { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds_cfl.h b/shared/source/gen9/hw_cmds_cfl.h deleted file mode 100644 index e282e4f97d..0000000000 --- a/shared/source/gen9/hw_cmds_cfl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct CFL : public Gen9Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 3; - static const uint32_t maxSubslicesSupported = 9; - - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class CflHw1x2x6 : public CFL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class CflHw1x3x6 : public CFL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class CflHw1x3x8 : public CFL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class CflHw2x3x8 : public CFL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class CflHw3x3x8 : public CFL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds_glk.h b/shared/source/gen9/hw_cmds_glk.h deleted file mode 100644 index 28ea690fd5..0000000000 --- a/shared/source/gen9/hw_cmds_glk.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct GLK : public Gen9Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 6; - static const uint32_t maxSlicesSupported = 1; - static const uint32_t maxSubslicesSupported = 3; - - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class GlkHw1x3x6 : public GLK { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class GlkHw1x2x6 : public GLK { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds_kbl.h b/shared/source/gen9/hw_cmds_kbl.h deleted file mode 100644 index 0dbd76cb65..0000000000 --- a/shared/source/gen9/hw_cmds_kbl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct KBL : public Gen9Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 3; - static const uint32_t maxSubslicesSupported = 9; - - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class KblHw1x2x6 : public KBL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class KblHw1x3x6 : public KBL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class KblHw1x3x8 : public KBL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class KblHw2x3x8 : public KBL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class KblHw3x3x8 : public KBL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_cmds_skl.h b/shared/source/gen9/hw_cmds_skl.h deleted file mode 100644 index 40d99f37ee..0000000000 --- a/shared/source/gen9/hw_cmds_skl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" - -namespace NEO { - -struct SKL : public Gen9Family { - static const PLATFORM platform; - static const HardwareInfo hwInfo; - static FeatureTable featureTable; - static WorkaroundTable workaroundTable; - static const uint32_t maxEuPerSubslice = 8; - static const uint32_t maxSlicesSupported = 3; - static const uint32_t maxSubslicesSupported = 9; - - static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); - static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); -}; - -class SklHw1x2x6 : public SKL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class SklHw1x3x6 : public SKL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class SklHw1x3x8 : public SKL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class SklHw2x3x8 : public SKL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; - -class SklHw3x3x8 : public SKL { - public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); - static const HardwareInfo hwInfo; - - private: - static GT_SYSTEM_INFO gtSystemInfo; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info.h b/shared/source/gen9/hw_info.h deleted file mode 100644 index a16cd1d126..0000000000 --- a/shared/source/gen9/hw_info.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#ifdef SUPPORT_SKL -#include "hw_info_skl.h" -#endif -#ifdef SUPPORT_KBL -#include "hw_info_kbl.h" -#endif -#ifdef SUPPORT_BXT -#include "hw_info_bxt.h" -#endif -#ifdef SUPPORT_GLK -#include "hw_info_glk.h" -#endif -#ifdef SUPPORT_CFL -#include "hw_info_cfl.h" -#endif diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp deleted file mode 100644 index 10a42ab166..0000000000 --- a/shared/source/gen9/hw_info_bxt.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "bxt"; - -const PLATFORM BXT::platform = { - IGFX_BROXTON, - PCH_UNKNOWN, - IGFX_GEN9_CORE, - IGFX_GEN9_CORE, - PLATFORM_MOBILE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable BXT::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 52.083, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Bxt, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(BXT::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - false, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - false, // ftrSvm - true, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - false, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - false, // supportsPipes - false, // supportsOcl21Features - false, // supportsOnDemandPageFaults - false, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable BXT::workaroundTable = {}; -FeatureTable BXT::featureTable = {}; - -void BXT::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrULT = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrLCIA = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waLLCCachingUnsupported = true; - workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true; - workaroundTable->flags.waFbcLinearSurfaceStride = true; - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; - workaroundTable->flags.waSendMIFLUSHBeforeVFE = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; -} - -void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 6u; - gtSysInfo->TotalVsThreads = 112; - gtSysInfo->TotalHsThreads = 112; - gtSysInfo->TotalDsThreads = 112; - gtSysInfo->TotalGsThreads = 112; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = BXT::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = BXT::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = BXT::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo BxtHw1x2x6::hwInfo = { - &BXT::platform, - &BXT::featureTable, - &BXT::workaroundTable, - &BxtHw1x2x6::gtSystemInfo, - BXT::capabilityTable}; -GT_SYSTEM_INFO BxtHw1x2x6::gtSystemInfo = {0}; -void BxtHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 1; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo BxtHw1x3x6::hwInfo = { - &BXT::platform, - &BXT::featureTable, - &BXT::workaroundTable, - &BxtHw1x3x6::gtSystemInfo, - BXT::capabilityTable}; -GT_SYSTEM_INFO BxtHw1x3x6::gtSystemInfo = {0}; -void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 1; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo BXT::hwInfo = BxtHw1x3x6::hwInfo; - -void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100020006) { - BxtHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*BXT::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupBXTHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_bxt.h b/shared/source/gen9/hw_info_bxt.h deleted file mode 100644 index 8db2562ebf..0000000000 --- a/shared/source/gen9/hw_info_bxt.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen9.h" - -namespace NEO { - -struct BXT; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN9_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef BXT GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp deleted file mode 100644 index 8693caae51..0000000000 --- a/shared/source/gen9/hw_info_cfl.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/cfl/device_ids_configs_cfl.h" -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "cfl"; - -const PLATFORM CFL::platform = { - IGFX_COFFEELAKE, - PCH_UNKNOWN, - IGFX_GEN9_CORE, - IGFX_GEN9_CORE, - PLATFORM_NONE, // default init - cflDeviceIds[0], // usDeviceID - 9, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable CFL::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Cfl, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(CFL::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - true, // ftrSvm - true, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - true, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable CFL::workaroundTable = {}; -FeatureTable CFL::featureTable = {}; - -void CFL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waSendMIFLUSHBeforeVFE = true; - workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true; - workaroundTable->flags.waLosslessCompressionSurfaceStride = true; - workaroundTable->flags.waFbcLinearSurfaceStride = true; - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; -} - -void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 336; - gtSysInfo->TotalHsThreads = 336; - gtSysInfo->TotalDsThreads = 336; - gtSysInfo->TotalGsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo CflHw1x2x6::hwInfo = { - &CFL::platform, - &CFL::featureTable, - &CFL::workaroundTable, - &CflHw1x2x6::gtSystemInfo, - CFL::capabilityTable}; -GT_SYSTEM_INFO CflHw1x2x6::gtSystemInfo = {0}; -void CflHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo CflHw1x3x6::hwInfo = { - &CFL::platform, - &CFL::featureTable, - &CFL::workaroundTable, - &CflHw1x3x6::gtSystemInfo, - CFL::capabilityTable}; - -GT_SYSTEM_INFO CflHw1x3x6::gtSystemInfo = {0}; -void CflHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo CflHw1x3x8::hwInfo = { - &CFL::platform, - &CFL::featureTable, - &CFL::workaroundTable, - &CflHw1x3x8::gtSystemInfo, - CFL::capabilityTable}; - -GT_SYSTEM_INFO CflHw1x3x8::gtSystemInfo = {0}; -void CflHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo CflHw2x3x8::hwInfo = { - &CFL::platform, - &CFL::featureTable, - &CFL::workaroundTable, - &CflHw2x3x8::gtSystemInfo, - CFL::capabilityTable}; -GT_SYSTEM_INFO CflHw2x3x8::gtSystemInfo = {0}; -void CflHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 2; - gtSysInfo->L3CacheSizeInKb = 1536; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; -}; - -const HardwareInfo CflHw3x3x8::hwInfo = { - &CFL::platform, - &CFL::featureTable, - &CFL::workaroundTable, - &CflHw3x3x8::gtSystemInfo, - CFL::capabilityTable}; -GT_SYSTEM_INFO CflHw3x3x8::gtSystemInfo = {0}; -void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 3; - gtSysInfo->L3CacheSizeInKb = 2304; - gtSysInfo->L3BankCount = 12; - gtSysInfo->MaxFillRate = 24; -}; - -const HardwareInfo CFL::hwInfo = CflHw1x3x6::hwInfo; - -void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100030008) { - CflHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x200030008) { - CflHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x300030008) { - CflHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100020006) { - CflHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*CFL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupCFLHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_cfl.h b/shared/source/gen9/hw_info_cfl.h deleted file mode 100644 index af553ef717..0000000000 --- a/shared/source/gen9/hw_info_cfl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen9.h" - -namespace NEO { - -struct CFL; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN9_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef CFL GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_gen9.cpp b/shared/source/gen9/hw_info_gen9.cpp deleted file mode 100644 index decf33da64..0000000000 --- a/shared/source/gen9/hw_info_gen9.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_info_gen9.h" - -namespace NEO { -const char *GfxFamilyMapper::name = "Gen9"; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_gen9.h b/shared/source/gen9/hw_info_gen9.h deleted file mode 100644 index 025c599c03..0000000000 --- a/shared/source/gen9/hw_info_gen9.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/helpers/hw_mapper.h" - -namespace NEO { - -struct Gen9Family; - -template <> -struct GfxFamilyMapper { - typedef Gen9Family GfxFamily; - static const char *name; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp deleted file mode 100644 index 497387bde1..0000000000 --- a/shared/source/gen9/hw_info_glk.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "glk"; - -const PLATFORM GLK::platform = { - IGFX_GEMINILAKE, - PCH_UNKNOWN, - IGFX_GEN9_CORE, - IGFX_GEN9_CORE, - PLATFORM_MOBILE, // default init - 0, // usDeviceID - 0, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable GLK::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {30000, 0, 0, 0, true, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 52.083, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Glk, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(GLK::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - false, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - false, // ftrSvm - true, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - false, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - false, // supportsPipes - false, // supportsOcl21Features - false, // supportsOnDemandPageFaults - false, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable GLK::workaroundTable = {}; -FeatureTable GLK::featureTable = {}; - -void GLK::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrLCIA = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrTileMappedResource = true; - featureTable->flags.ftrULT = true; - featureTable->flags.ftrAstcHdr2D = true; - featureTable->flags.ftrAstcLdr2D = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waLLCCachingUnsupported = true; - workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true; - workaroundTable->flags.waFbcLinearSurfaceStride = true; - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; - workaroundTable->flags.waSendMIFLUSHBeforeVFE = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; -} - -void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 6u; - gtSysInfo->TotalVsThreads = 112; - gtSysInfo->TotalHsThreads = 112; - gtSysInfo->TotalDsThreads = 112; - gtSysInfo->TotalGsThreads = 112; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = GLK::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = GLK::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = GLK::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo GlkHw1x3x6::hwInfo = { - &GLK::platform, - &GLK::featureTable, - &GLK::workaroundTable, - &GlkHw1x3x6::gtSystemInfo, - GLK::capabilityTable}; - -GT_SYSTEM_INFO GlkHw1x3x6::gtSystemInfo = {0}; -void GlkHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo GlkHw1x2x6::hwInfo = { - &GLK::platform, - &GLK::featureTable, - &GLK::workaroundTable, - &GlkHw1x2x6::gtSystemInfo, - GLK::capabilityTable}; - -GT_SYSTEM_INFO GlkHw1x2x6::gtSystemInfo = {0}; -void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo GLK::hwInfo = GlkHw1x3x6::hwInfo; - -void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100020006) { - GlkHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*GLK::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupGLKHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_glk.h b/shared/source/gen9/hw_info_glk.h deleted file mode 100644 index db9775630f..0000000000 --- a/shared/source/gen9/hw_info_glk.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen9.h" - -namespace NEO { - -struct GLK; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN9_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef GLK GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp deleted file mode 100644 index 2c1a92dc15..0000000000 --- a/shared/source/gen9/hw_info_kbl.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/gen9/kbl/device_ids_configs_kbl.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "kbl"; - -const PLATFORM KBL::platform = { - IGFX_KABYLAKE, - PCH_UNKNOWN, - IGFX_GEN9_CORE, - IGFX_GEN9_CORE, - PLATFORM_NONE, // default init - kblDeviceIds[0], // usDeviceID - 9, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable KBL::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Kbl, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(KBL::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - true, // ftrSvm - true, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - true, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable KBL::workaroundTable = {}; -FeatureTable KBL::featureTable = {}; - -void KBL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - PLATFORM *platform = &hwInfo->platform; - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waSendMIFLUSHBeforeVFE = true; - workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true; - workaroundTable->flags.waLosslessCompressionSurfaceStride = true; - workaroundTable->flags.waFbcLinearSurfaceStride = true; - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; - - if (platform->usRevId <= 0x6) { - workaroundTable->flags.waDisableLSQCROPERFforOCL = true; - workaroundTable->flags.waEncryptedEdramOnlyPartials = true; - } -} - -void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 336; - gtSysInfo->TotalHsThreads = 336; - gtSysInfo->TotalDsThreads = 336; - gtSysInfo->TotalGsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = KBL::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = KBL::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo KblHw1x2x6::hwInfo = { - &KBL::platform, - &KBL::featureTable, - &KBL::workaroundTable, - &KblHw1x2x6::gtSystemInfo, - KBL::capabilityTable}; - -GT_SYSTEM_INFO KblHw1x2x6::gtSystemInfo = {0}; -void KblHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo KblHw1x3x6::hwInfo = { - &KBL::platform, - &KBL::featureTable, - &KBL::workaroundTable, - &KblHw1x3x6::gtSystemInfo, - KBL::capabilityTable}; - -GT_SYSTEM_INFO KblHw1x3x6::gtSystemInfo = {0}; -void KblHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo KblHw1x3x8::hwInfo = { - &KBL::platform, - &KBL::featureTable, - &KBL::workaroundTable, - &KblHw1x3x8::gtSystemInfo, - KBL::capabilityTable}; - -GT_SYSTEM_INFO KblHw1x3x8::gtSystemInfo = {0}; -void KblHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo KblHw2x3x8::hwInfo = { - &KBL::platform, - &KBL::featureTable, - &KBL::workaroundTable, - &KblHw2x3x8::gtSystemInfo, - KBL::capabilityTable}; - -GT_SYSTEM_INFO KblHw2x3x8::gtSystemInfo = {0}; -void KblHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 2; - gtSysInfo->L3CacheSizeInKb = 1536; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; -}; - -const HardwareInfo KblHw3x3x8::hwInfo = { - &KBL::platform, - &KBL::featureTable, - &KBL::workaroundTable, - &KblHw3x3x8::gtSystemInfo, - KBL::capabilityTable}; - -GT_SYSTEM_INFO KblHw3x3x8::gtSystemInfo = {0}; -void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 3; - gtSysInfo->L3CacheSizeInKb = 2304; - gtSysInfo->L3BankCount = 12; - gtSysInfo->MaxFillRate = 23; -}; - -const HardwareInfo KBL::hwInfo = KblHw1x3x6::hwInfo; - -void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100030008) { - KblHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x200030008) { - KblHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x300030008) { - KblHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100020006) { - KblHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*KBL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupKBLHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_kbl.h b/shared/source/gen9/hw_info_kbl.h deleted file mode 100644 index 0359db6e26..0000000000 --- a/shared/source/gen9/hw_info_kbl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen9.h" - -namespace NEO { - -struct KBL; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN9_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef KBL GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp deleted file mode 100644 index 3244fd33ad..0000000000 --- a/shared/source/gen9/hw_info_skl.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/aub_mem_dump/definitions/aub_services.h" -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/helpers/constants.h" - -#include "aubstream/engine_node.h" - -namespace NEO { - -const char *HwMapper::abbreviation = "skl"; - -const PLATFORM SKL::platform = { - IGFX_SKYLAKE, - PCH_UNKNOWN, - IGFX_GEN9_CORE, - IGFX_GEN9_CORE, - PLATFORM_NONE, // default init - 0, // usDeviceID - 9, // usRevId. 0 sets the stepping to A0 - 0, // usDeviceID_PCH - 0, // usRevId_PCH - GTTYPE_UNDEFINED}; - -const RuntimeCapabilityTable SKL::capabilityTable{ - EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - nullptr, // preferredPlatformName - PreemptionMode::MidThread, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Skl, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(SKL::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - true, // ftrSvm - true, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - true, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - true, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - false, // fusedEuEnabled - false, // l0DebuggerSupported; - false, // supportsFloatAtomics - 0 // cxlType -}; - -WorkaroundTable SKL::workaroundTable = {}; -FeatureTable SKL::featureTable = {}; -void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { - FeatureTable *featureTable = &hwInfo->featureTable; - WorkaroundTable *workaroundTable = &hwInfo->workaroundTable; - - featureTable->flags.ftrGpGpuMidBatchPreempt = true; - featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true; - featureTable->flags.ftrL3IACoherency = true; - featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true; - featureTable->flags.ftrPPGTT = true; - featureTable->flags.ftrSVM = true; - featureTable->flags.ftrIA32eGfxPTEs = true; - featureTable->flags.ftrDisplayYTiling = true; - featureTable->flags.ftrTranslationTable = true; - featureTable->flags.ftrUserModeTranslationTable = true; - featureTable->flags.ftrFbc = true; - featureTable->flags.ftrTileY = true; - - workaroundTable->flags.waSendMIFLUSHBeforeVFE = true; - workaroundTable->flags.waDisableLSQCROPERFforOCL = true; - workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true; - workaroundTable->flags.waLosslessCompressionSurfaceStride = true; - workaroundTable->flags.waFbcLinearSurfaceStride = true; - workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; - workaroundTable->flags.waEncryptedEdramOnlyPartials = true; - workaroundTable->flags.waDisableEdramForDisplayRT = true; - workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; - - if ((1 << hwInfo->platform.usRevId) & 0x0eu) { - workaroundTable->flags.waCompressedResourceRequiresConstVA21 = true; - } - if ((1 << hwInfo->platform.usRevId) & 0x0fu) { - workaroundTable->flags.waDisablePerCtxtPreemptionGranularityControl = true; - workaroundTable->flags.waModifyVFEStateAfterGPGPUPreemption = true; - } - if ((1 << hwInfo->platform.usRevId) & 0x3f) { - workaroundTable->flags.waCSRUncachable = true; - } -} - -void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; - gtSysInfo->TotalVsThreads = 336; - gtSysInfo->TotalHsThreads = 336; - gtSysInfo->TotalDsThreads = 336; - gtSysInfo->TotalGsThreads = 336; - gtSysInfo->TotalPsThreadsWindowerRange = 64; - gtSysInfo->CsrSizeInMb = 8; - gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice; - gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported; - gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported; - gtSysInfo->IsL3HashModeEnabled = false; - gtSysInfo->IsDynamicallyPopulated = false; - - if (setupFeatureTableAndWorkaroundTable) { - setupFeatureAndWorkaroundTable(hwInfo); - } -} - -const HardwareInfo SklHw1x2x6::hwInfo = { - &SKL::platform, - &SKL::featureTable, - &SKL::workaroundTable, - &SklHw1x2x6::gtSystemInfo, - SKL::capabilityTable}; - -GT_SYSTEM_INFO SklHw1x2x6::gtSystemInfo = {0}; -void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 384; - gtSysInfo->L3BankCount = 2; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo SklHw1x3x6::hwInfo = { - &SKL::platform, - &SKL::featureTable, - &SKL::workaroundTable, - &SklHw1x3x6::gtSystemInfo, - SKL::capabilityTable}; - -GT_SYSTEM_INFO SklHw1x3x6::gtSystemInfo = {0}; -void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo SklHw1x3x8::hwInfo = { - &SKL::platform, - &SKL::featureTable, - &SKL::workaroundTable, - &SklHw1x3x8::gtSystemInfo, - SKL::capabilityTable}; - -GT_SYSTEM_INFO SklHw1x3x8::gtSystemInfo = {0}; -void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 1; - gtSysInfo->L3CacheSizeInKb = 768; - gtSysInfo->L3BankCount = 4; - gtSysInfo->MaxFillRate = 8; -}; - -const HardwareInfo SklHw2x3x8::hwInfo = { - &SKL::platform, - &SKL::featureTable, - &SKL::workaroundTable, - &SklHw2x3x8::gtSystemInfo, - SKL::capabilityTable}; - -GT_SYSTEM_INFO SklHw2x3x8::gtSystemInfo = {0}; -void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 2; - gtSysInfo->L3CacheSizeInKb = 1536; - gtSysInfo->L3BankCount = 8; - gtSysInfo->MaxFillRate = 16; -}; - -const HardwareInfo SklHw3x3x8::hwInfo = { - &SKL::platform, - &SKL::featureTable, - &SKL::workaroundTable, - &SklHw3x3x8::gtSystemInfo, - SKL::capabilityTable}; - -GT_SYSTEM_INFO SklHw3x3x8::gtSystemInfo = {0}; -void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - - GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->SliceCount = 3; - gtSysInfo->L3CacheSizeInKb = 2304; - gtSysInfo->L3BankCount = 12; - gtSysInfo->MaxFillRate = 24; -}; - -const HardwareInfo SKL::hwInfo = SklHw1x3x8::hwInfo; - -void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { - if (hwInfoConfig == 0x100030008) { - SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x200030008) { - SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x300030008) { - SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100020006) { - SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x100030006) { - SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else if (hwInfoConfig == 0x0) { - // Default config - SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); - } else { - UNRECOVERABLE_IF(true); - } -} - -void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupSKLHardwareInfoImpl; -} // namespace NEO diff --git a/shared/source/gen9/hw_info_skl.h b/shared/source/gen9/hw_info_skl.h deleted file mode 100644 index 6dde827849..0000000000 --- a/shared/source/gen9/hw_info_skl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "hw_info_gen9.h" - -namespace NEO { - -struct SKL; - -template <> -struct HwMapper { - enum { gfxFamily = IGFX_GEN9_CORE }; - - static const char *abbreviation; - typedef GfxFamilyMapper(gfxFamily)>::GfxFamily GfxFamily; - typedef SKL GfxProduct; -}; -} // namespace NEO diff --git a/shared/source/gen9/image_core_gen9.cpp b/shared/source/gen9/image_core_gen9.cpp deleted file mode 100644 index f03b072505..0000000000 --- a/shared/source/gen9/image_core_gen9.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/image/image_surface_state.h" - -namespace NEO { - -typedef Gen9Family Family; - -#include "shared/source/image/image_skl_and_later.inl" -} // namespace NEO diff --git a/shared/source/gen9/kbl/device_ids_configs_kbl.h b/shared/source/gen9/kbl/device_ids_configs_kbl.h deleted file mode 100644 index c43e133756..0000000000 --- a/shared/source/gen9/kbl/device_ids_configs_kbl.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector amlDeviceIds{0x591C}; -const std::vector kblDeviceIds{ - 0x5902, - 0x590B, - 0x590A, - 0x5906, - 0x590E, - 0x5908, - 0x5913, - 0x5915, - 0x5912, - 0x591B, - 0x5917, - 0x591A, - 0x5916, - 0x591E, - 0x591D, - 0x5921, - 0x5926, - 0x5927, - 0x592B, - 0x592A, - 0x5923, - 0x5932, - 0x593B, - 0x593A, - 0x593D}; -} // namespace NEO diff --git a/shared/source/gen9/kbl/os_agnostic_product_helper_kbl.inl b/shared/source/gen9/kbl/os_agnostic_product_helper_kbl.inl deleted file mode 100644 index c9dcfb4fa2..0000000000 --- a/shared/source/gen9/kbl/os_agnostic_product_helper_kbl.inl +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { - -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Kbl; -}; - -} // namespace NEO diff --git a/shared/source/gen9/linux/command_stream_receiver_gen9.cpp b/shared/source/gen9/linux/command_stream_receiver_gen9.cpp deleted file mode 100644 index 46bf96b3db..0000000000 --- a/shared/source/gen9/linux/command_stream_receiver_gen9.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/os_interface/linux/device_command_stream.inl" -#include "shared/source/os_interface/linux/drm_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class DrmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen9/linux/direct_submission_gen9.cpp b/shared/source/gen9/linux/direct_submission_gen9.cpp deleted file mode 100644 index b10a58d992..0000000000 --- a/shared/source/gen9/linux/direct_submission_gen9.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/linux/drm_direct_submission.inl" -#include "shared/source/gen9/hw_cmds.h" - -namespace NEO { -using GfxFamily = Gen9Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class DrmDirectSubmission>; -template class DrmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen9/linux/product_helper_bxt.cpp b/shared/source/gen9/linux/product_helper_bxt.cpp deleted file mode 100644 index f0e821227d..0000000000 --- a/shared/source/gen9/linux/product_helper_bxt.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/linux/drm_neo.h" -#include "shared/source/os_interface/os_interface.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_BROXTON; - -#include "shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface || osIface->getDriverModel()->getDriverModelType() == DriverModelType::wddm) { - return 0; - } - - Drm *drm = osIface->getDriverModel()->as(); - FeatureTable *featureTable = &hwInfo->featureTable; - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->SliceCount = 1; - - gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1; - gtSystemInfo->VEBoxInfo.IsValid = true; - - int enabled = 0; - int retVal = drm->getEnabledPooledEu(enabled); - if (retVal == 0) { - featureTable->flags.ftrPooledEuEnabled = (enabled != 0); - } - if (enabled) { - int num = 0; - retVal = drm->getMinEuInPool(num); - if (retVal == 0 && ((num == 3) || (num == 6) || (num == 9))) { - gtSystemInfo->EuCountPerPoolMin = static_cast(num); - } - // in case of failure or not getting right values, fallback to default - else { - if (gtSystemInfo->SubSliceCount == 3) { - // Native 3x6, PooledEU 2x9 - gtSystemInfo->EuCountPerPoolMin = 9; - } else { - // Native 3x6 fused down to 2x6, PooledEU worst case 3+9 - gtSystemInfo->EuCountPerPoolMin = 3; - } - } - gtSystemInfo->EuCountPerPoolMax = gtSystemInfo->EUCount - gtSystemInfo->EuCountPerPoolMin; - } - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.enableQuickKmdSleep = true; - kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; - kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000; - kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen9/linux/product_helper_cfl.cpp b/shared/source/gen9/linux/product_helper_cfl.cpp deleted file mode 100644 index 8c4c13d3db..0000000000 --- a/shared/source/gen9/linux/product_helper_cfl.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_COFFEELAKE; - -#include "shared/source/gen9/cfl/os_agnostic_product_helper_cfl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - if (gtSystemInfo->SubSliceCount > 3) { - gtSystemInfo->SliceCount = 2; - } else { - gtSystemInfo->SliceCount = 1; - } - - gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = true; - gtSystemInfo->VEBoxInfo.IsValid = true; - - if (hwInfo->platform.usDeviceID == 0x3EA8 || - hwInfo->platform.usDeviceID == 0x3EA6) { - gtSystemInfo->EdramSizeInKb = 64 * 1024; - } - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.enableQuickKmdSleep = true; - kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; - kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000; - kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen9/linux/product_helper_glk.cpp b/shared/source/gen9/linux/product_helper_glk.cpp deleted file mode 100644 index c4d367a1c6..0000000000 --- a/shared/source/gen9/linux/product_helper_glk.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/linux/drm_neo.h" -#include "shared/source/os_interface/os_interface.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_GEMINILAKE; - -#include "shared/source/gen9/glk/os_agnostic_product_helper_glk.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface || osIface->getDriverModel()->getDriverModelType() == DriverModelType::wddm) { - return 0; - } - - Drm *drm = osIface->getDriverModel()->as(); - FeatureTable *featureTable = &hwInfo->featureTable; - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1; - gtSystemInfo->VEBoxInfo.IsValid = true; - - int enabled = 0; - int retVal = drm->getEnabledPooledEu(enabled); - if (retVal == 0) { - featureTable->flags.ftrPooledEuEnabled = (enabled != 0); - } - if (enabled) { - int num = 0; - retVal = drm->getMinEuInPool(num); - if (retVal == 0 && ((num == 3) || (num == 6) || (num == 9))) { - gtSystemInfo->EuCountPerPoolMin = static_cast(num); - } - // in case of failure or not getting right values, fallback to default - else { - if (gtSystemInfo->SubSliceCount == 3) { - // Native 3x6, PooledEU 2x9 - gtSystemInfo->EuCountPerPoolMin = 9; - } else { - // Native 3x6 fused down to 2x6, PooledEU worst case 3+9 - gtSystemInfo->EuCountPerPoolMin = 3; - } - } - gtSystemInfo->EuCountPerPoolMax = gtSystemInfo->EUCount - gtSystemInfo->EuCountPerPoolMin; - } - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.enableQuickKmdSleep = true; - kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; - kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000; - kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen9/linux/product_helper_kbl.cpp b/shared/source/gen9/linux/product_helper_kbl.cpp deleted file mode 100644 index 52447bef53..0000000000 --- a/shared/source/gen9/linux/product_helper_kbl.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_KABYLAKE; - -#include "shared/source/gen9/kbl/os_agnostic_product_helper_kbl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - if (gtSystemInfo->SubSliceCount > 3) { - gtSystemInfo->SliceCount = 2; - } else { - gtSystemInfo->SliceCount = 1; - } - - gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1; - gtSystemInfo->VEBoxInfo.IsValid = true; - - if (hwInfo->platform.usDeviceID == 0x5927 || - hwInfo->platform.usDeviceID == 0x5926) { - gtSystemInfo->EdramSizeInKb = 64 * 1024; - } - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.enableQuickKmdSleep = true; - kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; - kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000; - kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; - - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen9/linux/product_helper_skl.cpp b/shared/source/gen9/linux/product_helper_skl.cpp deleted file mode 100644 index 1b29138224..0000000000 --- a/shared/source/gen9/linux/product_helper_skl.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_SKYLAKE; - -#include "shared/source/gen9/skl/os_agnostic_product_helper_skl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -namespace NEO { - -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - if (nullptr == osIface) { - return 0; - } - GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo; - - gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1; - gtSystemInfo->VDBoxInfo.Instances.Bits.VDBox0Enabled = 1; - gtSystemInfo->VEBoxInfo.IsValid = true; - gtSystemInfo->VDBoxInfo.IsValid = true; - - if (hwInfo->platform.usDeviceID == 0x1926 || - hwInfo->platform.usDeviceID == 0x1927 || - hwInfo->platform.usDeviceID == 0x192D) { - gtSystemInfo->EdramSizeInKb = 64 * 1024; - } - - if (hwInfo->platform.usDeviceID == 0x193B || - hwInfo->platform.usDeviceID == 0x193D) { - gtSystemInfo->EdramSizeInKb = 128 * 1024; - } - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.enableQuickKmdSleep = true; - kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; - kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000; - kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; - return 0; -} - -template class ProductHelperHw; -} // namespace NEO diff --git a/shared/source/gen9/preamble_gen9.cpp b/shared/source/gen9/preamble_gen9.cpp deleted file mode 100644 index 98085ab104..0000000000 --- a/shared/source/gen9/preamble_gen9.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/csr_definitions.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/pipe_control_args.h" -#include "shared/source/helpers/pipeline_select_helper.h" -#include "shared/source/helpers/preamble_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen9Family; - -template <> -uint32_t PreambleHelper::getL3Config(const HardwareInfo &hwInfo, bool useSLM) { - uint32_t l3Config = 0; - - switch (hwInfo.platform.eProductFamily) { - case IGFX_SKYLAKE: - l3Config = getL3ConfigHelper(useSLM); - break; - case IGFX_BROXTON: - l3Config = getL3ConfigHelper(useSLM); - break; - default: - l3Config = getL3ConfigHelper(true); - } - return l3Config; -} - -template <> -void PreambleHelper::programPipelineSelect(LinearStream *pCommandStream, - const PipelineSelectArgs &pipelineSelectArgs, - const RootDeviceEnvironment &rootDeviceEnvironment) { - - typedef typename Family::PIPELINE_SELECT PIPELINE_SELECT; - - auto pCmd = pCommandStream->getSpaceForCmd(); - PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect; - - auto mask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits; - cmd.setMaskBits(mask); - cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU); - cmd.setMediaSamplerDopClockGateEnable(!pipelineSelectArgs.mediaSamplerRequired); - - *pCmd = cmd; -} - -template <> -void PreambleHelper::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) { - PipeControlArgs args = {}; - if (hwInfo->workaroundTable.flags.waSendMIFLUSHBeforeVFE) { - args.renderTargetCacheFlushEnable = true; - args.depthCacheFlushEnable = true; - args.dcFlushEnable = true; - } - MemorySynchronizationCommands::addSingleBarrier(*pCommandStream, args); -} - -template <> -std::vector PreambleHelper::getSupportedThreadArbitrationPolicies() { - std::vector retVal; - for (const int32_t &p : DebugControlReg2::supportedArbitrationPolicy) { - retVal.push_back(p); - } - return retVal; -} -template struct PreambleHelper; -} // namespace NEO diff --git a/shared/source/gen9/preemption_gen9.cpp b/shared/source/gen9/preemption_gen9.cpp deleted file mode 100644 index 0b97281640..0000000000 --- a/shared/source/gen9/preemption_gen9.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/command_stream/csr_definitions.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/command_stream/preemption.inl" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/hw_info.h" -#include "shared/source/helpers/register_offsets.h" - -#include - -namespace NEO { - -using GfxFamily = Gen9Family; - -template <> -size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t size = 0; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - size += 2 * sizeof(MI_LOAD_REGISTER_IMM); - } - } - return size; -} - -template <> -void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - LriHelper::program(pCommandStream, - RegisterOffsets::csGprR0, - RegisterConstants::gpgpuWalkerCookieValueBeforeWalker, - false, - false); - } - } -} - -template <> -void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device) { - typedef typename GfxFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - PreemptionMode preemptionMode = device.getPreemptionMode(); - if (preemptionMode == PreemptionMode::ThreadGroup || - preemptionMode == PreemptionMode::MidThread) { - if (device.getHardwareInfo().workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption) { - LriHelper::program(pCommandStream, - RegisterOffsets::csGprR0, - RegisterConstants::gpgpuWalkerCookieValueAfterWalker, - false, - false); - } - } -} - -template <> -void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA *idd, PreemptionMode preemptionMode) { -} - -template void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, - PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); - -template size_t PreemptionHelper::getRequiredPreambleSize(const Device &device); -template void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr); -template void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr); -template void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context); -template void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, bool useFullAddress); -template size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs); -template size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode); - -} // namespace NEO diff --git a/shared/source/gen9/reg_configs.h b/shared/source/gen9/reg_configs.h deleted file mode 100644 index 83bf8c7b15..0000000000 --- a/shared/source/gen9/reg_configs.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/source/command_stream/thread_arbitration_policy.h" -#include "shared/source/helpers/preamble.h" - -namespace NEO { -struct Gen9Family; -template <> -struct L3CNTLREGConfig { - static const uint32_t valueForSLM = 0x60000321u; - static const uint32_t valueForNoSLM = 0x80000340u; -}; - -template <> -struct L3CNTLRegisterOffset { - static const uint32_t registerOffset = 0x7034; -}; - -template <> -struct L3CNTLREGConfig { - static const uint32_t valueForSLM = 0x60000321u; - static const uint32_t valueForNoSLM = 0x80000340u; -}; - -namespace DebugControlReg2 { -constexpr uint32_t address = 0xE404; -constexpr uint32_t getRegData(const int32_t &policy) { - return policy == ThreadArbitrationPolicy::RoundRobin ? 0x100 : 0x0; -}; -static const int32_t supportedArbitrationPolicy[] = { - ThreadArbitrationPolicy::AgeBased, - ThreadArbitrationPolicy::RoundRobin}; -} // namespace DebugControlReg2 - -} // namespace NEO diff --git a/shared/source/gen9/skl/device_ids_configs_skl.h b/shared/source/gen9/skl/device_ids_configs_skl.h deleted file mode 100644 index 58157f5235..0000000000 --- a/shared/source/gen9/skl/device_ids_configs_skl.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once - -#include - -namespace NEO { -const std::vector sklDeviceIds{ - 0x1902, - 0x190B, - 0x190A, - 0x1906, - 0x190E, - 0x1917, - 0x1913, - 0X1915, - 0x1912, - 0x191B, - 0x191A, - 0x1916, - 0x191E, - 0x191D, - 0x1921, - 0x9905, - 0x192B, - 0x192D, - 0x192A, - 0x1923, - 0x1926, - 0x1927, - 0x1932, - 0x193B, - 0x193A, - 0x193D}; -} // namespace NEO diff --git a/shared/source/gen9/skl/os_agnostic_product_helper_skl.inl b/shared/source/gen9/skl/os_agnostic_product_helper_skl.inl deleted file mode 100644 index 9a2e0aa0be..0000000000 --- a/shared/source/gen9/skl/os_agnostic_product_helper_skl.inl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "aubstream/product_family.h" - -namespace NEO { -template <> -std::optional ProductHelperHw::getAubStreamProductFamily() const { - return aub_stream::ProductFamily::Skl; -}; - -} // namespace NEO diff --git a/shared/source/gen9/state_base_address_gen9.cpp b/shared/source/gen9/state_base_address_gen9.cpp deleted file mode 100644 index bfe2fcfe63..0000000000 --- a/shared/source/gen9/state_base_address_gen9.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/state_base_address.h" -#include "shared/source/helpers/state_base_address_bdw_and_later.inl" -#include "shared/source/helpers/state_base_address_skl.inl" - -namespace NEO { -template struct StateBaseAddressHelper; -} diff --git a/shared/source/gen9/tbx_command_stream_receiver_gen9.cpp b/shared/source/gen9/tbx_command_stream_receiver_gen9.cpp deleted file mode 100644 index 072d24e38e..0000000000 --- a/shared/source/gen9/tbx_command_stream_receiver_gen9.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/array_count.h" -#include "shared/source/helpers/populate_factory.h" - -namespace NEO { - -typedef Gen9Family Family; -static auto gfxCore = IGFX_GEN9_CORE; - -template <> -void populateFactoryTable>() { - extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE]; - UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory)); - tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw::create; -} - -template class TbxCommandStreamReceiverHw; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen9/windows/command_stream_receiver_gen9.cpp b/shared/source/gen9/windows/command_stream_receiver_gen9.cpp deleted file mode 100644 index 0918062775..0000000000 --- a/shared/source/gen9/windows/command_stream_receiver_gen9.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/os_interface/windows/device_command_stream.inl" -#include "shared/source/os_interface/windows/wddm_device_command_stream.inl" - -namespace NEO { - -template class DeviceCommandStreamReceiver; -template class WddmCommandStreamReceiver; -template class CommandStreamReceiverWithAUBDump>; -} // namespace NEO diff --git a/shared/source/gen9/windows/direct_submission_gen9.cpp b/shared/source/gen9/windows/direct_submission_gen9.cpp deleted file mode 100644 index 38a13ea10e..0000000000 --- a/shared/source/gen9/windows/direct_submission_gen9.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/direct_submission/direct_submission_bdw_and_later.inl" -#include "shared/source/direct_submission/direct_submission_hw.inl" -#include "shared/source/direct_submission/direct_submission_prefetch_mitigation_base.inl" -#include "shared/source/direct_submission/direct_submission_prefetcher_base.inl" -#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/dispatcher.inl" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.inl" -#include "shared/source/direct_submission/windows/wddm_direct_submission.inl" -#include "shared/source/gen9/hw_cmds_base.h" - -namespace NEO { -using GfxFamily = Gen9Family; - -template class Dispatcher; -template class BlitterDispatcher; -template class RenderDispatcher; - -template class DirectSubmissionHw>; -template class DirectSubmissionHw>; - -template class WddmDirectSubmission>; -template class WddmDirectSubmission>; -} // namespace NEO diff --git a/shared/source/gen9/windows/gmm_callbacks_gen9.cpp b/shared/source/gen9/windows/gmm_callbacks_gen9.cpp deleted file mode 100644 index 3a8abde017..0000000000 --- a/shared/source/gen9/windows/gmm_callbacks_gen9.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/source/helpers/windows/gmm_callbacks.inl" - -namespace NEO { -template struct DeviceCallbacks; -template struct TTCallbacks; -} // namespace NEO diff --git a/shared/source/gen9/windows/product_helper_bxt.cpp b/shared/source/gen9/windows/product_helper_bxt.cpp deleted file mode 100644 index dbb1a89c04..0000000000 --- a/shared/source/gen9/windows/product_helper_bxt.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_BROXTON; - -#include "shared/source/gen9/bxt/os_agnostic_product_helper_bxt.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen9/windows/product_helper_cfl.cpp b/shared/source/gen9/windows/product_helper_cfl.cpp deleted file mode 100644 index 8936e434fc..0000000000 --- a/shared/source/gen9/windows/product_helper_cfl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_COFFEELAKE; - -#include "shared/source/gen9/cfl/os_agnostic_product_helper_cfl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen9/windows/product_helper_glk.cpp b/shared/source/gen9/windows/product_helper_glk.cpp deleted file mode 100644 index 552a25a44c..0000000000 --- a/shared/source/gen9/windows/product_helper_glk.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_GEMINILAKE; - -#include "shared/source/gen9/glk/os_agnostic_product_helper_glk.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen9/windows/product_helper_kbl.cpp b/shared/source/gen9/windows/product_helper_kbl.cpp deleted file mode 100644 index 0c09a15e94..0000000000 --- a/shared/source/gen9/windows/product_helper_kbl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_kbl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_KABYLAKE; - -#include "shared/source/gen9/kbl/os_agnostic_product_helper_kbl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/gen9/windows/product_helper_skl.cpp b/shared/source/gen9/windows/product_helper_skl.cpp deleted file mode 100644 index 4f398876b8..0000000000 --- a/shared/source/gen9/windows/product_helper_skl.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_bdw_and_later.inl" - -constexpr static auto gfxProduct = IGFX_SKYLAKE; - -#include "shared/source/gen9/skl/os_agnostic_product_helper_skl.inl" -#include "shared/source/os_interface/product_helper_before_gen12lp.inl" - -template class NEO::ProductHelperHw; diff --git a/shared/source/generated/gen11/hw_cmds_generated_gen11.inl b/shared/source/generated/gen11/hw_cmds_generated_gen11.inl deleted file mode 100644 index 84ae72f82b..0000000000 --- a/shared/source/generated/gen11/hw_cmds_generated_gen11.inl +++ /dev/null @@ -1,5391 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma pack(1) -typedef struct tagBINDING_TABLE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t SurfaceStatePointer : BITFIELD_RANGE(6, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPATCH_CONSTANTS { - SURFACESTATEPOINTER_BYTEOFFSET = 0x0, - SURFACESTATEPOINTER_INDEX = 0x0, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - } - static tagBINDING_TABLE_STATE sInit() { - BINDING_TABLE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline const uint32_t &getRawData(const uint32_t index) const { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - typedef enum tagSURFACESTATEPOINTER { - SURFACESTATEPOINTER_BIT_SHIFT = 0x6, - SURFACESTATEPOINTER_ALIGN_SIZE = 0x40, - } SURFACESTATEPOINTER; - inline void setSurfaceStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SurfaceStatePointer = (uint32_t)value >> SURFACESTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSurfaceStatePointer() const { - return (TheStructure.Common.SurfaceStatePointer << SURFACESTATEPOINTER_BIT_SHIFT); - } -} BINDING_TABLE_STATE; -STATIC_ASSERT(4 == sizeof(BINDING_TABLE_STATE)); - -typedef struct tagINTERFACE_DESCRIPTOR_DATA { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t KernelStartPointer : BITFIELD_RANGE(6, 31); - uint32_t KernelStartPointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_48 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 6); - uint32_t SoftwareExceptionEnable : BITFIELD_RANGE(7, 7); - uint32_t Reserved_72 : BITFIELD_RANGE(8, 10); - uint32_t MaskStackExceptionEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_76 : BITFIELD_RANGE(12, 12); - uint32_t IllegalOpcodeExceptionEnable : BITFIELD_RANGE(13, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t FloatingPointMode : BITFIELD_RANGE(16, 16); - uint32_t ThreadPriority : BITFIELD_RANGE(17, 17); - uint32_t SingleProgramFlow : BITFIELD_RANGE(18, 18); - uint32_t DenormMode : BITFIELD_RANGE(19, 19); - uint32_t ThreadPreemptionDisable : BITFIELD_RANGE(20, 20); - uint32_t Reserved_85 : BITFIELD_RANGE(21, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 1); - uint32_t SamplerCount : BITFIELD_RANGE(2, 4); - uint32_t SamplerStatePointer : BITFIELD_RANGE(5, 31); - uint32_t BindingTableEntryCount : BITFIELD_RANGE(0, 4); - uint32_t BindingTablePointer : BITFIELD_RANGE(5, 15); - uint32_t Reserved_144 : BITFIELD_RANGE(16, 31); - uint32_t ConstantUrbEntryReadOffset : BITFIELD_RANGE(0, 15); - uint32_t ConstantIndirectUrbEntryReadLength : BITFIELD_RANGE(16, 31); - uint32_t NumberOfThreadsInGpgpuThreadGroup : BITFIELD_RANGE(0, 9); - uint32_t Reserved_202 : BITFIELD_RANGE(10, 15); - uint32_t SharedLocalMemorySize : BITFIELD_RANGE(16, 20); - uint32_t BarrierEnable : BITFIELD_RANGE(21, 21); - uint32_t RoundingMode : BITFIELD_RANGE(22, 23); - uint32_t Reserved_216 : BITFIELD_RANGE(24, 31); - uint32_t Cross_ThreadConstantDataReadLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_232 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagFLOATING_POINT_MODE { - FLOATING_POINT_MODE_IEEE_754 = 0x0, - FLOATING_POINT_MODE_ALTERNATE = 0x1, - } FLOATING_POINT_MODE; - typedef enum tagTHREAD_PRIORITY { - THREAD_PRIORITY_NORMAL_PRIORITY = 0x0, - THREAD_PRIORITY_HIGH_PRIORITY = 0x1, - } THREAD_PRIORITY; - typedef enum tagSINGLE_PROGRAM_FLOW { - SINGLE_PROGRAM_FLOW_MULTIPLE = 0x0, - SINGLE_PROGRAM_FLOW_SINGLE = 0x1, - } SINGLE_PROGRAM_FLOW; - typedef enum tagDENORM_MODE { - DENORM_MODE_FTZ = 0x0, - DENORM_MODE_SETBYKERNEL = 0x1, - } DENORM_MODE; - typedef enum tagTHREAD_PREEMPTION_DISABLE { - THREAD_PREEMPTION_DISABLE_DISABLE = 0x0, - THREAD_PREEMPTION_DISABLE_ENABLE = 0x1, - } THREAD_PREEMPTION_DISABLE; - typedef enum tagSAMPLER_COUNT { - SAMPLER_COUNT_NO_SAMPLERS_USED = 0x0, - SAMPLER_COUNT_BETWEEN_1_AND_4_SAMPLERS_USED = 0x1, - SAMPLER_COUNT_BETWEEN_5_AND_8_SAMPLERS_USED = 0x2, - SAMPLER_COUNT_BETWEEN_9_AND_12_SAMPLERS_USED = 0x3, - SAMPLER_COUNT_BETWEEN_13_AND_16_SAMPLERS_USED = 0x4, - } SAMPLER_COUNT; - typedef enum tagSHARED_LOCAL_MEMORY_SIZE { - SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K = 0x0, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_1K = 0x1, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_2K = 0x2, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_4K = 0x3, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_8K = 0x4, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_16K = 0x5, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_32K = 0x6, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_64K = 0x7, - } SHARED_LOCAL_MEMORY_SIZE; - typedef enum tagROUNDING_MODE { - ROUNDING_MODE_RTNE = 0x0, - ROUNDING_MODE_RU = 0x1, - ROUNDING_MODE_RD = 0x2, - ROUNDING_MODE_RTZ = 0x3, - } ROUNDING_MODE; - typedef enum tagPATCH_CONSTANTS { - KERNELSTARTPOINTER_BYTEOFFSET = 0x0, - KERNELSTARTPOINTER_INDEX = 0x0, - KERNELSTARTPOINTERHIGH_BYTEOFFSET = 0x4, - KERNELSTARTPOINTERHIGH_INDEX = 0x1, - SAMPLERSTATEPOINTER_BYTEOFFSET = 0xc, - SAMPLERSTATEPOINTER_INDEX = 0x3, - BINDINGTABLEPOINTER_BYTEOFFSET = 0x10, - BINDINGTABLEPOINTER_INDEX = 0x4, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.FloatingPointMode = FLOATING_POINT_MODE_IEEE_754; - TheStructure.Common.ThreadPriority = THREAD_PRIORITY_NORMAL_PRIORITY; - TheStructure.Common.SingleProgramFlow = SINGLE_PROGRAM_FLOW_MULTIPLE; - TheStructure.Common.DenormMode = DENORM_MODE_FTZ; - TheStructure.Common.ThreadPreemptionDisable = THREAD_PREEMPTION_DISABLE_DISABLE; - TheStructure.Common.SamplerCount = SAMPLER_COUNT_NO_SAMPLERS_USED; - TheStructure.Common.SharedLocalMemorySize = SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K; - TheStructure.Common.RoundingMode = ROUNDING_MODE_RTNE; - } - static tagINTERFACE_DESCRIPTOR_DATA sInit() { - INTERFACE_DESCRIPTOR_DATA state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - typedef enum tagKERNELSTARTPOINTER { - KERNELSTARTPOINTER_BIT_SHIFT = 0x6, - KERNELSTARTPOINTER_ALIGN_SIZE = 0x40, - } KERNELSTARTPOINTER; - inline void setKernelStartPointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.KernelStartPointer = (uint32_t)value >> KERNELSTARTPOINTER_BIT_SHIFT; - } - inline uint32_t getKernelStartPointer() const { - return (TheStructure.Common.KernelStartPointer << KERNELSTARTPOINTER_BIT_SHIFT); - } - inline void setKernelStartPointerHigh(const uint32_t value) { - TheStructure.Common.KernelStartPointerHigh = value; - } - inline uint32_t getKernelStartPointerHigh() const { - return (TheStructure.Common.KernelStartPointerHigh); - } - inline void setSoftwareExceptionEnable(const bool value) { - TheStructure.Common.SoftwareExceptionEnable = value; - } - inline bool getSoftwareExceptionEnable() const { - return (TheStructure.Common.SoftwareExceptionEnable); - } - inline void setMaskStackExceptionEnable(const bool value) { - TheStructure.Common.MaskStackExceptionEnable = value; - } - inline bool getMaskStackExceptionEnable() const { - return (TheStructure.Common.MaskStackExceptionEnable); - } - inline void setIllegalOpcodeExceptionEnable(const bool value) { - TheStructure.Common.IllegalOpcodeExceptionEnable = value; - } - inline bool getIllegalOpcodeExceptionEnable() const { - return (TheStructure.Common.IllegalOpcodeExceptionEnable); - } - inline void setFloatingPointMode(const FLOATING_POINT_MODE value) { - TheStructure.Common.FloatingPointMode = value; - } - inline FLOATING_POINT_MODE getFloatingPointMode() const { - return static_cast(TheStructure.Common.FloatingPointMode); - } - inline void setThreadPriority(const THREAD_PRIORITY value) { - TheStructure.Common.ThreadPriority = value; - } - inline THREAD_PRIORITY getThreadPriority() const { - return static_cast(TheStructure.Common.ThreadPriority); - } - inline void setSingleProgramFlow(const SINGLE_PROGRAM_FLOW value) { - TheStructure.Common.SingleProgramFlow = value; - } - inline SINGLE_PROGRAM_FLOW getSingleProgramFlow() const { - return static_cast(TheStructure.Common.SingleProgramFlow); - } - inline void setDenormMode(const DENORM_MODE value) { - TheStructure.Common.DenormMode = value; - } - inline DENORM_MODE getDenormMode() const { - return static_cast(TheStructure.Common.DenormMode); - } - inline void setThreadPreemptionDisable(const THREAD_PREEMPTION_DISABLE value) { - TheStructure.Common.ThreadPreemptionDisable = value; - } - inline THREAD_PREEMPTION_DISABLE getThreadPreemptionDisable() const { - return static_cast(TheStructure.Common.ThreadPreemptionDisable); - } - inline void setSamplerCount(const SAMPLER_COUNT value) { - TheStructure.Common.SamplerCount = value; - } - inline SAMPLER_COUNT getSamplerCount() const { - return static_cast(TheStructure.Common.SamplerCount); - } - typedef enum tagSAMPLERSTATEPOINTER { - SAMPLERSTATEPOINTER_BIT_SHIFT = 0x5, - SAMPLERSTATEPOINTER_ALIGN_SIZE = 0x20, - } SAMPLERSTATEPOINTER; - inline void setSamplerStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SamplerStatePointer = (uint32_t)value >> SAMPLERSTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSamplerStatePointer() const { - return (TheStructure.Common.SamplerStatePointer << SAMPLERSTATEPOINTER_BIT_SHIFT); - } - inline void setBindingTableEntryCount(const uint32_t value) { - TheStructure.Common.BindingTableEntryCount = value; - } - inline uint32_t getBindingTableEntryCount() const { - return (TheStructure.Common.BindingTableEntryCount); - } - typedef enum tagBINDINGTABLEPOINTER { - BINDINGTABLEPOINTER_BIT_SHIFT = 0x5, - BINDINGTABLEPOINTER_ALIGN_SIZE = 0x20, - } BINDINGTABLEPOINTER; - inline void setBindingTablePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.BindingTablePointer = (uint32_t)value >> BINDINGTABLEPOINTER_BIT_SHIFT; - } - inline uint32_t getBindingTablePointer() const { - return (TheStructure.Common.BindingTablePointer << BINDINGTABLEPOINTER_BIT_SHIFT); - } - inline void setConstantUrbEntryReadOffset(const uint32_t value) { - TheStructure.Common.ConstantUrbEntryReadOffset = value; - } - inline uint32_t getConstantUrbEntryReadOffset() const { - return (TheStructure.Common.ConstantUrbEntryReadOffset); - } - inline void setConstantIndirectUrbEntryReadLength(const uint32_t value) { - TheStructure.Common.ConstantIndirectUrbEntryReadLength = value; - } - inline uint32_t getConstantIndirectUrbEntryReadLength() const { - return (TheStructure.Common.ConstantIndirectUrbEntryReadLength); - } - inline void setNumberOfThreadsInGpgpuThreadGroup(const uint32_t value) { - TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup = value; - } - inline uint32_t getNumberOfThreadsInGpgpuThreadGroup() const { - return (TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup); - } - inline void setSharedLocalMemorySize(const uint32_t value) { // patched - TheStructure.Common.SharedLocalMemorySize = value; - } - inline uint32_t getSharedLocalMemorySize() const { // patched - return static_cast(TheStructure.Common.SharedLocalMemorySize); - } - inline void setBarrierEnable(const uint32_t value) { - TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u; - } - inline bool getBarrierEnable() const { - return (TheStructure.Common.BarrierEnable); - } - inline void setRoundingMode(const ROUNDING_MODE value) { - TheStructure.Common.RoundingMode = value; - } - inline ROUNDING_MODE getRoundingMode() const { - return static_cast(TheStructure.Common.RoundingMode); - } - inline void setCrossThreadConstantDataReadLength(const uint32_t value) { - TheStructure.Common.Cross_ThreadConstantDataReadLength = value; - } - inline uint32_t getCrossThreadConstantDataReadLength() const { - return (TheStructure.Common.Cross_ThreadConstantDataReadLength); - } -} INTERFACE_DESCRIPTOR_DATA; -STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA)); - -typedef struct tagGPGPU_WALKER { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t PredicateEnable : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t IndirectParameterEnable : BITFIELD_RANGE(10, 10); - uint32_t Reserved_11 : BITFIELD_RANGE(11, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t Reserved_38 : BITFIELD_RANGE(6, 31); - uint32_t IndirectDataLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 5); - uint32_t IndirectDataStartAddress : BITFIELD_RANGE(6, 31); - uint32_t ThreadWidthCounterMaximum : BITFIELD_RANGE(0, 5); - uint32_t Reserved_134 : BITFIELD_RANGE(6, 7); - uint32_t ThreadHeightCounterMaximum : BITFIELD_RANGE(8, 13); - uint32_t Reserved_142 : BITFIELD_RANGE(14, 15); - uint32_t ThreadDepthCounterMaximum : BITFIELD_RANGE(16, 21); - uint32_t Reserved_150 : BITFIELD_RANGE(22, 29); - uint32_t SimdSize : BITFIELD_RANGE(30, 31); - uint32_t ThreadGroupIdStartingX; - uint32_t Reserved_192; - uint32_t ThreadGroupIdXDimension; - uint32_t ThreadGroupIdStartingY; - uint32_t Reserved_288; - uint32_t ThreadGroupIdYDimension; - uint32_t ThreadGroupIdStartingResumeZ; - uint32_t ThreadGroupIdZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; - } Common; - uint32_t RawData[15]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0xd, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_GPGPU_WALKER_SUBOP = 0x5, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_GPGPU_WALKER = 0x1, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagSIMD_SIZE { - SIMD_SIZE_SIMD8 = 0x0, - SIMD_SIZE_SIMD16 = 0x1, - SIMD_SIZE_SIMD32 = 0x2, - } SIMD_SIZE; - typedef enum tagPATCH_CONSTANTS { - INDIRECTDATASTARTADDRESS_BYTEOFFSET = 0xc, - INDIRECTDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_GPGPU_WALKER_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_GPGPU_WALKER; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.SimdSize = SIMD_SIZE_SIMD8; - } - static tagGPGPU_WALKER sInit() { - GPGPU_WALKER state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 15); - return TheStructure.RawData[index]; - } - inline void setPredicateEnable(const bool value) { - TheStructure.Common.PredicateEnable = value; - } - inline bool getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setIndirectParameterEnable(const bool value) { - TheStructure.Common.IndirectParameterEnable = value; - } - inline bool getIndirectParameterEnable() const { - return (TheStructure.Common.IndirectParameterEnable); - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setIndirectDataLength(const uint32_t value) { - TheStructure.Common.IndirectDataLength = value; - } - inline uint32_t getIndirectDataLength() const { - return (TheStructure.Common.IndirectDataLength); - } - typedef enum tagINDIRECTDATASTARTADDRESS { - INDIRECTDATASTARTADDRESS_BIT_SHIFT = 0x6, - INDIRECTDATASTARTADDRESS_ALIGN_SIZE = 0x40, - } INDIRECTDATASTARTADDRESS; - inline void setIndirectDataStartAddress(const uint32_t value) { - TheStructure.Common.IndirectDataStartAddress = value >> INDIRECTDATASTARTADDRESS_BIT_SHIFT; - } - inline uint32_t getIndirectDataStartAddress() const { - return (TheStructure.Common.IndirectDataStartAddress << INDIRECTDATASTARTADDRESS_BIT_SHIFT); - } - inline void setThreadWidthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadWidthCounterMaximum = value - 1; - } - inline uint32_t getThreadWidthCounterMaximum() const { - return (TheStructure.Common.ThreadWidthCounterMaximum + 1); - } - inline void setThreadHeightCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadHeightCounterMaximum = value - 1; - } - inline uint32_t getThreadHeightCounterMaximum() const { - return (TheStructure.Common.ThreadHeightCounterMaximum + 1); - } - inline void setThreadDepthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadDepthCounterMaximum = value; - } - inline uint32_t getThreadDepthCounterMaximum() const { - return (TheStructure.Common.ThreadDepthCounterMaximum); - } - inline void setSimdSize(const SIMD_SIZE value) { - TheStructure.Common.SimdSize = value; - } - inline SIMD_SIZE getSimdSize() const { - return static_cast(TheStructure.Common.SimdSize); - } - inline void setThreadGroupIdStartingX(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingX = value; - } - inline uint32_t getThreadGroupIdStartingX() const { - return (TheStructure.Common.ThreadGroupIdStartingX); - } - inline void setThreadGroupIdXDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdXDimension = value; - } - inline uint32_t getThreadGroupIdXDimension() const { - return (TheStructure.Common.ThreadGroupIdXDimension); - } - inline void setThreadGroupIdStartingY(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingY = value; - } - inline uint32_t getThreadGroupIdStartingY() const { - return (TheStructure.Common.ThreadGroupIdStartingY); - } - inline void setThreadGroupIdYDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdYDimension = value; - } - inline uint32_t getThreadGroupIdYDimension() const { - return (TheStructure.Common.ThreadGroupIdYDimension); - } - inline void setThreadGroupIdStartingResumeZ(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingResumeZ = value; - } - inline uint32_t getThreadGroupIdStartingResumeZ() const { - return (TheStructure.Common.ThreadGroupIdStartingResumeZ); - } - inline void setThreadGroupIdZDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdZDimension = value; - } - inline uint32_t getThreadGroupIdZDimension() const { - return (TheStructure.Common.ThreadGroupIdZDimension); - } - inline void setRightExecutionMask(const uint32_t value) { - TheStructure.Common.RightExecutionMask = value; - } - inline uint32_t getRightExecutionMask() const { - return (TheStructure.Common.RightExecutionMask); - } - inline void setBottomExecutionMask(const uint32_t value) { - TheStructure.Common.BottomExecutionMask = value; - } - inline uint32_t getBottomExecutionMask() const { - return (TheStructure.Common.BottomExecutionMask); - } - static constexpr uint32_t getInlineDataSize() { // patched - return 0u; - } - using InterfaceDescriptorType = INTERFACE_DESCRIPTOR_DATA; // patched - -} GPGPU_WALKER; -STATIC_ASSERT(60 == sizeof(GPGPU_WALKER)); - -typedef struct tagMEDIA_INTERFACE_DESCRIPTOR_LOAD { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32; - uint32_t InterfaceDescriptorTotalLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t InterfaceDescriptorDataStartAddress; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x2, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP = 0x2, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - INTERFACEDESCRIPTORDATASTARTADDRESS_BYTEOFFSET = 0xc, - INTERFACEDESCRIPTORDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_INTERFACE_DESCRIPTOR_LOAD sInit() { - MEDIA_INTERFACE_DESCRIPTOR_LOAD state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorTotalLength(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorTotalLength = value; - } - inline uint32_t getInterfaceDescriptorTotalLength() const { - return (TheStructure.Common.InterfaceDescriptorTotalLength); - } - inline void setInterfaceDescriptorDataStartAddress(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorDataStartAddress = value; - } - inline uint32_t getInterfaceDescriptorDataStartAddress() const { - return (TheStructure.Common.InterfaceDescriptorDataStartAddress); - } -} MEDIA_INTERFACE_DESCRIPTOR_LOAD; -STATIC_ASSERT(16 == sizeof(MEDIA_INTERFACE_DESCRIPTOR_LOAD)); - -typedef struct tagMEDIA_STATE_FLUSH { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t Reserved_38 : BITFIELD_RANGE(6, 6); - uint32_t FlushToGo : BITFIELD_RANGE(7, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[2]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x0, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP = 0x4, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_STATE_FLUSH sInit() { - MEDIA_STATE_FLUSH state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 2); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setFlushToGo(const bool value) { - TheStructure.Common.FlushToGo = value; - } - inline bool getFlushToGo() const { - return (TheStructure.Common.FlushToGo); - } -} MEDIA_STATE_FLUSH; -STATIC_ASSERT(8 == sizeof(MEDIA_STATE_FLUSH)); - -typedef struct tagMEDIA_VFE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t PerThreadScratchSpace : BITFIELD_RANGE(0, 3); - uint32_t StackSize : BITFIELD_RANGE(4, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 9); - uint32_t ScratchSpaceBasePointer : BITFIELD_RANGE(10, 31); - uint32_t ScratchSpaceBasePointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 1); - uint32_t DispatchLoadBalance : BITFIELD_RANGE(2, 2); - uint32_t Reserved_99 : BITFIELD_RANGE(3, 5); - uint32_t DisableSlice0Subslice2 : BITFIELD_RANGE(6, 6); - uint32_t Reserved_103 : BITFIELD_RANGE(7, 7); - uint32_t NumberOfUrbEntries : BITFIELD_RANGE(8, 15); - uint32_t MaximumNumberOfThreads : BITFIELD_RANGE(16, 31); - uint32_t MaximumNumberOfDual_Subslices : BITFIELD_RANGE(0, 7); - uint32_t Reserved_136 : BITFIELD_RANGE(8, 31); - uint32_t CurbeAllocationSize : BITFIELD_RANGE(0, 15); - uint32_t UrbEntryAllocationSize : BITFIELD_RANGE(16, 31); - uint32_t Reserved_192; - uint32_t Reserved_224; - uint32_t Reserved_256; - } Common; - uint32_t RawData[9]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x7, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_VFE_STATE_SUBOP = 0x0, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagDISPATCH_LOAD_BALANCE { - DISPATCH_LOAD_BALANCE_LEAST_LOADED = 0x0, - DISPATCH_LOAD_BALANCE_COLOR_LSB = 0x1, - } DISPATCH_LOAD_BALANCE; - typedef enum tagPATCH_CONSTANTS { - SCRATCHSPACEBASEPOINTER_BYTEOFFSET = 0x4, - SCRATCHSPACEBASEPOINTER_INDEX = 0x1, - SCRATCHSPACEBASEPOINTERHIGH_BYTEOFFSET = 0x8, - SCRATCHSPACEBASEPOINTERHIGH_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_VFE_STATE_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.DispatchLoadBalance = DISPATCH_LOAD_BALANCE_LEAST_LOADED; - } - static tagMEDIA_VFE_STATE sInit() { - MEDIA_VFE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 9); - return TheStructure.RawData[index]; - } - inline void setPerThreadScratchSpace(const uint32_t value) { - TheStructure.Common.PerThreadScratchSpace = value; - } - inline uint32_t getPerThreadScratchSpace() const { - return (TheStructure.Common.PerThreadScratchSpace); - } - inline void setStackSize(const uint32_t value) { - TheStructure.Common.StackSize = value; - } - inline uint32_t getStackSize() const { - return (TheStructure.Common.StackSize); - } - typedef enum tagSCRATCHSPACEBASEPOINTER { - SCRATCHSPACEBASEPOINTER_BIT_SHIFT = 0xa, - SCRATCHSPACEBASEPOINTER_ALIGN_SIZE = 0x400, - } SCRATCHSPACEBASEPOINTER; - inline void setScratchSpaceBasePointer(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointer = value >> SCRATCHSPACEBASEPOINTER_BIT_SHIFT; - } - inline uint32_t getScratchSpaceBasePointer() const { - return (TheStructure.Common.ScratchSpaceBasePointer << SCRATCHSPACEBASEPOINTER_BIT_SHIFT); - } - inline void setScratchSpaceBasePointerHigh(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointerHigh = value; - } - inline uint32_t getScratchSpaceBasePointerHigh() const { - return (TheStructure.Common.ScratchSpaceBasePointerHigh); - } - inline void setDispatchLoadBalance(const DISPATCH_LOAD_BALANCE value) { - TheStructure.Common.DispatchLoadBalance = value; - } - inline DISPATCH_LOAD_BALANCE getDispatchLoadBalance() const { - return static_cast(TheStructure.Common.DispatchLoadBalance); - } - inline void setDisableSlice0Subslice2(const bool value) { - TheStructure.Common.DisableSlice0Subslice2 = value; - } - inline bool getDisableSlice0Subslice2() const { - return (TheStructure.Common.DisableSlice0Subslice2); - } - inline void setNumberOfUrbEntries(const uint32_t value) { - TheStructure.Common.NumberOfUrbEntries = value; - } - inline uint32_t getNumberOfUrbEntries() const { - return (TheStructure.Common.NumberOfUrbEntries); - } - inline void setMaximumNumberOfThreads(const uint32_t value) { - TheStructure.Common.MaximumNumberOfThreads = value - 1; - } - inline uint32_t getMaximumNumberOfThreads() const { - return (TheStructure.Common.MaximumNumberOfThreads + 1); - } - inline void setMaximumNumberOfDualSubslices(const uint32_t value) { - TheStructure.Common.MaximumNumberOfDual_Subslices = value; - } - inline uint32_t getMaximumNumberOfDualSubslices() const { - return (TheStructure.Common.MaximumNumberOfDual_Subslices); - } - inline void setCurbeAllocationSize(const uint32_t value) { - TheStructure.Common.CurbeAllocationSize = value; - } - inline uint32_t getCurbeAllocationSize() const { - return (TheStructure.Common.CurbeAllocationSize); - } - inline void setUrbEntryAllocationSize(const uint32_t value) { - TheStructure.Common.UrbEntryAllocationSize = value; - } - inline uint32_t getUrbEntryAllocationSize() const { - return (TheStructure.Common.UrbEntryAllocationSize); - } -} MEDIA_VFE_STATE; -STATIC_ASSERT(36 == sizeof(MEDIA_VFE_STATE)); - -typedef struct tagMI_ARB_CHECK { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MiInstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t MiInstructionType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_INSTRUCTION_OPCODE { - MI_INSTRUCTION_OPCODE_MI_ARB_CHECK = 0x5, - } MI_INSTRUCTION_OPCODE; - typedef enum tagMI_INSTRUCTION_TYPE { - MI_INSTRUCTION_TYPE_MI_INSTRUCTION = 0x0, - } MI_INSTRUCTION_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiInstructionOpcode = MI_INSTRUCTION_OPCODE_MI_ARB_CHECK; - TheStructure.Common.MiInstructionType = MI_INSTRUCTION_TYPE_MI_INSTRUCTION; - } - static tagMI_ARB_CHECK sInit() { - MI_ARB_CHECK state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setMiInstructionOpcode(const MI_INSTRUCTION_OPCODE value) { - TheStructure.Common.MiInstructionOpcode = value; - } - inline MI_INSTRUCTION_OPCODE getMiInstructionOpcode() const { - return static_cast(TheStructure.Common.MiInstructionOpcode); - } - inline void setMiInstructionType(const MI_INSTRUCTION_TYPE value) { - TheStructure.Common.MiInstructionType = value; - } - inline MI_INSTRUCTION_TYPE getMiInstructionType() const { - return static_cast(TheStructure.Common.MiInstructionType); - } -} MI_ARB_CHECK; -STATIC_ASSERT(4 == sizeof(MI_ARB_CHECK)); - -typedef struct tagMI_ATOMIC { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AtomicOpcode : BITFIELD_RANGE(8, 15); - uint32_t ReturnDataControl : BITFIELD_RANGE(16, 16); - uint32_t CsStall : BITFIELD_RANGE(17, 17); - uint32_t InlineData : BITFIELD_RANGE(18, 18); - uint32_t DataSize : BITFIELD_RANGE(19, 20); - uint32_t Post_SyncOperation : BITFIELD_RANGE(21, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t MemoryAddress : BITFIELD_RANGE(2, 31); - uint32_t MemoryAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Operand1DataDword0; - uint32_t Operand2DataDword0; - uint32_t Operand1DataDword1; - uint32_t Operand2DataDword1; - uint32_t Operand1DataDword2; - uint32_t Operand2DataDword2; - uint32_t Operand1DataDword3; - uint32_t Operand2DataDword3; - } Common; - uint32_t RawData[11]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_INLINE_DATA_0 = 0x1, - DWORD_LENGTH_INLINE_DATA_1 = 0x9, - } DWORD_LENGTH; - typedef enum tagDATA_SIZE { - DATA_SIZE_DWORD = 0x0, - DATA_SIZE_QWORD = 0x1, - DATA_SIZE_OCTWORD = 0x2, - } DATA_SIZE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION = 0x0, - POST_SYNC_OPERATION_POST_SYNC_OPERATION = 0x1, - } POST_SYNC_OPERATION; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_ATOMIC = 0x2f, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - typedef enum tagATOMIC_OPCODES { - ATOMIC_4B_MOVE = 0x4, - ATOMIC_4B_INCREMENT = 0x5, - ATOMIC_4B_DECREMENT = 0x6, - ATOMIC_8B_MOVE = 0x24, - ATOMIC_8B_INCREMENT = 0x25, - ATOMIC_8B_DECREMENT = 0x26, - ATOMIC_8B_ADD = 0x27, - ATOMIC_8B_CMP_WR = 0x2E, - } ATOMIC_OPCODES; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_INLINE_DATA_0; - TheStructure.Common.DataSize = DATA_SIZE_DWORD; - TheStructure.Common.Post_SyncOperation = POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_ATOMIC; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_ATOMIC sInit() { - MI_ATOMIC state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 11); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setAtomicOpcode(const uint32_t value) { - TheStructure.Common.AtomicOpcode = value; - } - inline uint32_t getAtomicOpcode() const { - return (TheStructure.Common.AtomicOpcode); - } - inline void setReturnDataControl(const uint32_t value) { - TheStructure.Common.ReturnDataControl = value; - } - inline uint32_t getReturnDataControl() const { - return (TheStructure.Common.ReturnDataControl); - } - inline void setCsStall(const uint32_t value) { - TheStructure.Common.CsStall = value; - } - inline uint32_t getCsStall() const { - return (TheStructure.Common.CsStall); - } - inline void setInlineData(const uint32_t value) { - TheStructure.Common.InlineData = value; - } - inline uint32_t getInlineData() const { - return (TheStructure.Common.InlineData); - } - inline void setDataSize(const DATA_SIZE value) { - TheStructure.Common.DataSize = value; - } - inline DATA_SIZE getDataSize() const { - return static_cast(TheStructure.Common.DataSize); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.Post_SyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.Post_SyncOperation); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint32_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint32_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setMemoryAddressHigh(const uint32_t value) { - TheStructure.Common.MemoryAddressHigh = value; - } - inline uint32_t getMemoryAddressHigh() const { - return (TheStructure.Common.MemoryAddressHigh); - } - inline void setOperand1DataDword0(const uint32_t value) { - TheStructure.Common.Operand1DataDword0 = value; - } - inline uint32_t getOperand1DataDword0() const { - return (TheStructure.Common.Operand1DataDword0); - } - inline void setOperand2DataDword0(const uint32_t value) { - TheStructure.Common.Operand2DataDword0 = value; - } - inline uint32_t getOperand2DataDword0() const { - return (TheStructure.Common.Operand2DataDword0); - } - inline void setOperand1DataDword1(const uint32_t value) { - TheStructure.Common.Operand1DataDword1 = value; - } - inline uint32_t getOperand1DataDword1() const { - return (TheStructure.Common.Operand1DataDword1); - } - inline void setOperand2DataDword1(const uint32_t value) { - TheStructure.Common.Operand2DataDword1 = value; - } - inline uint32_t getOperand2DataDword1() const { - return (TheStructure.Common.Operand2DataDword1); - } - inline void setOperand1DataDword2(const uint32_t value) { - TheStructure.Common.Operand1DataDword2 = value; - } - inline uint32_t getOperand1DataDword2() const { - return (TheStructure.Common.Operand1DataDword2); - } - inline void setOperand2DataDword2(const uint32_t value) { - TheStructure.Common.Operand2DataDword2 = value; - } - inline uint32_t getOperand2DataDword2() const { - return (TheStructure.Common.Operand2DataDword2); - } - inline void setOperand1DataDword3(const uint32_t value) { - TheStructure.Common.Operand1DataDword3 = value; - } - inline uint32_t getOperand1DataDword3() const { - return (TheStructure.Common.Operand1DataDword3); - } - inline void setOperand2DataDword3(const uint32_t value) { - TheStructure.Common.Operand2DataDword3 = value; - } - inline uint32_t getOperand2DataDword3() const { - return (TheStructure.Common.Operand2DataDword3); - } -} MI_ATOMIC; -STATIC_ASSERT(44 == sizeof(MI_ATOMIC)); - -typedef struct tagMI_BATCH_BUFFER_END { - union tagTheStructure { - struct tagCommon { - uint32_t EndContext : BITFIELD_RANGE(0, 0); - uint32_t Reserved_1 : BITFIELD_RANGE(1, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END = 0xa, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_END sInit() { - MI_BATCH_BUFFER_END state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setEndContext(const bool value) { - TheStructure.Common.EndContext = value; - } - inline bool getEndContext() const { - return (TheStructure.Common.EndContext); - } -} MI_BATCH_BUFFER_END; -STATIC_ASSERT(4 == sizeof(MI_BATCH_BUFFER_END)); - -typedef struct tagMI_LOAD_REGISTER_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t ByteWriteDisables : BITFIELD_RANGE(8, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 18); - uint32_t AddCsMmioStartOffset : BITFIELD_RANGE(19, 19); - uint32_t Reserved_20 : BITFIELD_RANGE(20, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterOffset : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t DataDword; - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM = 0x22, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_IMM sInit() { - MI_LOAD_REGISTER_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setByteWriteDisables(const uint32_t value) { - TheStructure.Common.ByteWriteDisables = value; - } - inline uint32_t getByteWriteDisables() const { - return (TheStructure.Common.ByteWriteDisables); - } - inline void setAddCsMmioStartOffset(const uint32_t value) { - TheStructure.Common.AddCsMmioStartOffset = value; - } - inline uint32_t getAddCsMmioStartOffset() const { - return (TheStructure.Common.AddCsMmioStartOffset); - } - typedef enum tagREGISTEROFFSET { - REGISTEROFFSET_BIT_SHIFT = 0x2, - REGISTEROFFSET_ALIGN_SIZE = 0x4, - } REGISTEROFFSET; - inline void setRegisterOffset(const uint32_t value) { - TheStructure.Common.RegisterOffset = value >> REGISTEROFFSET_BIT_SHIFT; - } - inline uint32_t getRegisterOffset() const { - return (TheStructure.Common.RegisterOffset << REGISTEROFFSET_BIT_SHIFT); - } - inline void setDataDword(const uint32_t value) { - TheStructure.Common.DataDword = value; - } - inline uint32_t getDataDword() const { - return (TheStructure.Common.DataDword); - } -} MI_LOAD_REGISTER_IMM; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_IMM)); - -typedef struct tagMI_LOAD_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 18); - uint32_t AddCsMmioStartOffset : BITFIELD_RANGE(19, 19); - uint32_t Reserved_20 : BITFIELD_RANGE(20, 20); - uint32_t AsyncModeEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM = 0x29, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_MEM sInit() { - MI_LOAD_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setAddCsMmioStartOffset(const uint32_t value) { - TheStructure.Common.AddCsMmioStartOffset = value; - } - inline uint32_t getAddCsMmioStartOffset() const { - return (TheStructure.Common.AddCsMmioStartOffset); - } - inline void setAsyncModeEnable(const bool value) { - TheStructure.Common.AsyncModeEnable = value; - } - inline bool getAsyncModeEnable() const { - return (TheStructure.Common.AsyncModeEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_LOAD_REGISTER_MEM)); - -typedef struct tagMI_LOAD_REGISTER_REG { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 17); - uint32_t AddCsMmioStartOffsetSource : BITFIELD_RANGE(18, 18); - uint32_t AddCsMmioStartOffsetDestination : BITFIELD_RANGE(19, 19); - uint32_t Reserved_20 : BITFIELD_RANGE(20, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t SourceRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t DestinationRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_87 : BITFIELD_RANGE(23, 31); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG = 0x2a, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_REG sInit() { - MI_LOAD_REGISTER_REG state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setAddCsMmioStartOffsetSource(const uint32_t value) { - TheStructure.Common.AddCsMmioStartOffsetSource = value; - } - inline uint32_t getAddCsMmioStartOffsetSource() const { - return (TheStructure.Common.AddCsMmioStartOffsetSource); - } - inline void setAddCsMmioStartOffsetDestination(const uint32_t value) { - TheStructure.Common.AddCsMmioStartOffsetDestination = value; - } - inline uint32_t getAddCsMmioStartOffsetDestination() const { - return (TheStructure.Common.AddCsMmioStartOffsetDestination); - } - typedef enum tagSOURCEREGISTERADDRESS { - SOURCEREGISTERADDRESS_BIT_SHIFT = 0x2, - SOURCEREGISTERADDRESS_ALIGN_SIZE = 0x4, - } SOURCEREGISTERADDRESS; - inline void setSourceRegisterAddress(const uint32_t value) { - TheStructure.Common.SourceRegisterAddress = value >> SOURCEREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getSourceRegisterAddress() const { - return (TheStructure.Common.SourceRegisterAddress << SOURCEREGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagDESTINATIONREGISTERADDRESS { - DESTINATIONREGISTERADDRESS_BIT_SHIFT = 0x2, - DESTINATIONREGISTERADDRESS_ALIGN_SIZE = 0x4, - } DESTINATIONREGISTERADDRESS; - inline void setDestinationRegisterAddress(const uint32_t value) { - TheStructure.Common.DestinationRegisterAddress = value >> DESTINATIONREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getDestinationRegisterAddress() const { - return (TheStructure.Common.DestinationRegisterAddress << DESTINATIONREGISTERADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_REG; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_REG)); - -typedef struct tagMI_NOOP { - union tagTheStructure { - struct tagCommon { - uint32_t IdentificationNumber : BITFIELD_RANGE(0, 21); - uint32_t IdentificationNumberRegisterWriteEnable : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_NOOP = 0x0, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_NOOP; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_NOOP sInit() { - MI_NOOP state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setIdentificationNumber(const uint32_t value) { - TheStructure.Common.IdentificationNumber = value; - } - inline uint32_t getIdentificationNumber() const { - return (TheStructure.Common.IdentificationNumber); - } - inline void setIdentificationNumberRegisterWriteEnable(const bool value) { - TheStructure.Common.IdentificationNumberRegisterWriteEnable = value; - } - inline bool getIdentificationNumberRegisterWriteEnable() const { - return (TheStructure.Common.IdentificationNumberRegisterWriteEnable); - } -} MI_NOOP; -STATIC_ASSERT(4 == sizeof(MI_NOOP)); - -typedef struct tagMI_STORE_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 18); - uint32_t AddCsMmioStartOffset : BITFIELD_RANGE(19, 19); - uint32_t Reserved_20 : BITFIELD_RANGE(20, 20); - uint32_t PredicateEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM = 0x24, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_REGISTER_MEM sInit() { - MI_STORE_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setAddCsMmioStartOffset(const uint32_t value) { - TheStructure.Common.AddCsMmioStartOffset = value; - } - inline uint32_t getAddCsMmioStartOffset() const { - return (TheStructure.Common.AddCsMmioStartOffset); - } - inline void setPredicateEnable(const bool value) { - TheStructure.Common.PredicateEnable = value; - } - inline bool getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_STORE_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_STORE_REGISTER_MEM)); - -typedef struct tagPIPELINE_SELECT { - union tagTheStructure { - struct tagCommon { - uint32_t PipelineSelection : BITFIELD_RANGE(0, 1); - uint32_t RenderSliceCommonPowerGateEnable : BITFIELD_RANGE(2, 2); - uint32_t RenderSamplerPowerGateEnable : BITFIELD_RANGE(3, 3); - uint32_t MediaSamplerDopClockGateEnable : BITFIELD_RANGE(4, 4); - uint32_t ForceMediaAwake : BITFIELD_RANGE(5, 5); - uint32_t MediaSamplerPowerClockGateDisable : BITFIELD_RANGE(6, 6); - uint32_t Reserved_7 : BITFIELD_RANGE(7, 7); - uint32_t MaskBits : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPIPELINE_SELECTION { - PIPELINE_SELECTION_3D = 0x0, - PIPELINE_SELECTION_MEDIA = 0x1, - PIPELINE_SELECTION_GPGPU = 0x2, - } PIPELINE_SELECTION; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW = 0x1, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.PipelineSelection = PIPELINE_SELECTION_3D; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagPIPELINE_SELECT sInit() { - PIPELINE_SELECT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setPipelineSelection(const PIPELINE_SELECTION value) { - TheStructure.Common.PipelineSelection = value; - } - inline PIPELINE_SELECTION getPipelineSelection() const { - return static_cast(TheStructure.Common.PipelineSelection); - } - inline void setRenderSliceCommonPowerGateEnable(const bool value) { - TheStructure.Common.RenderSliceCommonPowerGateEnable = value; - } - inline bool getRenderSliceCommonPowerGateEnable() const { - return (TheStructure.Common.RenderSliceCommonPowerGateEnable); - } - inline void setRenderSamplerPowerGateEnable(const bool value) { - TheStructure.Common.RenderSamplerPowerGateEnable = value; - } - inline bool getRenderSamplerPowerGateEnable() const { - return (TheStructure.Common.RenderSamplerPowerGateEnable); - } - inline void setMediaSamplerDopClockGateEnable(const bool value) { - TheStructure.Common.MediaSamplerDopClockGateEnable = value; - } - inline bool getMediaSamplerDopClockGateEnable() const { - return (TheStructure.Common.MediaSamplerDopClockGateEnable); - } - inline void setForceMediaAwake(const bool value) { - TheStructure.Common.ForceMediaAwake = value; - } - inline bool getForceMediaAwake() const { - return (TheStructure.Common.ForceMediaAwake); - } - inline void setMediaSamplerPowerClockGateDisable(const uint32_t value) { - TheStructure.Common.MediaSamplerPowerClockGateDisable = value; - } - inline uint32_t getMediaSamplerPowerClockGateDisable() const { - return (TheStructure.Common.MediaSamplerPowerClockGateDisable); - } - inline void setMaskBits(const uint32_t value) { - TheStructure.Common.MaskBits = value; - } - inline uint32_t getMaskBits() const { - return (TheStructure.Common.MaskBits); - } -} PIPELINE_SELECT; -STATIC_ASSERT(4 == sizeof(PIPELINE_SELECT)); - -typedef struct tagPIPE_CONTROL { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t DepthCacheFlushEnable : BITFIELD_RANGE(0, 0); - uint32_t StallAtPixelScoreboard : BITFIELD_RANGE(1, 1); - uint32_t StateCacheInvalidationEnable : BITFIELD_RANGE(2, 2); - uint32_t ConstantCacheInvalidationEnable : BITFIELD_RANGE(3, 3); - uint32_t VfCacheInvalidationEnable : BITFIELD_RANGE(4, 4); - uint32_t DcFlushEnable : BITFIELD_RANGE(5, 5); - uint32_t ProtectedMemoryApplicationId : BITFIELD_RANGE(6, 6); - uint32_t PipeControlFlushEnable : BITFIELD_RANGE(7, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t IndirectStatePointersDisable : BITFIELD_RANGE(9, 9); - uint32_t TextureCacheInvalidationEnable : BITFIELD_RANGE(10, 10); - uint32_t InstructionCacheInvalidateEnable : BITFIELD_RANGE(11, 11); - uint32_t RenderTargetCacheFlushEnable : BITFIELD_RANGE(12, 12); - uint32_t DepthStallEnable : BITFIELD_RANGE(13, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t GenericMediaStateClear : BITFIELD_RANGE(16, 16); - uint32_t PsdSyncEnable : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t GlobalSnapshotCountReset : BITFIELD_RANGE(19, 19); - uint32_t CommandStreamerStallEnable : BITFIELD_RANGE(20, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_54 : BITFIELD_RANGE(22, 22); - uint32_t LriPostSyncOperation : BITFIELD_RANGE(23, 23); - uint32_t DestinationAddressType : BITFIELD_RANGE(24, 24); - uint32_t Reserved_57 : BITFIELD_RANGE(25, 25); - uint32_t FlushLlc : BITFIELD_RANGE(26, 26); - uint32_t ProtectedMemoryDisable : BITFIELD_RANGE(27, 27); - uint32_t TileCacheFlushEnable : BITFIELD_RANGE(28, 28); - uint32_t Reserved_61 : BITFIELD_RANGE(29, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t Address : BITFIELD_RANGE(2, 31); - uint32_t AddressHigh; - uint64_t ImmediateData; - } Common; - uint32_t RawData[6]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x4, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL = 0x0, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_PIPE_CONTROL = 0x2, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_3D = 0x3, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA = 0x1, - POST_SYNC_OPERATION_WRITE_PS_DEPTH_COUNT = 0x2, - POST_SYNC_OPERATION_WRITE_TIMESTAMP = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagGLOBAL_SNAPSHOT_COUNT_RESET { - GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET = 0x0, - GLOBAL_SNAPSHOT_COUNT_RESET_RESET = 0x1, - } GLOBAL_SNAPSHOT_COUNT_RESET; - typedef enum tagLRI_POST_SYNC_OPERATION { - LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION = 0x0, - LRI_POST_SYNC_OPERATION_MMIO_WRITE_IMMEDIATE_DATA = 0x1, - } LRI_POST_SYNC_OPERATION; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - typedef enum tagPATCH_CONSTANTS { - ADDRESS_BYTEOFFSET = 0x8, - ADDRESS_INDEX = 0x2, - ADDRESSHIGH_BYTEOFFSET = 0xc, - ADDRESSHIGH_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_PIPE_CONTROL; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_3D; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.GlobalSnapshotCountReset = GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET; - TheStructure.Common.LriPostSyncOperation = LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagPIPE_CONTROL sInit() { - PIPE_CONTROL state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 6); - return TheStructure.RawData[index]; - } - inline void setDepthCacheFlushEnable(const bool value) { - TheStructure.Common.DepthCacheFlushEnable = value; - } - inline bool getDepthCacheFlushEnable() const { - return (TheStructure.Common.DepthCacheFlushEnable); - } - inline void setStallAtPixelScoreboard(const bool value) { - TheStructure.Common.StallAtPixelScoreboard = value; - } - inline bool getStallAtPixelScoreboard() const { - return (TheStructure.Common.StallAtPixelScoreboard); - } - inline void setStateCacheInvalidationEnable(const bool value) { - TheStructure.Common.StateCacheInvalidationEnable = value; - } - inline bool getStateCacheInvalidationEnable() const { - return (TheStructure.Common.StateCacheInvalidationEnable); - } - inline void setConstantCacheInvalidationEnable(const bool value) { - TheStructure.Common.ConstantCacheInvalidationEnable = value; - } - inline bool getConstantCacheInvalidationEnable() const { - return (TheStructure.Common.ConstantCacheInvalidationEnable); - } - inline void setVfCacheInvalidationEnable(const bool value) { - TheStructure.Common.VfCacheInvalidationEnable = value; - } - inline bool getVfCacheInvalidationEnable() const { - return (TheStructure.Common.VfCacheInvalidationEnable); - } - inline void setDcFlushEnable(const bool value) { - TheStructure.Common.DcFlushEnable = value; - } - inline bool getDcFlushEnable() const { - return (TheStructure.Common.DcFlushEnable); - } - inline void setProtectedMemoryApplicationId(const uint32_t value) { - TheStructure.Common.ProtectedMemoryApplicationId = value; - } - inline uint32_t getProtectedMemoryApplicationId() const { - return (TheStructure.Common.ProtectedMemoryApplicationId); - } - inline void setPipeControlFlushEnable(const bool value) { - TheStructure.Common.PipeControlFlushEnable = value; - } - inline bool getPipeControlFlushEnable() const { - return (TheStructure.Common.PipeControlFlushEnable); - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return (TheStructure.Common.NotifyEnable); - } - inline void setIndirectStatePointersDisable(const bool value) { - TheStructure.Common.IndirectStatePointersDisable = value; - } - inline bool getIndirectStatePointersDisable() const { - return (TheStructure.Common.IndirectStatePointersDisable); - } - inline void setTextureCacheInvalidationEnable(const bool value) { - TheStructure.Common.TextureCacheInvalidationEnable = value; - } - inline bool getTextureCacheInvalidationEnable() const { - return (TheStructure.Common.TextureCacheInvalidationEnable); - } - inline void setInstructionCacheInvalidateEnable(const bool value) { - TheStructure.Common.InstructionCacheInvalidateEnable = value; - } - inline bool getInstructionCacheInvalidateEnable() const { - return (TheStructure.Common.InstructionCacheInvalidateEnable); - } - inline void setRenderTargetCacheFlushEnable(const bool value) { - TheStructure.Common.RenderTargetCacheFlushEnable = value; - } - inline bool getRenderTargetCacheFlushEnable() const { - return (TheStructure.Common.RenderTargetCacheFlushEnable); - } - inline void setDepthStallEnable(const bool value) { - TheStructure.Common.DepthStallEnable = value; - } - inline bool getDepthStallEnable() const { - return (TheStructure.Common.DepthStallEnable); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setGenericMediaStateClear(const bool value) { - TheStructure.Common.GenericMediaStateClear = value; - } - inline bool getGenericMediaStateClear() const { - return (TheStructure.Common.GenericMediaStateClear); - } - inline void setPsdSyncEnable(const bool value) { - TheStructure.Common.PsdSyncEnable = value; - } - inline bool getPsdSyncEnable() const { - return (TheStructure.Common.PsdSyncEnable); - } - inline void setTlbInvalidate(const uint32_t value) { - TheStructure.Common.TlbInvalidate = value; - } - inline uint32_t getTlbInvalidate() const { - return (TheStructure.Common.TlbInvalidate); - } - inline void setGlobalSnapshotCountReset(const GLOBAL_SNAPSHOT_COUNT_RESET value) { - TheStructure.Common.GlobalSnapshotCountReset = value; - } - inline GLOBAL_SNAPSHOT_COUNT_RESET getGlobalSnapshotCountReset() const { - return static_cast(TheStructure.Common.GlobalSnapshotCountReset); - } - inline void setCommandStreamerStallEnable(const uint32_t value) { - TheStructure.Common.CommandStreamerStallEnable = value; - } - inline uint32_t getCommandStreamerStallEnable() const { - return (TheStructure.Common.CommandStreamerStallEnable); - } - inline void setStoreDataIndex(const uint32_t value) { - TheStructure.Common.StoreDataIndex = value; - } - inline uint32_t getStoreDataIndex() const { - return (TheStructure.Common.StoreDataIndex); - } - inline void setLriPostSyncOperation(const LRI_POST_SYNC_OPERATION value) { - TheStructure.Common.LriPostSyncOperation = value; - } - inline LRI_POST_SYNC_OPERATION getLriPostSyncOperation() const { - return static_cast(TheStructure.Common.LriPostSyncOperation); - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - inline void setFlushLlc(const bool value) { - TheStructure.Common.FlushLlc = value; - } - inline bool getFlushLlc() const { - return (TheStructure.Common.FlushLlc); - } - inline void setProtectedMemoryDisable(const uint32_t value) { - TheStructure.Common.ProtectedMemoryDisable = value; - } - inline uint32_t getProtectedMemoryDisable() const { - return (TheStructure.Common.ProtectedMemoryDisable); - } - inline void setTileCacheFlushEnable(const uint32_t value) { - TheStructure.Common.TileCacheFlushEnable = value; - } - inline uint32_t getTileCacheFlushEnable() const { - return (TheStructure.Common.TileCacheFlushEnable); - } - typedef enum tagADDRESS { - ADDRESS_BIT_SHIFT = 0x2, - ADDRESS_ALIGN_SIZE = 0x4, - } ADDRESS; - inline void setAddress(const uint32_t value) { - TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT; - } - inline uint32_t getAddress() const { - return (TheStructure.Common.Address << ADDRESS_BIT_SHIFT); - } - inline void setAddressHigh(const uint32_t value) { - TheStructure.Common.AddressHigh = value; - } - inline uint32_t getAddressHigh() const { - return (TheStructure.Common.AddressHigh); - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return (TheStructure.Common.ImmediateData); - } -} PIPE_CONTROL; -STATIC_ASSERT(24 == sizeof(PIPE_CONTROL)); - -typedef struct tagRENDER_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t MediaBoundaryPixelMode : BITFIELD_RANGE(6, 7); - uint32_t RenderCacheReadWriteMode : BITFIELD_RANGE(8, 8); - uint32_t SamplerL2OutOfOrderModeDisable : BITFIELD_RANGE(9, 9); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(10, 10); - uint32_t VerticalLineStride : BITFIELD_RANGE(11, 11); - uint32_t TileMode : BITFIELD_RANGE(12, 13); - uint32_t SurfaceHorizontalAlignment : BITFIELD_RANGE(14, 15); - uint32_t SurfaceVerticalAlignment : BITFIELD_RANGE(16, 17); - uint32_t SurfaceFormat : BITFIELD_RANGE(18, 26); - uint32_t Astc_Enable : BITFIELD_RANGE(27, 27); - uint32_t SurfaceArray : BITFIELD_RANGE(28, 28); - uint32_t SurfaceType : BITFIELD_RANGE(29, 31); - uint32_t SurfaceQpitch : BITFIELD_RANGE(0, 14); - uint32_t SampleTapDiscardDisable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_48 : BITFIELD_RANGE(16, 17); - uint32_t CornerTexelMode : BITFIELD_RANGE(18, 18); - uint32_t BaseMipLevel : BITFIELD_RANGE(19, 23); - uint32_t MemoryObjectControlState_Reserved : BITFIELD_RANGE(24, 24); - uint32_t MemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(25, 30); - uint32_t EnableUnormPathInColorPipe : BITFIELD_RANGE(31, 31); - uint32_t Width : BITFIELD_RANGE(0, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t Height : BITFIELD_RANGE(16, 29); - uint32_t Reserved_94 : BITFIELD_RANGE(30, 31); - uint32_t SurfacePitch : BITFIELD_RANGE(0, 17); - uint32_t Reserved_114 : BITFIELD_RANGE(18, 18); - uint32_t StandardTilingModeExtensions : BITFIELD_RANGE(19, 19); - uint32_t TileAddressMappingMode : BITFIELD_RANGE(20, 20); - uint32_t Depth : BITFIELD_RANGE(21, 31); - uint32_t Reserved_128; - uint32_t MipCountLod : BITFIELD_RANGE(0, 3); - uint32_t SurfaceMinLod : BITFIELD_RANGE(4, 7); - uint32_t MipTailStartLod : BITFIELD_RANGE(8, 11); - uint32_t Reserved_172 : BITFIELD_RANGE(12, 13); - uint32_t CoherencyType : BITFIELD_RANGE(14, 14); - uint32_t Reserved_175 : BITFIELD_RANGE(15, 17); - uint32_t TiledResourceMode : BITFIELD_RANGE(18, 19); - uint32_t EwaDisableForCube : BITFIELD_RANGE(20, 20); - uint32_t YOffset : BITFIELD_RANGE(21, 23); - uint32_t Reserved_184 : BITFIELD_RANGE(24, 24); - uint32_t XOffset : BITFIELD_RANGE(25, 31); - uint32_t Reserved_192 : BITFIELD_RANGE(0, 14); - uint32_t YuvInterpolationEnable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_208 : BITFIELD_RANGE(16, 31); - uint32_t ResourceMinLod : BITFIELD_RANGE(0, 11); - uint32_t Reserved_236 : BITFIELD_RANGE(12, 15); - uint32_t ShaderChannelSelectAlpha : BITFIELD_RANGE(16, 18); - uint32_t ShaderChannelSelectBlue : BITFIELD_RANGE(19, 21); - uint32_t ShaderChannelSelectGreen : BITFIELD_RANGE(22, 24); - uint32_t ShaderChannelSelectRed : BITFIELD_RANGE(25, 27); - uint32_t Reserved_252 : BITFIELD_RANGE(28, 29); - uint32_t MemoryCompressionEnable : BITFIELD_RANGE(30, 30); - uint32_t MemoryCompressionMode : BITFIELD_RANGE(31, 31); - uint64_t SurfaceBaseAddress; - uint64_t QuiltWidth : BITFIELD_RANGE(0, 4); - uint64_t QuiltHeight : BITFIELD_RANGE(5, 9); - uint64_t ClearValueAddressEnable : BITFIELD_RANGE(10, 10); - uint64_t Reserved_331 : BITFIELD_RANGE(11, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } Common; - struct tagSurfaceTypeIsnotSurftype_Cube { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Cube; - struct tagSurfaceTypeIsSurftype_Cube { - uint32_t CubeFaceEnable_PositiveZ : BITFIELD_RANGE(0, 0); - uint32_t CubeFaceEnable_NegativeZ : BITFIELD_RANGE(1, 1); - uint32_t CubeFaceEnable_PositiveY : BITFIELD_RANGE(2, 2); - uint32_t CubeFaceEnable_NegativeY : BITFIELD_RANGE(3, 3); - uint32_t CubeFaceEnable_PositiveX : BITFIELD_RANGE(4, 4); - uint32_t CubeFaceEnable_NegativeX : BITFIELD_RANGE(5, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 31); - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Cube; - struct tagSurfaceTypeIsSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Strbuf; - struct tagSurfaceTypeIsnotSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t MultisamplePositionPaletteIndex : BITFIELD_RANGE(0, 2); - uint32_t NumberOfMultisamples : BITFIELD_RANGE(3, 5); - uint32_t MultisampledSurfaceStorageFormat : BITFIELD_RANGE(6, 6); - uint32_t RenderTargetViewExtent : BITFIELD_RANGE(7, 17); - uint32_t MinimumArrayElement : BITFIELD_RANGE(18, 28); - uint32_t RenderTargetAndSampleUnormRotation : BITFIELD_RANGE(29, 30); - uint32_t Reserved_159 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Strbuf; - struct tag_SurfaceFormatIsnotPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t AuxiliarySurfaceMode : BITFIELD_RANGE(0, 2); - uint32_t AuxiliarySurfacePitch : BITFIELD_RANGE(3, 11); - uint32_t Reserved_204 : BITFIELD_RANGE(12, 15); - uint32_t AuxiliarySurfaceQpitch : BITFIELD_RANGE(16, 30); - uint32_t Reserved_223 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanar; - struct tag_SurfaceFormatIsPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t YOffsetForUOrUvPlane : BITFIELD_RANGE(0, 13); - uint32_t Reserved_206 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForUOrUvPlane : BITFIELD_RANGE(16, 29); - uint32_t HalfPitchForChroma : BITFIELD_RANGE(30, 30); - uint32_t SeparateUvPlaneEnable : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 31); - uint64_t YOffsetForVPlane : BITFIELD_RANGE(32, 45); - uint64_t Reserved_366 : BITFIELD_RANGE(46, 47); - uint64_t XOffsetForVPlane : BITFIELD_RANGE(48, 61); - uint64_t Reserved_382 : BITFIELD_RANGE(62, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsPlanar; - struct tag_SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 11); - uint64_t AuxiliarySurfaceBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0; - struct tagMemoryCompressionEnableIs1 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 20); - uint64_t AuxiliaryTableIndexForMediaCompressedSurface : BITFIELD_RANGE(21, 31); - uint64_t Reserved_352 : BITFIELD_RANGE(32, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } MemoryCompressionEnableIs1; - struct tag__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384 : BITFIELD_RANGE(0, 4); - uint32_t ClearColorConversionEnable : BITFIELD_RANGE(5, 5); - uint32_t Reserved_390 : BITFIELD_RANGE(6, 31); - uint32_t ClearColorAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_432 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_448; - uint32_t Reserved_480; - } __AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable; - struct tag_AuxiliarySurfaceModeIsnotAux_Ccs_DAnd_AuxiliarySurfaceModeIsnotAux_Ccs_EAnd_AuxiliarySurfaceModeIsnotAux_Hiz { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _AuxiliarySurfaceModeIsnotAux_Ccs_DAnd_AuxiliarySurfaceModeIsnotAux_Ccs_EAnd_AuxiliarySurfaceModeIsnotAux_Hiz; - struct tag_AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384 : BITFIELD_RANGE(0, 5); - uint32_t ClearDepthAddressLow : BITFIELD_RANGE(6, 31); - uint32_t ClearDepthAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_432 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_448; - uint32_t Reserved_480; - } _AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable; - struct tag__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsDisable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t RedClearColor; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } __AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsDisable; - struct tagClearValueAddressEnableIsEnable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384 : BITFIELD_RANGE(0, 5); - uint32_t ClearColorAddress : BITFIELD_RANGE(6, 31); - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } ClearValueAddressEnableIsEnable; - struct tagAuxiliarySurfaceModeIsAux_Hiz { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } AuxiliarySurfaceModeIsAux_Hiz; - struct tag__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t GreenClearColor; - uint32_t BlueClearColor; - uint32_t AlphaClearColor; - } __AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable; - struct tag__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsEnable { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } __AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsEnable; - uint32_t RawData[16]; - } TheStructure; - typedef enum tagMEDIA_BOUNDARY_PIXEL_MODE { - MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE = 0x0, - MEDIA_BOUNDARY_PIXEL_MODE_PROGRESSIVE_FRAME = 0x2, - MEDIA_BOUNDARY_PIXEL_MODE_INTERLACED_FRAME = 0x3, - } MEDIA_BOUNDARY_PIXEL_MODE; - typedef enum tagRENDER_CACHE_READ_WRITE_MODE { - RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE = 0x0, - RENDER_CACHE_READ_WRITE_MODE_READ_WRITE_CACHE = 0x1, - } RENDER_CACHE_READ_WRITE_MODE; - typedef enum tagTILE_MODE { - TILE_MODE_LINEAR = 0x0, - TILE_MODE_WMAJOR = 0x1, - TILE_MODE_XMAJOR = 0x2, - TILE_MODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT { - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4 = 0x1, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_8 = 0x2, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x3, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_DEFAULT = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4, - } SURFACE_HORIZONTAL_ALIGNMENT; - typedef enum tagSURFACE_VERTICAL_ALIGNMENT { - SURFACE_VERTICAL_ALIGNMENT_VALIGN_4 = 0x1, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_8 = 0x2, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_16 = 0x3, - } SURFACE_VERTICAL_ALIGNMENT; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_R32G32B32A32_FLOAT = 0x0, - SURFACE_FORMAT_R32G32B32A32_SINT = 0x1, - SURFACE_FORMAT_R32G32B32A32_UINT = 0x2, - SURFACE_FORMAT_R32G32B32A32_UNORM = 0x3, - SURFACE_FORMAT_R32G32B32A32_SNORM = 0x4, - SURFACE_FORMAT_R64G64_FLOAT = 0x5, - SURFACE_FORMAT_R32G32B32X32_FLOAT = 0x6, - SURFACE_FORMAT_R32G32B32A32_SSCALED = 0x7, - SURFACE_FORMAT_R32G32B32A32_USCALED = 0x8, - SURFACE_FORMAT_R32G32B32A32_SFIXED = 0x20, - SURFACE_FORMAT_R64G64_PASSTHRU = 0x21, - SURFACE_FORMAT_R32G32B32_FLOAT = 0x40, - SURFACE_FORMAT_R32G32B32_SINT = 0x41, - SURFACE_FORMAT_R32G32B32_UINT = 0x42, - SURFACE_FORMAT_R32G32B32_UNORM = 0x43, - SURFACE_FORMAT_R32G32B32_SNORM = 0x44, - SURFACE_FORMAT_R32G32B32_SSCALED = 0x45, - SURFACE_FORMAT_R32G32B32_USCALED = 0x46, - SURFACE_FORMAT_R32G32B32_SFIXED = 0x50, - SURFACE_FORMAT_R16G16B16A16_UNORM = 0x80, - SURFACE_FORMAT_R16G16B16A16_SNORM = 0x81, - SURFACE_FORMAT_R16G16B16A16_SINT = 0x82, - SURFACE_FORMAT_R16G16B16A16_UINT = 0x83, - SURFACE_FORMAT_R16G16B16A16_FLOAT = 0x84, - SURFACE_FORMAT_R32G32_FLOAT = 0x85, - SURFACE_FORMAT_R32G32_SINT = 0x86, - SURFACE_FORMAT_R32G32_UINT = 0x87, - SURFACE_FORMAT_R32_FLOAT_X8X24_TYPELESS = 0x88, - SURFACE_FORMAT_X32_TYPELESS_G8X24_UINT = 0x89, - SURFACE_FORMAT_L32A32_FLOAT = 0x8a, - SURFACE_FORMAT_R32G32_UNORM = 0x8b, - SURFACE_FORMAT_R32G32_SNORM = 0x8c, - SURFACE_FORMAT_R64_FLOAT = 0x8d, - SURFACE_FORMAT_R16G16B16X16_UNORM = 0x8e, - SURFACE_FORMAT_R16G16B16X16_FLOAT = 0x8f, - SURFACE_FORMAT_A32X32_FLOAT = 0x90, - SURFACE_FORMAT_L32X32_FLOAT = 0x91, - SURFACE_FORMAT_I32X32_FLOAT = 0x92, - SURFACE_FORMAT_R16G16B16A16_SSCALED = 0x93, - SURFACE_FORMAT_R16G16B16A16_USCALED = 0x94, - SURFACE_FORMAT_R32G32_SSCALED = 0x95, - SURFACE_FORMAT_R32G32_USCALED = 0x96, - SURFACE_FORMAT_R32G32_SFIXED = 0xa0, - SURFACE_FORMAT_R64_PASSTHRU = 0xa1, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xc0, - SURFACE_FORMAT_B8G8R8A8_UNORM_SRGB = 0xc1, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0xc2, - SURFACE_FORMAT_R10G10B10A2_UNORM_SRGB = 0xc3, - SURFACE_FORMAT_R10G10B10A2_UINT = 0xc4, - SURFACE_FORMAT_R10G10B10_SNORM_A2_UNORM = 0xc5, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0xc7, - SURFACE_FORMAT_R8G8B8A8_UNORM_SRGB = 0xc8, - SURFACE_FORMAT_R8G8B8A8_SNORM = 0xc9, - SURFACE_FORMAT_R8G8B8A8_SINT = 0xca, - SURFACE_FORMAT_R8G8B8A8_UINT = 0xcb, - SURFACE_FORMAT_R16G16_UNORM = 0xcc, - SURFACE_FORMAT_R16G16_SNORM = 0xcd, - SURFACE_FORMAT_R16G16_SINT = 0xce, - SURFACE_FORMAT_R16G16_UINT = 0xcf, - SURFACE_FORMAT_R16G16_FLOAT = 0xd0, - SURFACE_FORMAT_B10G10R10A2_UNORM = 0xd1, - SURFACE_FORMAT_B10G10R10A2_UNORM_SRGB = 0xd2, - SURFACE_FORMAT_R11G11B10_FLOAT = 0xd3, - SURFACE_FORMAT_R32_SINT = 0xd6, - SURFACE_FORMAT_R32_UINT = 0xd7, - SURFACE_FORMAT_R32_FLOAT = 0xd8, - SURFACE_FORMAT_R24_UNORM_X8_TYPELESS = 0xd9, - SURFACE_FORMAT_X24_TYPELESS_G8_UINT = 0xda, - SURFACE_FORMAT_L32_UNORM = 0xdd, - SURFACE_FORMAT_A32_UNORM = 0xde, - SURFACE_FORMAT_L16A16_UNORM = 0xdf, - SURFACE_FORMAT_I24X8_UNORM = 0xe0, - SURFACE_FORMAT_L24X8_UNORM = 0xe1, - SURFACE_FORMAT_A24X8_UNORM = 0xe2, - SURFACE_FORMAT_I32_FLOAT = 0xe3, - SURFACE_FORMAT_L32_FLOAT = 0xe4, - SURFACE_FORMAT_A32_FLOAT = 0xe5, - SURFACE_FORMAT_X8B8_UNORM_G8R8_SNORM = 0xe6, - SURFACE_FORMAT_A8X8_UNORM_G8R8_SNORM = 0xe7, - SURFACE_FORMAT_B8X8_UNORM_G8R8_SNORM = 0xe8, - SURFACE_FORMAT_B8G8R8X8_UNORM = 0xe9, - SURFACE_FORMAT_B8G8R8X8_UNORM_SRGB = 0xea, - SURFACE_FORMAT_R8G8B8X8_UNORM = 0xeb, - SURFACE_FORMAT_R8G8B8X8_UNORM_SRGB = 0xec, - SURFACE_FORMAT_R9G9B9E5_SHAREDEXP = 0xed, - SURFACE_FORMAT_B10G10R10X2_UNORM = 0xee, - SURFACE_FORMAT_L16A16_FLOAT = 0xf0, - SURFACE_FORMAT_R32_UNORM = 0xf1, - SURFACE_FORMAT_R32_SNORM = 0xf2, - SURFACE_FORMAT_R10G10B10X2_USCALED = 0xf3, - SURFACE_FORMAT_R8G8B8A8_SSCALED = 0xf4, - SURFACE_FORMAT_R8G8B8A8_USCALED = 0xf5, - SURFACE_FORMAT_R16G16_SSCALED = 0xf6, - SURFACE_FORMAT_R16G16_USCALED = 0xf7, - SURFACE_FORMAT_R32_SSCALED = 0xf8, - SURFACE_FORMAT_R32_USCALED = 0xf9, - SURFACE_FORMAT_B5G6R5_UNORM = 0x100, - SURFACE_FORMAT_B5G6R5_UNORM_SRGB = 0x101, - SURFACE_FORMAT_B5G5R5A1_UNORM = 0x102, - SURFACE_FORMAT_B5G5R5A1_UNORM_SRGB = 0x103, - SURFACE_FORMAT_B4G4R4A4_UNORM = 0x104, - SURFACE_FORMAT_B4G4R4A4_UNORM_SRGB = 0x105, - SURFACE_FORMAT_R8G8_UNORM = 0x106, - SURFACE_FORMAT_R8G8_SNORM = 0x107, - SURFACE_FORMAT_R8G8_SINT = 0x108, - SURFACE_FORMAT_R8G8_UINT = 0x109, - SURFACE_FORMAT_R16_UNORM = 0x10a, - SURFACE_FORMAT_R16_SNORM = 0x10b, - SURFACE_FORMAT_R16_SINT = 0x10c, - SURFACE_FORMAT_R16_UINT = 0x10d, - SURFACE_FORMAT_R16_FLOAT = 0x10e, - SURFACE_FORMAT_A8P8_UNORM_PALETTE0 = 0x10f, - SURFACE_FORMAT_A8P8_UNORM_PALETTE1 = 0x110, - SURFACE_FORMAT_I16_UNORM = 0x111, - SURFACE_FORMAT_L16_UNORM = 0x112, - SURFACE_FORMAT_A16_UNORM = 0x113, - SURFACE_FORMAT_L8A8_UNORM = 0x114, - SURFACE_FORMAT_I16_FLOAT = 0x115, - SURFACE_FORMAT_L16_FLOAT = 0x116, - SURFACE_FORMAT_A16_FLOAT = 0x117, - SURFACE_FORMAT_L8A8_UNORM_SRGB = 0x118, - SURFACE_FORMAT_R5G5_SNORM_B6_UNORM = 0x119, - SURFACE_FORMAT_B5G5R5X1_UNORM = 0x11a, - SURFACE_FORMAT_B5G5R5X1_UNORM_SRGB = 0x11b, - SURFACE_FORMAT_R8G8_SSCALED = 0x11c, - SURFACE_FORMAT_R8G8_USCALED = 0x11d, - SURFACE_FORMAT_R16_SSCALED = 0x11e, - SURFACE_FORMAT_R16_USCALED = 0x11f, - SURFACE_FORMAT_P8A8_UNORM_PALETTE0 = 0x122, - SURFACE_FORMAT_P8A8_UNORM_PALETTE1 = 0x123, - SURFACE_FORMAT_A1B5G5R5_UNORM = 0x124, - SURFACE_FORMAT_A4B4G4R4_UNORM = 0x125, - SURFACE_FORMAT_L8A8_UINT = 0x126, - SURFACE_FORMAT_L8A8_SINT = 0x127, - SURFACE_FORMAT_R8_UNORM = 0x140, - SURFACE_FORMAT_R8_SNORM = 0x141, - SURFACE_FORMAT_R8_SINT = 0x142, - SURFACE_FORMAT_R8_UINT = 0x143, - SURFACE_FORMAT_A8_UNORM = 0x144, - SURFACE_FORMAT_I8_UNORM = 0x145, - SURFACE_FORMAT_L8_UNORM = 0x146, - SURFACE_FORMAT_P4A4_UNORM_PALETTE0 = 0x147, - SURFACE_FORMAT_A4P4_UNORM_PALETTE0 = 0x148, - SURFACE_FORMAT_R8_SSCALED = 0x149, - SURFACE_FORMAT_R8_USCALED = 0x14a, - SURFACE_FORMAT_P8_UNORM_PALETTE0 = 0x14b, - SURFACE_FORMAT_L8_UNORM_SRGB = 0x14c, - SURFACE_FORMAT_P8_UNORM_PALETTE1 = 0x14d, - SURFACE_FORMAT_P4A4_UNORM_PALETTE1 = 0x14e, - SURFACE_FORMAT_A4P4_UNORM_PALETTE1 = 0x14f, - SURFACE_FORMAT_Y8_UNORM = 0x150, - SURFACE_FORMAT_L8_UINT = 0x152, - SURFACE_FORMAT_L8_SINT = 0x153, - SURFACE_FORMAT_I8_UINT = 0x154, - SURFACE_FORMAT_I8_SINT = 0x155, - SURFACE_FORMAT_DXT1_RGB_SRGB = 0x180, - SURFACE_FORMAT_R1_UNORM = 0x181, - SURFACE_FORMAT_YCRCB_NORMAL = 0x182, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x183, - SURFACE_FORMAT_P2_UNORM_PALETTE0 = 0x184, - SURFACE_FORMAT_P2_UNORM_PALETTE1 = 0x185, - SURFACE_FORMAT_BC1_UNORM = 0x186, - SURFACE_FORMAT_BC2_UNORM = 0x187, - SURFACE_FORMAT_BC3_UNORM = 0x188, - SURFACE_FORMAT_BC4_UNORM = 0x189, - SURFACE_FORMAT_BC5_UNORM = 0x18a, - SURFACE_FORMAT_BC1_UNORM_SRGB = 0x18b, - SURFACE_FORMAT_BC2_UNORM_SRGB = 0x18c, - SURFACE_FORMAT_BC3_UNORM_SRGB = 0x18d, - SURFACE_FORMAT_MONO8 = 0x18e, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x18f, - SURFACE_FORMAT_YCRCB_SWAPY = 0x190, - SURFACE_FORMAT_DXT1_RGB = 0x191, - SURFACE_FORMAT_FXT1 = 0x192, - SURFACE_FORMAT_R8G8B8_UNORM = 0x193, - SURFACE_FORMAT_R8G8B8_SNORM = 0x194, - SURFACE_FORMAT_R8G8B8_SSCALED = 0x195, - SURFACE_FORMAT_R8G8B8_USCALED = 0x196, - SURFACE_FORMAT_R64G64B64A64_FLOAT = 0x197, - SURFACE_FORMAT_R64G64B64_FLOAT = 0x198, - SURFACE_FORMAT_BC4_SNORM = 0x199, - SURFACE_FORMAT_BC5_SNORM = 0x19a, - SURFACE_FORMAT_R16G16B16_FLOAT = 0x19b, - SURFACE_FORMAT_R16G16B16_UNORM = 0x19c, - SURFACE_FORMAT_R16G16B16_SNORM = 0x19d, - SURFACE_FORMAT_R16G16B16_SSCALED = 0x19e, - SURFACE_FORMAT_R16G16B16_USCALED = 0x19f, - SURFACE_FORMAT_BC6H_SF16 = 0x1a1, - SURFACE_FORMAT_BC7_UNORM = 0x1a2, - SURFACE_FORMAT_BC7_UNORM_SRGB = 0x1a3, - SURFACE_FORMAT_BC6H_UF16 = 0x1a4, - SURFACE_FORMAT_PLANAR_420_8 = 0x1a5, - SURFACE_FORMAT_PLANAR_420_16 = 0x1a6, - SURFACE_FORMAT_R8G8B8_UNORM_SRGB = 0x1a8, - SURFACE_FORMAT_ETC1_RGB8 = 0x1a9, - SURFACE_FORMAT_ETC2_RGB8 = 0x1aa, - SURFACE_FORMAT_EAC_R11 = 0x1ab, - SURFACE_FORMAT_EAC_RG11 = 0x1ac, - SURFACE_FORMAT_EAC_SIGNED_R11 = 0x1ad, - SURFACE_FORMAT_EAC_SIGNED_RG11 = 0x1ae, - SURFACE_FORMAT_ETC2_SRGB8 = 0x1af, - SURFACE_FORMAT_R16G16B16_UINT = 0x1b0, - SURFACE_FORMAT_R16G16B16_SINT = 0x1b1, - SURFACE_FORMAT_R32_SFIXED = 0x1b2, - SURFACE_FORMAT_R10G10B10A2_SNORM = 0x1b3, - SURFACE_FORMAT_R10G10B10A2_USCALED = 0x1b4, - SURFACE_FORMAT_R10G10B10A2_SSCALED = 0x1b5, - SURFACE_FORMAT_R10G10B10A2_SINT = 0x1b6, - SURFACE_FORMAT_B10G10R10A2_SNORM = 0x1b7, - SURFACE_FORMAT_B10G10R10A2_USCALED = 0x1b8, - SURFACE_FORMAT_B10G10R10A2_SSCALED = 0x1b9, - SURFACE_FORMAT_B10G10R10A2_UINT = 0x1ba, - SURFACE_FORMAT_B10G10R10A2_SINT = 0x1bb, - SURFACE_FORMAT_R64G64B64A64_PASSTHRU = 0x1bc, - SURFACE_FORMAT_R64G64B64_PASSTHRU = 0x1bd, - SURFACE_FORMAT_ETC2_RGB8_PTA = 0x1c0, - SURFACE_FORMAT_ETC2_SRGB8_PTA = 0x1c1, - SURFACE_FORMAT_ETC2_EAC_RGBA8 = 0x1c2, - SURFACE_FORMAT_ETC2_EAC_SRGB8_A8 = 0x1c3, - SURFACE_FORMAT_R8G8B8_UINT = 0x1c8, - SURFACE_FORMAT_R8G8B8_SINT = 0x1c9, - SURFACE_FORMAT_RAW = 0x1ff, - } SURFACE_FORMAT; - typedef enum tagSURFACE_TYPE { - SURFACE_TYPE_SURFTYPE_1D = 0x0, - SURFACE_TYPE_SURFTYPE_2D = 0x1, - SURFACE_TYPE_SURFTYPE_3D = 0x2, - SURFACE_TYPE_SURFTYPE_CUBE = 0x3, - SURFACE_TYPE_SURFTYPE_BUFFER = 0x4, - SURFACE_TYPE_SURFTYPE_STRBUF = 0x5, - SURFACE_TYPE_SURFTYPE_NULL = 0x7, - } SURFACE_TYPE; - typedef enum tagSAMPLE_TAP_DISCARD_DISABLE { - SAMPLE_TAP_DISCARD_DISABLE_DISABLE = 0x0, - SAMPLE_TAP_DISCARD_DISABLE_ENABLE = 0x1, - } SAMPLE_TAP_DISCARD_DISABLE; - typedef enum tagCORNER_TEXEL_MODE { - CORNER_TEXEL_MODE_DISABLE = 0x0, - CORNER_TEXEL_MODE_ENABLE = 0x1, - } CORNER_TEXEL_MODE; - typedef enum tagSTANDARD_TILING_MODE_EXTENSIONS { - STANDARD_TILING_MODE_EXTENSIONS_DISABLE = 0x0, - STANDARD_TILING_MODE_EXTENSIONS_ENABLE = 0x1, - } STANDARD_TILING_MODE_EXTENSIONS; - typedef enum tagTILE_ADDRESS_MAPPING_MODE { - TILE_ADDRESS_MAPPING_MODE_GEN9 = 0x0, - TILE_ADDRESS_MAPPING_MODE_GEN10 = 0x1, - } TILE_ADDRESS_MAPPING_MODE; - typedef enum tagNUMBER_OF_MULTISAMPLES { - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1 = 0x0, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_2 = 0x1, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_4 = 0x2, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_8 = 0x3, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_16 = 0x4, - } NUMBER_OF_MULTISAMPLES; - typedef enum tagMULTISAMPLED_SURFACE_STORAGE_FORMAT { - MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS = 0x0, - MULTISAMPLED_SURFACE_STORAGE_FORMAT_DEPTH_STENCIL = 0x1, - } MULTISAMPLED_SURFACE_STORAGE_FORMAT; - typedef enum tagRENDER_TARGET_AND_SAMPLE_UNORM_ROTATION { - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG = 0x0, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_90DEG = 0x1, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_180DEG = 0x2, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_270DEG = 0x3, - } RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION; - typedef enum tagCOHERENCY_TYPE { - COHERENCY_TYPE_GPU_COHERENT = 0x0, - COHERENCY_TYPE_IA_COHERENT = 0x1, - } COHERENCY_TYPE; - typedef enum tagTILED_RESOURCE_MODE { - TILED_RESOURCE_MODE_NONE = 0x0, - TILED_RESOURCE_MODE_4KB = 0x1, - TILED_RESOURCE_MODE_TILEYF = 0x1, - TILED_RESOURCE_MODE_64KB = 0x2, - TILED_RESOURCE_MODE_TILEYS = 0x2, - } TILED_RESOURCE_MODE; - typedef enum tagAUXILIARY_SURFACE_MODE { - AUXILIARY_SURFACE_MODE_AUX_NONE = 0x0, - AUXILIARY_SURFACE_MODE_AUX_CCS_D = 0x1, - AUXILIARY_SURFACE_MODE_AUX_APPEND = 0x2, - AUXILIARY_SURFACE_MODE_AUX_HIZ = 0x3, - AUXILIARY_SURFACE_MODE_AUX_CCS_E = 0x5, - } AUXILIARY_SURFACE_MODE; - typedef enum tagHALF_PITCH_FOR_CHROMA { - HALF_PITCH_FOR_CHROMA_DISABLE = 0x0, - HALF_PITCH_FOR_CHROMA_ENABLE = 0x1, - } HALF_PITCH_FOR_CHROMA; - typedef enum tagSHADER_CHANNEL_SELECT { - SHADER_CHANNEL_SELECT_ZERO = 0x0, - SHADER_CHANNEL_SELECT_ONE = 0x1, - SHADER_CHANNEL_SELECT_RED = 0x4, - SHADER_CHANNEL_SELECT_GREEN = 0x5, - SHADER_CHANNEL_SELECT_BLUE = 0x6, - SHADER_CHANNEL_SELECT_ALPHA = 0x7, - } SHADER_CHANNEL_SELECT; - typedef enum tagMEMORY_COMPRESSION_MODE { - MEMORY_COMPRESSION_MODE_HORIZONTAL = 0x0, - MEMORY_COMPRESSION_MODE_VERTICAL = 0x1, - } MEMORY_COMPRESSION_MODE; - typedef enum tagCLEAR_COLOR_CONVERSION_ENABLE { - CLEAR_COLOR_CONVERSION_ENABLE_DISABLE = 0x0, - CLEAR_COLOR_CONVERSION_ENABLE_ENABLE = 0x1, - } CLEAR_COLOR_CONVERSION_ENABLE; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x20, - SURFACEBASEADDRESS_INDEX = 0x8, - AUXILIARYSURFACEBASEADDRESS_BYTEOFFSET = 0x28, - AUXILIARYSURFACEBASEADDRESS_INDEX = 0xa, - CLEARDEPTHADDRESSLOW_BYTEOFFSET = 0x30, - CLEARDEPTHADDRESSLOW_INDEX = 0xc, - CLEARCOLORADDRESS_BYTEOFFSET = 0x30, - CLEARCOLORADDRESS_INDEX = 0xc, - CLEARCOLORADDRESSHIGH_BYTEOFFSET = 0x34, - CLEARCOLORADDRESSHIGH_INDEX = 0xd, - CLEARDEPTHADDRESSHIGH_BYTEOFFSET = 0x34, - CLEARDEPTHADDRESSHIGH_INDEX = 0xd, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MediaBoundaryPixelMode = MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE; - TheStructure.Common.RenderCacheReadWriteMode = RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE; - TheStructure.Common.TileMode = TILE_MODE_LINEAR; - TheStructure.Common.SurfaceHorizontalAlignment = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4; - TheStructure.Common.SurfaceVerticalAlignment = SURFACE_VERTICAL_ALIGNMENT_VALIGN_4; - TheStructure.Common.SurfaceType = SURFACE_TYPE_SURFTYPE_1D; - TheStructure.Common.SampleTapDiscardDisable = SAMPLE_TAP_DISCARD_DISABLE_DISABLE; - TheStructure.Common.CornerTexelMode = CORNER_TEXEL_MODE_DISABLE; - TheStructure.Common.StandardTilingModeExtensions = STANDARD_TILING_MODE_EXTENSIONS_DISABLE; - TheStructure.Common.TileAddressMappingMode = TILE_ADDRESS_MAPPING_MODE_GEN9; - TheStructure.Common.CoherencyType = COHERENCY_TYPE_GPU_COHERENT; - TheStructure.Common.TiledResourceMode = TILED_RESOURCE_MODE_NONE; - TheStructure.Common.ShaderChannelSelectAlpha = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectBlue = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectGreen = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectRed = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.MemoryCompressionMode = MEMORY_COMPRESSION_MODE_HORIZONTAL; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG; - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = AUXILIARY_SURFACE_MODE_AUX_NONE; - TheStructure._SurfaceFormatIsPlanar.HalfPitchForChroma = HALF_PITCH_FOR_CHROMA_DISABLE; - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable.ClearColorConversionEnable = CLEAR_COLOR_CONVERSION_ENABLE_ENABLE; - } - static tagRENDER_SURFACE_STATE sInit() { - RENDER_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 16); - return TheStructure.RawData[index]; - } - inline void setMediaBoundaryPixelMode(const MEDIA_BOUNDARY_PIXEL_MODE value) { - TheStructure.Common.MediaBoundaryPixelMode = value; - } - inline MEDIA_BOUNDARY_PIXEL_MODE getMediaBoundaryPixelMode() const { - return static_cast(TheStructure.Common.MediaBoundaryPixelMode); - } - inline void setRenderCacheReadWriteMode(const RENDER_CACHE_READ_WRITE_MODE value) { - TheStructure.Common.RenderCacheReadWriteMode = value; - } - inline RENDER_CACHE_READ_WRITE_MODE getRenderCacheReadWriteMode() const { - return static_cast(TheStructure.Common.RenderCacheReadWriteMode); - } - inline void setSamplerL2OutOfOrderModeDisable(const bool value) { - TheStructure.Common.SamplerL2OutOfOrderModeDisable = value; - } - inline bool getSamplerL2OutOfOrderModeDisable() const { - return (TheStructure.Common.SamplerL2OutOfOrderModeDisable); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setSurfaceHorizontalAlignment(const SURFACE_HORIZONTAL_ALIGNMENT value) { - TheStructure.Common.SurfaceHorizontalAlignment = value; - } - inline SURFACE_HORIZONTAL_ALIGNMENT getSurfaceHorizontalAlignment() const { - return static_cast(TheStructure.Common.SurfaceHorizontalAlignment); - } - inline void setSurfaceVerticalAlignment(const SURFACE_VERTICAL_ALIGNMENT value) { - TheStructure.Common.SurfaceVerticalAlignment = value; - } - inline SURFACE_VERTICAL_ALIGNMENT getSurfaceVerticalAlignment() const { - return static_cast(TheStructure.Common.SurfaceVerticalAlignment); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setAstcEnable(const bool value) { - TheStructure.Common.Astc_Enable = value; - } - inline bool getAstcEnable() const { - return (TheStructure.Common.Astc_Enable); - } - inline void setSurfaceArray(const bool value) { - TheStructure.Common.SurfaceArray = value; - } - inline bool getSurfaceArray() const { - return (TheStructure.Common.SurfaceArray); - } - inline void setSurfaceType(const SURFACE_TYPE value) { - TheStructure.Common.SurfaceType = value; - } - inline SURFACE_TYPE getSurfaceType() const { - return static_cast(TheStructure.Common.SurfaceType); - } - typedef enum tagSURFACEQPITCH { - SURFACEQPITCH_BIT_SHIFT = 0x2, - SURFACEQPITCH_ALIGN_SIZE = 0x4, - } SURFACEQPITCH; - inline void setSurfaceQpitch(const uint32_t value) { - TheStructure.Common.SurfaceQpitch = value >> SURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getSurfaceQpitch() const { - return (TheStructure.Common.SurfaceQpitch << SURFACEQPITCH_BIT_SHIFT); - } - inline void setSampleTapDiscardDisable(const SAMPLE_TAP_DISCARD_DISABLE value) { - TheStructure.Common.SampleTapDiscardDisable = value; - } - inline SAMPLE_TAP_DISCARD_DISABLE getSampleTapDiscardDisable() const { - return static_cast(TheStructure.Common.SampleTapDiscardDisable); - } - inline void setCornerTexelMode(const CORNER_TEXEL_MODE value) { - TheStructure.Common.CornerTexelMode = value; - } - inline CORNER_TEXEL_MODE getCornerTexelMode() const { - return static_cast(TheStructure.Common.CornerTexelMode); - } - inline void setBaseMipLevel(const uint32_t value) { - TheStructure.Common.BaseMipLevel = value; - } - inline uint32_t getBaseMipLevel() const { - return (TheStructure.Common.BaseMipLevel); - } - inline void setMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_Reserved = value; - } - inline uint32_t getMemoryObjectControlStateReserved() const { - return (TheStructure.Common.MemoryObjectControlState_Reserved); - } - inline void setMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_Reserved = value; - TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); - } - inline uint32_t getMemoryObjectControlState() const { - uint32_t mocs = TheStructure.Common.MemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.MemoryObjectControlState_IndexToMocsTables << 1); - return (mocs); - } - inline void setEnableUnormPathInColorPipe(const uint32_t value) { - TheStructure.Common.EnableUnormPathInColorPipe = value; - } - inline uint32_t getEnableUnormPathInColorPipe() const { - return (TheStructure.Common.EnableUnormPathInColorPipe); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setStandardTilingModeExtensions(const STANDARD_TILING_MODE_EXTENSIONS value) { - TheStructure.Common.StandardTilingModeExtensions = value; - } - inline STANDARD_TILING_MODE_EXTENSIONS getStandardTilingModeExtensions() const { - return static_cast(TheStructure.Common.StandardTilingModeExtensions); - } - inline void setTileAddressMappingMode(const TILE_ADDRESS_MAPPING_MODE value) { - TheStructure.Common.TileAddressMappingMode = value; - } - inline TILE_ADDRESS_MAPPING_MODE getTileAddressMappingMode() const { - return static_cast(TheStructure.Common.TileAddressMappingMode); - } - inline void setDepth(const uint32_t value) { - TheStructure.Common.Depth = value - 1; - } - inline uint32_t getDepth() const { - return (TheStructure.Common.Depth + 1); - } - inline void setMipCountLod(const uint32_t value) { - TheStructure.Common.MipCountLod = value; - } - inline uint32_t getMipCountLod() const { - return (TheStructure.Common.MipCountLod); - } - inline void setSurfaceMinLod(const uint32_t value) { - TheStructure.Common.SurfaceMinLod = value; - } - inline uint32_t getSurfaceMinLod() const { - return (TheStructure.Common.SurfaceMinLod); - } - inline void setMipTailStartLod(const uint32_t value) { - TheStructure.Common.MipTailStartLod = value; - } - inline uint32_t getMipTailStartLod() const { - return (TheStructure.Common.MipTailStartLod); - } - inline void setCoherencyType(const COHERENCY_TYPE value) { - TheStructure.Common.CoherencyType = value; - } - inline COHERENCY_TYPE getCoherencyType() const { - return static_cast(TheStructure.Common.CoherencyType); - } - inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { - TheStructure.Common.TiledResourceMode = value; - } - inline TILED_RESOURCE_MODE getTiledResourceMode() const { - return static_cast(TheStructure.Common.TiledResourceMode); - } - inline void setEwaDisableForCube(const bool value) { - TheStructure.Common.EwaDisableForCube = value; - } - inline bool getEwaDisableForCube() const { - return (TheStructure.Common.EwaDisableForCube); - } - typedef enum tagYOFFSET { - YOFFSET_BIT_SHIFT = 0x2, - YOFFSET_ALIGN_SIZE = 0x4, - } YOFFSET; - inline void setYOffset(const uint32_t value) { - TheStructure.Common.YOffset = value >> YOFFSET_BIT_SHIFT; - } - inline uint32_t getYOffset() const { - return (TheStructure.Common.YOffset << YOFFSET_BIT_SHIFT); - } - typedef enum tagXOFFSET { - XOFFSET_BIT_SHIFT = 0x2, - XOFFSET_ALIGN_SIZE = 0x4, - } XOFFSET; - inline void setXOffset(const uint32_t value) { - TheStructure.Common.XOffset = value >> XOFFSET_BIT_SHIFT; - } - inline uint32_t getXOffset() const { - return (TheStructure.Common.XOffset << XOFFSET_BIT_SHIFT); - } - inline void setYuvInterpolationEnable(const bool value) { - TheStructure.Common.YuvInterpolationEnable = value; - } - inline bool getYuvInterpolationEnable() const { - return (TheStructure.Common.YuvInterpolationEnable); - } - inline void setResourceMinLod(const uint32_t value) { - TheStructure.Common.ResourceMinLod = value; - } - inline uint32_t getResourceMinLod() const { - return (TheStructure.Common.ResourceMinLod); - } - inline void setShaderChannelSelectAlpha(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectAlpha = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectAlpha() const { - return static_cast(TheStructure.Common.ShaderChannelSelectAlpha); - } - inline void setShaderChannelSelectBlue(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectBlue = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectBlue() const { - return static_cast(TheStructure.Common.ShaderChannelSelectBlue); - } - inline void setShaderChannelSelectGreen(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectGreen = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectGreen() const { - return static_cast(TheStructure.Common.ShaderChannelSelectGreen); - } - inline void setShaderChannelSelectRed(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectRed = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectRed() const { - return static_cast(TheStructure.Common.ShaderChannelSelectRed); - } - inline void setMemoryCompressionEnable(const bool value) { - TheStructure.Common.MemoryCompressionEnable = value; - } - inline bool getMemoryCompressionEnable() const { - return (TheStructure.Common.MemoryCompressionEnable); - } - inline void setMemoryCompressionMode(const MEMORY_COMPRESSION_MODE value) { - TheStructure.Common.MemoryCompressionMode = value; - } - inline MEMORY_COMPRESSION_MODE getMemoryCompressionMode() const { - return static_cast(TheStructure.Common.MemoryCompressionMode); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddress = value; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddress); - } - inline void setQuiltWidth(const uint64_t value) { - TheStructure.Common.QuiltWidth = value; - } - inline uint64_t getQuiltWidth() const { - return (TheStructure.Common.QuiltWidth); - } - inline void setQuiltHeight(const uint64_t value) { - TheStructure.Common.QuiltHeight = value; - } - inline uint64_t getQuiltHeight() const { - return (TheStructure.Common.QuiltHeight); - } - inline void setClearValueAddressEnable(const bool value) { - TheStructure.Common.ClearValueAddressEnable = value; - } - inline bool getClearValueAddressEnable() const { - return (TheStructure.Common.ClearValueAddressEnable); - } - inline void setCubeFaceEnablePositiveZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ = value; - } - inline bool getCubeFaceEnablePositiveZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ); - } - inline void setCubeFaceEnableNegativeZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ = value; - } - inline bool getCubeFaceEnableNegativeZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ); - } - inline void setCubeFaceEnablePositiveY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY = value; - } - inline bool getCubeFaceEnablePositiveY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY); - } - inline void setCubeFaceEnableNegativeY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY = value; - } - inline bool getCubeFaceEnableNegativeY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY); - } - inline void setCubeFaceEnablePositiveX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX = value; - } - inline bool getCubeFaceEnablePositiveX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX); - } - inline void setCubeFaceEnableNegativeX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX = value; - } - inline bool getCubeFaceEnableNegativeX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX); - } - inline void setMultisamplePositionPaletteIndex(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex = value; - } - inline uint32_t getMultisamplePositionPaletteIndex() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex); - } - inline void setNumberOfMultisamples(const NUMBER_OF_MULTISAMPLES value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = value; - } - inline NUMBER_OF_MULTISAMPLES getNumberOfMultisamples() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples); - } - inline void setMultisampledSurfaceStorageFormat(const MULTISAMPLED_SURFACE_STORAGE_FORMAT value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = value; - } - inline MULTISAMPLED_SURFACE_STORAGE_FORMAT getMultisampledSurfaceStorageFormat() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat); - } - inline void setRenderTargetViewExtent(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent = value - 1; - } - inline uint32_t getRenderTargetViewExtent() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent + 1); - } - inline void setMinimumArrayElement(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement = value; - } - inline uint32_t getMinimumArrayElement() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement); - } - inline void setRenderTargetAndSampleUnormRotation(const RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = value; - } - inline RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION getRenderTargetAndSampleUnormRotation() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation); - } - inline void setAuxiliarySurfaceMode(const AUXILIARY_SURFACE_MODE value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = value; - } - inline AUXILIARY_SURFACE_MODE getAuxiliarySurfaceMode() const { - return static_cast(TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode); - } - inline void setAuxiliarySurfacePitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch = value - 1; - } - inline uint32_t getAuxiliarySurfacePitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch + 1); - } - typedef enum tagAUXILIARYSURFACEQPITCH { - AUXILIARYSURFACEQPITCH_BIT_SHIFT = 0x2, - AUXILIARYSURFACEQPITCH_ALIGN_SIZE = 0x4, - } AUXILIARYSURFACEQPITCH; - inline void setAuxiliarySurfaceQpitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch = value >> AUXILIARYSURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getAuxiliarySurfaceQpitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch << AUXILIARYSURFACEQPITCH_BIT_SHIFT); - } - inline void setYOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane = value; - } - inline uint32_t getYOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane); - } - inline void setXOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane = value; - } - inline uint32_t getXOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane); - } - inline void setHalfPitchForChroma(const HALF_PITCH_FOR_CHROMA value) { - TheStructure._SurfaceFormatIsPlanar.HalfPitchForChroma = value; - } - inline HALF_PITCH_FOR_CHROMA getHalfPitchForChroma() const { - return static_cast(TheStructure._SurfaceFormatIsPlanar.HalfPitchForChroma); - } - inline void setSeparateUvPlaneEnable(const bool value) { - TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable = value; - } - inline bool getSeparateUvPlaneEnable() const { - return (TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable); - } - inline void setYOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane = value; - } - inline uint64_t getYOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane); - } - inline void setXOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane = value; - } - inline uint64_t getXOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane); - } - typedef enum tagAUXILIARYSURFACEBASEADDRESS { - AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT = 0xc, - AUXILIARYSURFACEBASEADDRESS_ALIGN_SIZE = 0x1000, - } AUXILIARYSURFACEBASEADDRESS; - inline void setAuxiliarySurfaceBaseAddress(const uint64_t value) { - TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress = value >> AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getAuxiliarySurfaceBaseAddress() const { - return (TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress << AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT); - } - inline void setAuxiliaryTableIndexForMediaCompressedSurface(const uint64_t value) { - TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface = value; - } - inline uint64_t getAuxiliaryTableIndexForMediaCompressedSurface() const { - return (TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface); - } - inline void setClearColorConversionEnable(const CLEAR_COLOR_CONVERSION_ENABLE value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable.ClearColorConversionEnable = value; - } - inline CLEAR_COLOR_CONVERSION_ENABLE getClearColorConversionEnable() const { - return static_cast(TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable.ClearColorConversionEnable); - } - inline void setClearColorAddressHigh(const uint32_t value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable.ClearColorAddressHigh = value; - } - inline uint32_t getClearColorAddressHigh() const { - return (TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsEnable.ClearColorAddressHigh); - } - typedef enum tagCLEARDEPTHADDRESSLOW { - CLEARDEPTHADDRESSLOW_BIT_SHIFT = 0x6, - CLEARDEPTHADDRESSLOW_ALIGN_SIZE = 0x40, - } CLEARDEPTHADDRESSLOW; - inline void setClearDepthAddressLow(const uint32_t value) { - TheStructure._AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable.ClearDepthAddressLow = value >> CLEARDEPTHADDRESSLOW_BIT_SHIFT; - } - inline uint32_t getClearDepthAddressLow() const { - return (TheStructure._AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable.ClearDepthAddressLow << CLEARDEPTHADDRESSLOW_BIT_SHIFT); - } - inline void setClearDepthAddressHigh(const uint32_t value) { - TheStructure._AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable.ClearDepthAddressHigh = value; - } - inline uint32_t getClearDepthAddressHigh() const { - return (TheStructure._AuxiliarySurfaceModeIsAux_HizAnd_ClearValueAddressEnableIsEnable.ClearDepthAddressHigh); - } - inline void setRedClearColor(const uint32_t value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsDisable.RedClearColor = value; - } - inline uint32_t getRedClearColor() const { - return (TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EOrAuxiliarySurfaceModeIsAux_HizAndClearValueAddressEnableIsDisable.RedClearColor); - } - typedef enum tagCLEARCOLORADDRESS { - CLEARCOLORADDRESS_BIT_SHIFT = 0x6, - CLEARCOLORADDRESS_ALIGN_SIZE = 0x40, - } CLEARCOLORADDRESS; - inline void setClearColorAddress(const uint32_t value) { - TheStructure.ClearValueAddressEnableIsEnable.ClearColorAddress = value >> CLEARCOLORADDRESS_BIT_SHIFT; - } - inline uint32_t getClearColorAddress() const { - return (TheStructure.ClearValueAddressEnableIsEnable.ClearColorAddress << CLEARCOLORADDRESS_BIT_SHIFT); - } - inline void setGreenClearColor(const uint32_t value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.GreenClearColor = value; - } - inline uint32_t getGreenClearColor() const { - return (TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.GreenClearColor); - } - inline void setBlueClearColor(const uint32_t value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.BlueClearColor = value; - } - inline uint32_t getBlueClearColor() const { - return (TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.BlueClearColor); - } - inline void setAlphaClearColor(const uint32_t value) { - TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.AlphaClearColor = value; - } - inline uint32_t getAlphaClearColor() const { - return (TheStructure.__AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_EAndClearValueAddressEnableIsDisable.AlphaClearColor); - } -} RENDER_SURFACE_STATE; -STATIC_ASSERT(64 == sizeof(RENDER_SURFACE_STATE)); - -typedef struct tagSAMPLER_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t LodAlgorithm : BITFIELD_RANGE(0, 0); - uint32_t TextureLodBias : BITFIELD_RANGE(1, 13); - uint32_t MinModeFilter : BITFIELD_RANGE(14, 16); - uint32_t MagModeFilter : BITFIELD_RANGE(17, 19); - uint32_t MipModeFilter : BITFIELD_RANGE(20, 21); - uint32_t CoarseLodQualityMode : BITFIELD_RANGE(22, 26); - uint32_t LodPreclampMode : BITFIELD_RANGE(27, 28); - uint32_t TextureBorderColorMode : BITFIELD_RANGE(29, 29); - uint32_t CpsLodCompensationEnable : BITFIELD_RANGE(30, 30); - uint32_t SamplerDisable : BITFIELD_RANGE(31, 31); - uint32_t CubeSurfaceControlMode : BITFIELD_RANGE(0, 0); - uint32_t ShadowFunction : BITFIELD_RANGE(1, 3); - uint32_t ChromakeyMode : BITFIELD_RANGE(4, 4); - uint32_t ChromakeyIndex : BITFIELD_RANGE(5, 6); - uint32_t ChromakeyEnable : BITFIELD_RANGE(7, 7); - uint32_t MaxLod : BITFIELD_RANGE(8, 19); - uint32_t MinLod : BITFIELD_RANGE(20, 31); - uint32_t LodClampMagnificationMode : BITFIELD_RANGE(0, 0); - uint32_t SrgbDecode : BITFIELD_RANGE(1, 1); - uint32_t ReturnFilterWeightForNullTexels : BITFIELD_RANGE(2, 2); - uint32_t ReturnFilterWeightForBorderTexels : BITFIELD_RANGE(3, 3); - uint32_t Reserved_68 : BITFIELD_RANGE(4, 5); - uint32_t IndirectStatePointer : BITFIELD_RANGE(6, 23); - uint32_t Reserved_88 : BITFIELD_RANGE(24, 31); - uint32_t TczAddressControlMode : BITFIELD_RANGE(0, 2); - uint32_t TcyAddressControlMode : BITFIELD_RANGE(3, 5); - uint32_t TcxAddressControlMode : BITFIELD_RANGE(6, 8); - uint32_t ReductionTypeEnable : BITFIELD_RANGE(9, 9); - uint32_t Non_NormalizedCoordinateEnable : BITFIELD_RANGE(10, 10); - uint32_t TrilinearFilterQuality : BITFIELD_RANGE(11, 12); - uint32_t RAddressMinFilterRoundingEnable : BITFIELD_RANGE(13, 13); - uint32_t RAddressMagFilterRoundingEnable : BITFIELD_RANGE(14, 14); - uint32_t VAddressMinFilterRoundingEnable : BITFIELD_RANGE(15, 15); - uint32_t VAddressMagFilterRoundingEnable : BITFIELD_RANGE(16, 16); - uint32_t UAddressMinFilterRoundingEnable : BITFIELD_RANGE(17, 17); - uint32_t UAddressMagFilterRoundingEnable : BITFIELD_RANGE(18, 18); - uint32_t MaximumAnisotropy : BITFIELD_RANGE(19, 21); - uint32_t ReductionType : BITFIELD_RANGE(22, 23); - uint32_t Reserved_120 : BITFIELD_RANGE(24, 31); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagLOD_ALGORITHM { - LOD_ALGORITHM_LEGACY = 0x0, - LOD_ALGORITHM_EWA_APPROXIMATION = 0x1, - } LOD_ALGORITHM; - typedef enum tagMIN_MODE_FILTER { - MIN_MODE_FILTER_NEAREST = 0x0, - MIN_MODE_FILTER_LINEAR = 0x1, - MIN_MODE_FILTER_ANISOTROPIC = 0x2, - MIN_MODE_FILTER_MONO = 0x6, - } MIN_MODE_FILTER; - typedef enum tagMAG_MODE_FILTER { - MAG_MODE_FILTER_NEAREST = 0x0, - MAG_MODE_FILTER_LINEAR = 0x1, - MAG_MODE_FILTER_ANISOTROPIC = 0x2, - MAG_MODE_FILTER_MONO = 0x6, - } MAG_MODE_FILTER; - typedef enum tagMIP_MODE_FILTER { - MIP_MODE_FILTER_NONE = 0x0, - MIP_MODE_FILTER_NEAREST = 0x1, - MIP_MODE_FILTER_LINEAR = 0x3, - } MIP_MODE_FILTER; - typedef enum tagCOARSE_LOD_QUALITY_MODE { - COARSE_LOD_QUALITY_MODE_DISABLED = 0x0, - } COARSE_LOD_QUALITY_MODE; - typedef enum tagLOD_PRECLAMP_MODE { - LOD_PRECLAMP_MODE_NONE = 0x0, - LOD_PRECLAMP_MODE_OGL = 0x2, - } LOD_PRECLAMP_MODE; - typedef enum tagTEXTURE_BORDER_COLOR_MODE { - TEXTURE_BORDER_COLOR_MODE_DX10_OGL = 0x0, - TEXTURE_BORDER_COLOR_MODE_DX9 = 0x1, - } TEXTURE_BORDER_COLOR_MODE; - typedef enum tagCUBE_SURFACE_CONTROL_MODE { - CUBE_SURFACE_CONTROL_MODE_PROGRAMMED = 0x0, - CUBE_SURFACE_CONTROL_MODE_OVERRIDE = 0x1, - } CUBE_SURFACE_CONTROL_MODE; - typedef enum tagSHADOW_FUNCTION { - SHADOW_FUNCTION_PREFILTEROP_ALWAYS = 0x0, - SHADOW_FUNCTION_PREFILTEROP_NEVER = 0x1, - SHADOW_FUNCTION_PREFILTEROP_LESS = 0x2, - SHADOW_FUNCTION_PREFILTEROP_EQUAL = 0x3, - SHADOW_FUNCTION_PREFILTEROP_LEQUAL = 0x4, - SHADOW_FUNCTION_PREFILTEROP_GREATER = 0x5, - SHADOW_FUNCTION_PREFILTEROP_NOTEQUAL = 0x6, - SHADOW_FUNCTION_PREFILTEROP_GEQUAL = 0x7, - } SHADOW_FUNCTION; - typedef enum tagCHROMAKEY_MODE { - CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH = 0x0, - CHROMAKEY_MODE_KEYFILTER_REPLACE_BLACK = 0x1, - } CHROMAKEY_MODE; - typedef enum tagLOD_CLAMP_MAGNIFICATION_MODE { - LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE = 0x0, - LOD_CLAMP_MAGNIFICATION_MODE_MIPFILTER = 0x1, - } LOD_CLAMP_MAGNIFICATION_MODE; - typedef enum tagSRGB_DECODE { - SRGB_DECODE_DECODE_EXT = 0x0, - SRGB_DECODE_SKIP_DECODE_EXT = 0x1, - } SRGB_DECODE; - typedef enum tagRETURN_FILTER_WEIGHT_FOR_NULL_TEXELS { - RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS_DISABLE = 0x0, - RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS_ENABLE = 0x1, - } RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS; - typedef enum tagRETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS { - RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS_DISABLE = 0x0, - RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS_ENABLE = 0x1, - } RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS; - typedef enum tagTEXTURE_COORDINATE_MODE { - TEXTURE_COORDINATE_MODE_WRAP = 0x0, - TEXTURE_COORDINATE_MODE_MIRROR = 0x1, - TEXTURE_COORDINATE_MODE_CLAMP = 0x2, - TEXTURE_COORDINATE_MODE_CUBE = 0x3, - TEXTURE_COORDINATE_MODE_CLAMP_BORDER = 0x4, - TEXTURE_COORDINATE_MODE_MIRROR_ONCE = 0x5, - TEXTURE_COORDINATE_MODE_HALF_BORDER = 0x6, - TEXTURE_COORDINATE_MODE_MIRROR_101 = 0x7, - } TEXTURE_COORDINATE_MODE; - typedef enum tagTRILINEAR_FILTER_QUALITY { - TRILINEAR_FILTER_QUALITY_FULL = 0x0, - TRILINEAR_FILTER_QUALITY_TRIQUAL_HIGH_MAG_CLAMP_MIPFILTER = 0x1, - TRILINEAR_FILTER_QUALITY_MED = 0x2, - TRILINEAR_FILTER_QUALITY_LOW = 0x3, - } TRILINEAR_FILTER_QUALITY; - typedef enum tagMAXIMUM_ANISOTROPY { - MAXIMUM_ANISOTROPY_RATIO_21 = 0x0, - MAXIMUM_ANISOTROPY_RATIO_41 = 0x1, - MAXIMUM_ANISOTROPY_RATIO_61 = 0x2, - MAXIMUM_ANISOTROPY_RATIO_81 = 0x3, - MAXIMUM_ANISOTROPY_RATIO_101 = 0x4, - MAXIMUM_ANISOTROPY_RATIO_121 = 0x5, - MAXIMUM_ANISOTROPY_RATIO_141 = 0x6, - MAXIMUM_ANISOTROPY_RATIO_161 = 0x7, - } MAXIMUM_ANISOTROPY; - typedef enum tagREDUCTION_TYPE { - REDUCTION_TYPE_STD_FILTER = 0x0, - REDUCTION_TYPE_COMPARISON = 0x1, - REDUCTION_TYPE_MINIMUM = 0x2, - REDUCTION_TYPE_MAXIMUM = 0x3, - } REDUCTION_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.LodAlgorithm = LOD_ALGORITHM_LEGACY; - TheStructure.Common.MinModeFilter = MIN_MODE_FILTER_NEAREST; - TheStructure.Common.MagModeFilter = MAG_MODE_FILTER_NEAREST; - TheStructure.Common.MipModeFilter = MIP_MODE_FILTER_NONE; - TheStructure.Common.CoarseLodQualityMode = COARSE_LOD_QUALITY_MODE_DISABLED; - TheStructure.Common.LodPreclampMode = LOD_PRECLAMP_MODE_NONE; - TheStructure.Common.TextureBorderColorMode = TEXTURE_BORDER_COLOR_MODE_DX10_OGL; - TheStructure.Common.CubeSurfaceControlMode = CUBE_SURFACE_CONTROL_MODE_PROGRAMMED; - TheStructure.Common.ShadowFunction = SHADOW_FUNCTION_PREFILTEROP_ALWAYS; - TheStructure.Common.ChromakeyMode = CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH; - TheStructure.Common.LodClampMagnificationMode = LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE; - TheStructure.Common.SrgbDecode = SRGB_DECODE_DECODE_EXT; - TheStructure.Common.ReturnFilterWeightForNullTexels = RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS_DISABLE; - TheStructure.Common.ReturnFilterWeightForBorderTexels = RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS_DISABLE; - TheStructure.Common.TczAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcyAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcxAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TrilinearFilterQuality = TRILINEAR_FILTER_QUALITY_FULL; - TheStructure.Common.MaximumAnisotropy = MAXIMUM_ANISOTROPY_RATIO_21; - TheStructure.Common.ReductionType = REDUCTION_TYPE_STD_FILTER; - } - static tagSAMPLER_STATE sInit() { - SAMPLER_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setLodAlgorithm(const LOD_ALGORITHM value) { - TheStructure.Common.LodAlgorithm = value; - } - inline LOD_ALGORITHM getLodAlgorithm() const { - return static_cast(TheStructure.Common.LodAlgorithm); - } - inline void setTextureLodBias(const uint32_t value) { - TheStructure.Common.TextureLodBias = value; - } - inline uint32_t getTextureLodBias() const { - return (TheStructure.Common.TextureLodBias); - } - inline void setMinModeFilter(const MIN_MODE_FILTER value) { - TheStructure.Common.MinModeFilter = value; - } - inline MIN_MODE_FILTER getMinModeFilter() const { - return static_cast(TheStructure.Common.MinModeFilter); - } - inline void setMagModeFilter(const MAG_MODE_FILTER value) { - TheStructure.Common.MagModeFilter = value; - } - inline MAG_MODE_FILTER getMagModeFilter() const { - return static_cast(TheStructure.Common.MagModeFilter); - } - inline void setMipModeFilter(const MIP_MODE_FILTER value) { - TheStructure.Common.MipModeFilter = value; - } - inline MIP_MODE_FILTER getMipModeFilter() const { - return static_cast(TheStructure.Common.MipModeFilter); - } - inline void setCoarseLodQualityMode(const COARSE_LOD_QUALITY_MODE value) { - TheStructure.Common.CoarseLodQualityMode = value; - } - inline COARSE_LOD_QUALITY_MODE getCoarseLodQualityMode() const { - return static_cast(TheStructure.Common.CoarseLodQualityMode); - } - inline void setLodPreclampMode(const LOD_PRECLAMP_MODE value) { - TheStructure.Common.LodPreclampMode = value; - } - inline LOD_PRECLAMP_MODE getLodPreclampMode() const { - return static_cast(TheStructure.Common.LodPreclampMode); - } - inline void setTextureBorderColorMode(const TEXTURE_BORDER_COLOR_MODE value) { - TheStructure.Common.TextureBorderColorMode = value; - } - inline TEXTURE_BORDER_COLOR_MODE getTextureBorderColorMode() const { - return static_cast(TheStructure.Common.TextureBorderColorMode); - } - inline void setCpsLodCompensationEnable(const bool value) { - TheStructure.Common.CpsLodCompensationEnable = value; - } - inline bool getCpsLodCompensationEnable() const { - return (TheStructure.Common.CpsLodCompensationEnable); - } - inline void setSamplerDisable(const bool value) { - TheStructure.Common.SamplerDisable = value; - } - inline bool getSamplerDisable() const { - return (TheStructure.Common.SamplerDisable); - } - inline void setCubeSurfaceControlMode(const CUBE_SURFACE_CONTROL_MODE value) { - TheStructure.Common.CubeSurfaceControlMode = value; - } - inline CUBE_SURFACE_CONTROL_MODE getCubeSurfaceControlMode() const { - return static_cast(TheStructure.Common.CubeSurfaceControlMode); - } - inline void setShadowFunction(const SHADOW_FUNCTION value) { - TheStructure.Common.ShadowFunction = value; - } - inline SHADOW_FUNCTION getShadowFunction() const { - return static_cast(TheStructure.Common.ShadowFunction); - } - inline void setChromakeyMode(const CHROMAKEY_MODE value) { - TheStructure.Common.ChromakeyMode = value; - } - inline CHROMAKEY_MODE getChromakeyMode() const { - return static_cast(TheStructure.Common.ChromakeyMode); - } - inline void setChromakeyIndex(const uint32_t value) { - TheStructure.Common.ChromakeyIndex = value; - } - inline uint32_t getChromakeyIndex() const { - return (TheStructure.Common.ChromakeyIndex); - } - inline void setChromakeyEnable(const bool value) { - TheStructure.Common.ChromakeyEnable = value; - } - inline bool getChromakeyEnable() const { - return (TheStructure.Common.ChromakeyEnable); - } - inline void setMaxLod(const uint32_t value) { - TheStructure.Common.MaxLod = value; - } - inline uint32_t getMaxLod() const { - return (TheStructure.Common.MaxLod); - } - inline void setMinLod(const uint32_t value) { - TheStructure.Common.MinLod = value; - } - inline uint32_t getMinLod() const { - return (TheStructure.Common.MinLod); - } - inline void setLodClampMagnificationMode(const LOD_CLAMP_MAGNIFICATION_MODE value) { - TheStructure.Common.LodClampMagnificationMode = value; - } - inline LOD_CLAMP_MAGNIFICATION_MODE getLodClampMagnificationMode() const { - return static_cast(TheStructure.Common.LodClampMagnificationMode); - } - inline void setSrgbDecode(const SRGB_DECODE value) { - TheStructure.Common.SrgbDecode = value; - } - inline SRGB_DECODE getSrgbDecode() const { - return static_cast(TheStructure.Common.SrgbDecode); - } - inline void setReturnFilterWeightForNullTexels(const RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS value) { - TheStructure.Common.ReturnFilterWeightForNullTexels = value; - } - inline RETURN_FILTER_WEIGHT_FOR_NULL_TEXELS getReturnFilterWeightForNullTexels() const { - return static_cast(TheStructure.Common.ReturnFilterWeightForNullTexels); - } - inline void setReturnFilterWeightForBorderTexels(const RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS value) { - TheStructure.Common.ReturnFilterWeightForBorderTexels = value; - } - inline RETURN_FILTER_WEIGHT_FOR_BORDER_TEXELS getReturnFilterWeightForBorderTexels() const { - return static_cast(TheStructure.Common.ReturnFilterWeightForBorderTexels); - } - typedef enum tagINDIRECTSTATEPOINTER { - INDIRECTSTATEPOINTER_BIT_SHIFT = 0x6, - INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40, - } INDIRECTSTATEPOINTER; - inline void setIndirectStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.IndirectStatePointer = (uint32_t)value >> INDIRECTSTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getIndirectStatePointer() const { - return (TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT); - } - inline void setTczAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TczAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTczAddressControlMode() const { - return static_cast(TheStructure.Common.TczAddressControlMode); - } - inline void setTcyAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcyAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcyAddressControlMode() const { - return static_cast(TheStructure.Common.TcyAddressControlMode); - } - inline void setTcxAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcxAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcxAddressControlMode() const { - return static_cast(TheStructure.Common.TcxAddressControlMode); - } - inline void setReductionTypeEnable(const bool value) { - TheStructure.Common.ReductionTypeEnable = value; - } - inline bool getReductionTypeEnable() const { - return (TheStructure.Common.ReductionTypeEnable); - } - inline void setNonNormalizedCoordinateEnable(const bool value) { - TheStructure.Common.Non_NormalizedCoordinateEnable = value; - } - inline bool getNonNormalizedCoordinateEnable() const { - return (TheStructure.Common.Non_NormalizedCoordinateEnable); - } - inline void setTrilinearFilterQuality(const TRILINEAR_FILTER_QUALITY value) { - TheStructure.Common.TrilinearFilterQuality = value; - } - inline TRILINEAR_FILTER_QUALITY getTrilinearFilterQuality() const { - return static_cast(TheStructure.Common.TrilinearFilterQuality); - } - inline void setRAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMinFilterRoundingEnable = value; - } - inline bool getRAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMinFilterRoundingEnable); - } - inline void setRAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMagFilterRoundingEnable = value; - } - inline bool getRAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMagFilterRoundingEnable); - } - inline void setVAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMinFilterRoundingEnable = value; - } - inline bool getVAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMinFilterRoundingEnable); - } - inline void setVAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMagFilterRoundingEnable = value; - } - inline bool getVAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMagFilterRoundingEnable); - } - inline void setUAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMinFilterRoundingEnable = value; - } - inline bool getUAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMinFilterRoundingEnable); - } - inline void setUAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMagFilterRoundingEnable = value; - } - inline bool getUAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMagFilterRoundingEnable); - } - inline void setMaximumAnisotropy(const MAXIMUM_ANISOTROPY value) { - TheStructure.Common.MaximumAnisotropy = value; - } - inline MAXIMUM_ANISOTROPY getMaximumAnisotropy() const { - return static_cast(TheStructure.Common.MaximumAnisotropy); - } - inline void setReductionType(const REDUCTION_TYPE value) { - TheStructure.Common.ReductionType = value; - } - inline REDUCTION_TYPE getReductionType() const { - return static_cast(TheStructure.Common.ReductionType); - } -} SAMPLER_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_STATE)); - -typedef struct tagSTATE_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t GeneralStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t GeneralStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t GeneralStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_43 : BITFIELD_RANGE(11, 11); - uint64_t GeneralStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 15); - uint32_t StatelessDataPortAccessMemoryObjectControlState_Reserved : BITFIELD_RANGE(16, 16); - uint32_t StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(17, 22); - uint32_t Reserved_119 : BITFIELD_RANGE(23, 31); - uint64_t SurfaceStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_129 : BITFIELD_RANGE(1, 3); - uint64_t SurfaceStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t SurfaceStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_139 : BITFIELD_RANGE(11, 11); - uint64_t SurfaceStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t DynamicStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_193 : BITFIELD_RANGE(1, 3); - uint64_t DynamicStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t DynamicStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_203 : BITFIELD_RANGE(11, 11); - uint64_t DynamicStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t IndirectObjectBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_257 : BITFIELD_RANGE(1, 3); - uint64_t IndirectObjectMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t IndirectObjectMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_267 : BITFIELD_RANGE(11, 11); - uint64_t IndirectObjectBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t InstructionBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_321 : BITFIELD_RANGE(1, 3); - uint64_t InstructionMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t InstructionMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_331 : BITFIELD_RANGE(11, 11); - uint64_t InstructionBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t GeneralStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_385 : BITFIELD_RANGE(1, 11); - uint32_t GeneralStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t DynamicStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_417 : BITFIELD_RANGE(1, 11); - uint32_t DynamicStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t IndirectObjectBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_449 : BITFIELD_RANGE(1, 11); - uint32_t IndirectObjectBufferSize : BITFIELD_RANGE(12, 31); - uint32_t InstructionBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_481 : BITFIELD_RANGE(1, 11); - uint32_t InstructionBufferSize : BITFIELD_RANGE(12, 31); - uint64_t BindlessSurfaceStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_513 : BITFIELD_RANGE(1, 3); - uint64_t BindlessSurfaceStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_523 : BITFIELD_RANGE(11, 11); - uint64_t BindlessSurfaceStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_576 : BITFIELD_RANGE(0, 11); - uint32_t BindlessSurfaceStateSize : BITFIELD_RANGE(12, 31); - uint64_t BindlessSamplerStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_609 : BITFIELD_RANGE(1, 3); - uint64_t BindlessSamplerStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_619 : BITFIELD_RANGE(11, 11); - uint64_t BindlessSamplerStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_672 : BITFIELD_RANGE(0, 11); - uint32_t BindlessSamplerStateBufferSize : BITFIELD_RANGE(12, 31); - } Common; - uint32_t RawData[22]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x14, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS = 0x1, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GENERALSTATEBASEADDRESS_BYTEOFFSET = 0x4, - GENERALSTATEBASEADDRESS_INDEX = 0x1, - SURFACESTATEBASEADDRESS_BYTEOFFSET = 0x10, - SURFACESTATEBASEADDRESS_INDEX = 0x4, - DYNAMICSTATEBASEADDRESS_BYTEOFFSET = 0x18, - DYNAMICSTATEBASEADDRESS_INDEX = 0x6, - INDIRECTOBJECTBASEADDRESS_BYTEOFFSET = 0x20, - INDIRECTOBJECTBASEADDRESS_INDEX = 0x8, - INSTRUCTIONBASEADDRESS_BYTEOFFSET = 0x28, - INSTRUCTIONBASEADDRESS_INDEX = 0xa, - BINDLESSSURFACESTATEBASEADDRESS_BYTEOFFSET = 0x40, - BINDLESSSURFACESTATEBASEADDRESS_INDEX = 0x10, - BINDLESSSAMPLERSTATEBASEADDRESS_BYTEOFFSET = 0x4c, - BINDLESSSAMPLERSTATEBASEADDRESS_INDEX = 0x13, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_BASE_ADDRESS sInit() { - STATE_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 22); - return TheStructure.RawData[index]; - } - inline void setGeneralStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBaseAddressModifyEnable = value; - } - inline bool getGeneralStateBaseAddressModifyEnable() const { - return (TheStructure.Common.GeneralStateBaseAddressModifyEnable); - } - inline void setGeneralStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); - } - inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getGeneralStateMemoryObjectControlState() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagGENERALSTATEBASEADDRESS { - GENERALSTATEBASEADDRESS_BIT_SHIFT = 0xc, - GENERALSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } GENERALSTATEBASEADDRESS; - inline void setGeneralStateBaseAddress(const uint64_t value) { - TheStructure.Common.GeneralStateBaseAddress = value >> GENERALSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getGeneralStateBaseAddress() const { - return (TheStructure.Common.GeneralStateBaseAddress << GENERALSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); - } - inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlState() const { - uint32_t mocs = TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - return (mocs); - } - inline void setSurfaceStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.SurfaceStateBaseAddressModifyEnable = value; - } - inline bool getSurfaceStateBaseAddressModifyEnable() const { - return (TheStructure.Common.SurfaceStateBaseAddressModifyEnable); - } - inline void setSurfaceStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); - } - inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getSurfaceStateMemoryObjectControlState() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagSURFACESTATEBASEADDRESS { - SURFACESTATEBASEADDRESS_BIT_SHIFT = 0xc, - SURFACESTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } SURFACESTATEBASEADDRESS; - inline void setSurfaceStateBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceStateBaseAddress = value >> SURFACESTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getSurfaceStateBaseAddress() const { - return (TheStructure.Common.SurfaceStateBaseAddress << SURFACESTATEBASEADDRESS_BIT_SHIFT); - } - inline void setDynamicStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBaseAddressModifyEnable = value; - } - inline bool getDynamicStateBaseAddressModifyEnable() const { - return (TheStructure.Common.DynamicStateBaseAddressModifyEnable); - } - inline void setDynamicStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); - } - inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getDynamicStateMemoryObjectControlState() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagDYNAMICSTATEBASEADDRESS { - DYNAMICSTATEBASEADDRESS_BIT_SHIFT = 0xc, - DYNAMICSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } DYNAMICSTATEBASEADDRESS; - inline void setDynamicStateBaseAddress(const uint64_t value) { - TheStructure.Common.DynamicStateBaseAddress = value >> DYNAMICSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getDynamicStateBaseAddress() const { - return (TheStructure.Common.DynamicStateBaseAddress << DYNAMICSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setIndirectObjectBaseAddressModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBaseAddressModifyEnable = value; - } - inline bool getIndirectObjectBaseAddressModifyEnable() const { - return (TheStructure.Common.IndirectObjectBaseAddressModifyEnable); - } - inline void setIndirectObjectMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); - } - inline void setIndirectObjectMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getIndirectObjectMemoryObjectControlState() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagINDIRECTOBJECTBASEADDRESS { - INDIRECTOBJECTBASEADDRESS_BIT_SHIFT = 0xc, - INDIRECTOBJECTBASEADDRESS_ALIGN_SIZE = 0x1000, - } INDIRECTOBJECTBASEADDRESS; - inline void setIndirectObjectBaseAddress(const uint64_t value) { - TheStructure.Common.IndirectObjectBaseAddress = value >> INDIRECTOBJECTBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getIndirectObjectBaseAddress() const { - return (TheStructure.Common.IndirectObjectBaseAddress << INDIRECTOBJECTBASEADDRESS_BIT_SHIFT); - } - inline void setInstructionBaseAddressModifyEnable(const bool value) { - TheStructure.Common.InstructionBaseAddressModifyEnable = value; - } - inline bool getInstructionBaseAddressModifyEnable() const { - return (TheStructure.Common.InstructionBaseAddressModifyEnable); - } - inline void setInstructionMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = value; - } - inline uint64_t getInstructionMemoryObjectControlStateReserved() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); - } - inline void setInstructionMemoryObjectControlState(const uint32_t value) { - uint64_t val = static_cast(value); - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = (val >> 1); - } - inline uint32_t getInstructionMemoryObjectControlState() const { - uint64_t mocs = TheStructure.Common.InstructionMemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - return static_cast(mocs); - } - typedef enum tagINSTRUCTIONBASEADDRESS { - INSTRUCTIONBASEADDRESS_BIT_SHIFT = 0xc, - INSTRUCTIONBASEADDRESS_ALIGN_SIZE = 0x1000, - } INSTRUCTIONBASEADDRESS; - inline void setInstructionBaseAddress(const uint64_t value) { - TheStructure.Common.InstructionBaseAddress = value >> INSTRUCTIONBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getInstructionBaseAddress() const { - return (TheStructure.Common.InstructionBaseAddress << INSTRUCTIONBASEADDRESS_BIT_SHIFT); - } - inline void setGeneralStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBufferSizeModifyEnable = value; - } - inline bool getGeneralStateBufferSizeModifyEnable() const { - return (TheStructure.Common.GeneralStateBufferSizeModifyEnable); - } - inline void setGeneralStateBufferSize(const uint32_t value) { - TheStructure.Common.GeneralStateBufferSize = value; - } - inline uint32_t getGeneralStateBufferSize() const { - return (TheStructure.Common.GeneralStateBufferSize); - } - inline void setDynamicStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBufferSizeModifyEnable = value; - } - inline bool getDynamicStateBufferSizeModifyEnable() const { - return (TheStructure.Common.DynamicStateBufferSizeModifyEnable); - } - inline void setDynamicStateBufferSize(const uint32_t value) { - TheStructure.Common.DynamicStateBufferSize = value; - } - inline uint32_t getDynamicStateBufferSize() const { - return (TheStructure.Common.DynamicStateBufferSize); - } - inline void setIndirectObjectBufferSizeModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBufferSizeModifyEnable = value; - } - inline bool getIndirectObjectBufferSizeModifyEnable() const { - return (TheStructure.Common.IndirectObjectBufferSizeModifyEnable); - } - inline void setIndirectObjectBufferSize(const uint32_t value) { - TheStructure.Common.IndirectObjectBufferSize = value; - } - inline uint32_t getIndirectObjectBufferSize() const { - return (TheStructure.Common.IndirectObjectBufferSize); - } - inline void setInstructionBufferSizeModifyEnable(const bool value) { - TheStructure.Common.InstructionBufferSizeModifyEnable = value; - } - inline bool getInstructionBufferSizeModifyEnable() const { - return (TheStructure.Common.InstructionBufferSizeModifyEnable); - } - inline void setInstructionBufferSize(const uint32_t value) { - TheStructure.Common.InstructionBufferSize = value; - } - inline uint32_t getInstructionBufferSize() const { - return (TheStructure.Common.InstructionBufferSize); - } - inline void setBindlessSurfaceStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable = value; - } - inline bool getBindlessSurfaceStateBaseAddressModifyEnable() const { - return (TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable); - } - inline void setBindlessSurfaceStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); - } - inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { - return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { - BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT = 0xc, - BINDLESSSURFACESTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } BINDLESSSURFACESTATEBASEADDRESS; - inline void setBindlessSurfaceStateBaseAddress(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateBaseAddress = value >> BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getBindlessSurfaceStateBaseAddress() const { - return (TheStructure.Common.BindlessSurfaceStateBaseAddress << BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT); - } - inline void setBindlessSurfaceStateSize(const uint32_t value) { - TheStructure.Common.BindlessSurfaceStateSize = value; - } - inline uint32_t getBindlessSurfaceStateSize() const { - return (TheStructure.Common.BindlessSurfaceStateSize); - } - inline void setBindlessSamplerStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.BindlessSamplerStateBaseAddressModifyEnable = value; - } - inline bool getBindlessSamplerStateBaseAddressModifyEnable() const { - return (TheStructure.Common.BindlessSamplerStateBaseAddressModifyEnable); - } - inline void setBindlessSamplerStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); - } - inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { - return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { - BINDLESSSAMPLERSTATEBASEADDRESS_BIT_SHIFT = 0xc, - BINDLESSSAMPLERSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } BINDLESSSAMPLERSTATEBASEADDRESS; - inline void setBindlessSamplerStateBaseAddress(const uint64_t value) { - TheStructure.Common.BindlessSamplerStateBaseAddress = value >> BINDLESSSAMPLERSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getBindlessSamplerStateBaseAddress() const { - return (TheStructure.Common.BindlessSamplerStateBaseAddress << BINDLESSSAMPLERSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setBindlessSamplerStateBufferSize(const uint32_t value) { - TheStructure.Common.BindlessSamplerStateBufferSize = value; - } - inline uint32_t getBindlessSamplerStateBufferSize() const { - return (TheStructure.Common.BindlessSamplerStateBufferSize); - } -} STATE_BASE_ADDRESS; -STATIC_ASSERT(88 == sizeof(STATE_BASE_ADDRESS)); - -typedef struct tagMI_REPORT_PERF_COUNT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t UseGlobalGtt : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t CoreModeEnable : BITFIELD_RANGE(4, 4); - uint64_t Reserved_37 : BITFIELD_RANGE(5, 5); - uint64_t MemoryAddress : BITFIELD_RANGE(6, 63); - uint32_t ReportId; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT = 0x28, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_REPORT_PERF_COUNT sInit() { - MI_REPORT_PERF_COUNT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - inline void setCoreModeEnable(const uint64_t value) { - TheStructure.Common.CoreModeEnable = value; - } - inline uint64_t getCoreModeEnable() const { - return (TheStructure.Common.CoreModeEnable); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x6, - MEMORYADDRESS_ALIGN_SIZE = 0x40, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setReportId(const uint32_t value) { - TheStructure.Common.ReportId = value; - } - inline uint32_t getReportId() const { - return (TheStructure.Common.ReportId); - } -} MI_REPORT_PERF_COUNT; -STATIC_ASSERT(16 == sizeof(MI_REPORT_PERF_COUNT)); - -typedef struct tagGPGPU_CSR_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 11); - uint64_t GpgpuCsrBaseAddress : BITFIELD_RANGE(12, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_UNNAMED_1 = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GPGPUCSRBASEADDRESS_BYTEOFFSET = 0x4, - GPGPUCSRBASEADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_UNNAMED_1; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagGPGPU_CSR_BASE_ADDRESS sInit() { - GPGPU_CSR_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagGPGPUCSRBASEADDRESS { - GPGPUCSRBASEADDRESS_BIT_SHIFT = 0xC, - GPGPUCSRBASEADDRESS_ALIGN_SIZE = 0x1000, - } GPGPUCSRBASEADDRESS; - inline uint64_t getGpgpuCsrBaseAddress() const { - return (uint64_t)TheStructure.Common.GpgpuCsrBaseAddress << GPGPUCSRBASEADDRESS_BIT_SHIFT; - } - inline void setGpgpuCsrBaseAddress(uint64_t value) { - TheStructure.Common.GpgpuCsrBaseAddress = value >> GPGPUCSRBASEADDRESS_BIT_SHIFT; - } -} GPGPU_CSR_BASE_ADDRESS; -STATIC_ASSERT(12 == sizeof(GPGPU_CSR_BASE_ADDRESS)); - -typedef struct tagSTATE_SIP { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 3); - uint64_t SystemInstructionPointer : BITFIELD_RANGE(4, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_SIP = 0x2, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - SYSTEMINSTRUCTIONPOINTER_BYTEOFFSET = 0x4, - SYSTEMINSTRUCTIONPOINTER_INDEX = 0x1, - } PATCH_CONSTANTS; - void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_SIP; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_SIP sInit() { - STATE_SIP state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagSYSTEMINSTRUCTIONPOINTER { - SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT = 0x4, - SYSTEMINSTRUCTIONPOINTER_ALIGN_SIZE = 0x10, - } SYSTEMINSTRUCTIONPOINTER; - inline uint64_t getSystemInstructionPointer() const { - return (uint64_t)TheStructure.Common.SystemInstructionPointer << SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } - inline void setSystemInstructionPointer(uint64_t value) { - TheStructure.Common.SystemInstructionPointer = value >> SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } -} STATE_SIP; -STATIC_ASSERT(12 == sizeof(STATE_SIP)); - -struct MI_USER_INTERRUPT { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MICommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - enum MI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_USER_INTERRUPT = 2, - }; - enum COMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0, - }; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MICommandOpcode = MI_COMMAND_OPCODE_MI_USER_INTERRUPT; - } - static MI_USER_INTERRUPT sInit() { - MI_USER_INTERRUPT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - return TheStructure.RawData[index]; - } -}; -STATIC_ASSERT(4 == sizeof(MI_USER_INTERRUPT)); - -typedef struct tagMI_FLUSH_DW { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t FlushLlc : BITFIELD_RANGE(9, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 16); - uint32_t Reserved_17 : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t Reserved_19 : BITFIELD_RANGE(19, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_22 : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t DestinationAddressType : BITFIELD_RANGE(2, 2); - uint64_t DestinationAddress : BITFIELD_RANGE(3, 47); - uint64_t Reserved_80 : BITFIELD_RANGE(48, 63); - // DWORD 3 - uint64_t ImmediateData; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x3, - } DWORD_LENGTH; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD = 0x1, - POST_SYNC_OPERATION_WRITE_TIMESTAMP_REGISTER = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_FLUSH_DW = 0x26, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_FLUSH_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagMI_FLUSH_DW sInit() { - MI_FLUSH_DW state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return TheStructure.Common.NotifyEnable; - } - inline void setFlushLlc(const bool value) { - TheStructure.Common.FlushLlc = value; - } - inline bool getFlushLlc() const { - return TheStructure.Common.FlushLlc; - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setTlbInvalidate(const bool value) { - TheStructure.Common.TlbInvalidate = value; - } - inline bool getTlbInvalidate() const { - return TheStructure.Common.TlbInvalidate; - } - inline void setStoreDataIndex(const bool value) { - TheStructure.Common.StoreDataIndex = value; - } - inline bool getStoreDataIndex() const { - return TheStructure.Common.StoreDataIndex; - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - typedef enum tagDESTINATIONADDRESS { - DESTINATIONADDRESS_BIT_SHIFT = 0x3, - DESTINATIONADDRESS_ALIGN_SIZE = 0x8, - } DESTINATIONADDRESS; - inline void setDestinationAddress(const uint64_t value) { - UNRECOVERABLE_IF(value > 0xfffffffffff8L); - TheStructure.Common.DestinationAddress = value >> DESTINATIONADDRESS_BIT_SHIFT; - } - inline uint64_t getDestinationAddress() const { - return TheStructure.Common.DestinationAddress << DESTINATIONADDRESS_BIT_SHIFT; - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return TheStructure.Common.ImmediateData; - } -} MI_FLUSH_DW; -STATIC_ASSERT(20 == sizeof(MI_FLUSH_DW)); - -typedef struct tagXY_SRC_COPY_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 14); - uint32_t SrcTilingEnable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SourceX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t SourceY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 7 - uint32_t SourcePitch : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - // DWORD 8 - uint64_t SourceBaseAddress; - } Common; - uint32_t RawData[10]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tagSRC_TILING_ENABLE { - SRC_TILING_ENABLE_TILING_DISABLED_LINEAR = 0x0, - SRC_TILING_ENABLE_TILING_ENABLED = 0x1, - } SRC_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x53, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x8, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.SrcTilingEnable = SRC_TILING_ENABLE_TILING_DISABLED_LINEAR; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xCC; - } - static tagXY_SRC_COPY_BLT sInit() { - XY_SRC_COPY_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void setSrcTilingEnable(const SRC_TILING_ENABLE value) { - TheStructure.Common.SrcTilingEnable = value; - } - inline SRC_TILING_ENABLE getSrcTilingEnable() const { - return static_cast(TheStructure.Common.SrcTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setSourceX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourceX1Coordinate_Left = value; - } - inline uint32_t getSourceX1CoordinateLeft() const { - return TheStructure.Common.SourceX1Coordinate_Left; - } - inline void setSourceY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.SourceY1Coordinate_Top = value; - } - inline uint32_t getSourceY1CoordinateTop() const { - return TheStructure.Common.SourceY1Coordinate_Top; - } - inline void setSourcePitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourcePitch = value; - } - inline uint32_t getSourcePitch() const { - return TheStructure.Common.SourcePitch; - } - inline void setSourceBaseAddress(const uint64_t value) { - TheStructure.Common.SourceBaseAddress = value; - } - inline uint64_t getSourceBaseAddress() const { - return TheStructure.Common.SourceBaseAddress; - } -} XY_SRC_COPY_BLT; -STATIC_ASSERT(40 == sizeof(XY_SRC_COPY_BLT)); - -typedef struct tagXY_COLOR_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4-5 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SolidPaternColor; - } Common; - uint32_t RawData[7]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - _32BPP_BYTE_MASK_WRITE_RGBA_CHANNEL = 0x3 - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x50, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x5, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xF0; - } - static tagXY_COLOR_BLT sInit() { - XY_COLOR_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setFillColor(const uint32_t *value) { - TheStructure.Common.SolidPaternColor = *value; - } -} XY_COLOR_BLT; -STATIC_ASSERT(28 == sizeof(XY_COLOR_BLT)); - -typedef struct tagGRF { - union tagTheStructure { - float fRegs[8]; - uint32_t dwRegs[8]; - uint16_t wRegs[16]; - uint32_t RawData[8]; - } TheStructure; -} GRF; -STATIC_ASSERT(32 == sizeof(GRF)); - -typedef struct tagMI_BATCH_BUFFER_START { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AddressSpaceIndicator : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t ResourceStreamerEnable : BITFIELD_RANGE(10, 10); - uint32_t Reserved_11 : BITFIELD_RANGE(11, 14); - uint32_t PredicationEnable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 19); - uint32_t PoshEnable : BITFIELD_RANGE(20, 20); - uint32_t PoshStart : BITFIELD_RANGE(21, 21); - uint32_t SecondLevelBatchBuffer : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t BatchBufferStartAddress_Graphicsaddress39_2 : BITFIELD_RANGE(2, 47); - uint64_t BatchBufferStartAddress_Reserved : BITFIELD_RANGE(48, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagADDRESS_SPACE_INDICATOR { - ADDRESS_SPACE_INDICATOR_GGTT = 0x0, - ADDRESS_SPACE_INDICATOR_PPGTT = 0x1, - } ADDRESS_SPACE_INDICATOR; - typedef enum tagSECOND_LEVEL_BATCH_BUFFER { - SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH = 0x0, - SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH = 0x1, - } SECOND_LEVEL_BATCH_BUFFER; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START = 0x31, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.AddressSpaceIndicator = ADDRESS_SPACE_INDICATOR_GGTT; - TheStructure.Common.SecondLevelBatchBuffer = SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_START sInit() { - MI_BATCH_BUFFER_START state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setAddressSpaceIndicator(const ADDRESS_SPACE_INDICATOR value) { - TheStructure.Common.AddressSpaceIndicator = value; - } - inline ADDRESS_SPACE_INDICATOR getAddressSpaceIndicator() const { - return static_cast(TheStructure.Common.AddressSpaceIndicator); - } - inline void setResourceStreamerEnable(const bool value) { - TheStructure.Common.ResourceStreamerEnable = value; - } - inline bool getResourceStreamerEnable() const { - return (TheStructure.Common.ResourceStreamerEnable); - } - inline void setPredicationEnable(const uint32_t value) { - TheStructure.Common.PredicationEnable = value; - } - inline uint32_t getPredicationEnable() const { - return (TheStructure.Common.PredicationEnable); - } - inline void setPoshEnable(const uint32_t value) { - TheStructure.Common.PoshEnable = value; - } - inline uint32_t getPoshEnable() const { - return (TheStructure.Common.PoshEnable); - } - inline void setPoshStart(const uint32_t value) { - TheStructure.Common.PoshStart = value; - } - inline uint32_t getPoshStart() const { - return (TheStructure.Common.PoshStart); - } - inline void setSecondLevelBatchBuffer(const SECOND_LEVEL_BATCH_BUFFER value) { - TheStructure.Common.SecondLevelBatchBuffer = value; - } - inline SECOND_LEVEL_BATCH_BUFFER getSecondLevelBatchBuffer() const { - return static_cast(TheStructure.Common.SecondLevelBatchBuffer); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2 { - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2; - inline void setBatchBufferStartAddress(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Graphicsaddress39_2 = value >> BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddress() const { - return (TheStructure.Common.BatchBufferStartAddress_Graphicsaddress39_2 << BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS39_2_BIT_SHIFT); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_RESERVED { - BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_RESERVED; - inline void setBatchBufferStartAddressReserved(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Reserved = value >> BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddressReserved() const { - return (TheStructure.Common.BatchBufferStartAddress_Reserved << BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT); - } -} MI_BATCH_BUFFER_START; -STATIC_ASSERT(12 == sizeof(MI_BATCH_BUFFER_START)); - -typedef struct tagMEDIA_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 29); - uint32_t Rotation : BITFIELD_RANGE(30, 31); - uint32_t Cr_VCb_UPixelOffsetVDirection : BITFIELD_RANGE(0, 1); - uint32_t PictureStructure : BITFIELD_RANGE(2, 3); - uint32_t Width : BITFIELD_RANGE(4, 17); - uint32_t Height : BITFIELD_RANGE(18, 31); - uint32_t TileMode : BITFIELD_RANGE(0, 1); - uint32_t HalfPitchForChroma : BITFIELD_RANGE(2, 2); - uint32_t SurfacePitch : BITFIELD_RANGE(3, 20); - uint32_t AddressControl : BITFIELD_RANGE(21, 21); - uint32_t MemoryCompressionEnable : BITFIELD_RANGE(22, 22); - uint32_t MemoryCompressionMode : BITFIELD_RANGE(23, 23); - uint32_t Cr_VCb_UPixelOffsetVDirectionMsb : BITFIELD_RANGE(24, 24); - uint32_t Cr_VCb_UPixelOffsetUDirection : BITFIELD_RANGE(25, 25); - uint32_t InterleaveChroma : BITFIELD_RANGE(26, 26); - uint32_t SurfaceFormat : BITFIELD_RANGE(27, 31); - uint32_t YOffsetForU_Cb : BITFIELD_RANGE(0, 13); - uint32_t Reserved_110 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForU_Cb : BITFIELD_RANGE(16, 29); - uint32_t Reserved_126 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_128; - uint32_t SurfaceMemoryObjectControlState_Reserved : BITFIELD_RANGE(0, 0); - uint32_t SurfaceMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(1, 6); - uint32_t Reserved_167 : BITFIELD_RANGE(7, 17); - uint32_t TiledResourceMode : BITFIELD_RANGE(18, 19); - uint32_t Depth : BITFIELD_RANGE(20, 23); - uint32_t Reserved_184 : BITFIELD_RANGE(24, 29); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(30, 30); - uint32_t VerticalLineStride : BITFIELD_RANGE(31, 31); - uint32_t SurfaceBaseAddressLow; - uint32_t SurfaceBaseAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - } Common; - struct tagSurfaceFormatIsNotOneOfPlanarFormats { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } SurfaceFormatIsNotOneOfPlanarFormats; - struct tagSurfaceFormatIsOneOfPlanarFormats { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 15); - uint32_t YOffset : BITFIELD_RANGE(16, 19); - uint32_t XOffset : BITFIELD_RANGE(20, 26); - uint32_t Reserved_27 : BITFIELD_RANGE(27, 31); - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } SurfaceFormatIsOneOfPlanarFormats; - struct tag_SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t YOffsetForV_Cr : BITFIELD_RANGE(0, 14); - uint32_t Reserved_143 : BITFIELD_RANGE(15, 15); - uint32_t XOffsetForV_Cr : BITFIELD_RANGE(16, 29); - uint32_t Reserved_158 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } _SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagROTATION { - ROTATION_NO_ROTATION_OR_0_DEGREE = 0x0, - ROTATION_90_DEGREE_ROTATION = 0x1, - ROTATION_180_DEGREE_ROTATION = 0x2, - ROTATION_270_DEGREE_ROTATION = 0x3, - } ROTATION; - typedef enum tagPICTURE_STRUCTURE { - PICTURE_STRUCTURE_FRAME_PICTURE = 0x0, - PICTURE_STRUCTURE_TOP_FIELD_PICTURE = 0x1, - PICTURE_STRUCTURE_BOTTOM_FIELD_PICTURE = 0x2, - PICTURE_STRUCTURE_INVALID_NOT_ALLOWED = 0x3, - } PICTURE_STRUCTURE; - typedef enum tagTILE_MODE { - TILE_MODE_TILEMODE_LINEAR = 0x0, - TILE_MODE_TILEMODE_XMAJOR = 0x2, - TILE_MODE_TILEMODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagADDRESS_CONTROL { - ADDRESS_CONTROL_CLAMP = 0x0, - ADDRESS_CONTROL_MIRROR = 0x1, - } ADDRESS_CONTROL; - typedef enum tagMEMORY_COMPRESSION_MODE { - MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE = 0x0, - MEMORY_COMPRESSION_MODE_VERTICAL_COMPRESSION_MODE = 0x1, - } MEMORY_COMPRESSION_MODE; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_YCRCB_NORMAL = 0x0, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x1, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x2, - SURFACE_FORMAT_YCRCB_SWAPY = 0x3, - SURFACE_FORMAT_PLANAR_420_8 = 0x4, - SURFACE_FORMAT_Y8_UNORM_VA = 0x5, - SURFACE_FORMAT_Y16_SNORM = 0x6, - SURFACE_FORMAT_Y16_UNORM_VA = 0x7, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0x8, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0x9, - SURFACE_FORMAT_R8B8_UNORM_CRCB = 0xa, - SURFACE_FORMAT_R8_UNORM_CR_CB = 0xb, - SURFACE_FORMAT_Y8_UNORM = 0xc, - SURFACE_FORMAT_A8Y8U8V8_UNORM = 0xd, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xe, - SURFACE_FORMAT_R16G16B16A16 = 0xf, - SURFACE_FORMAT_Y1_UNORM = 0x10, - SURFACE_FORMAT_Y32_UNORM = 0x11, - SURFACE_FORMAT_PLANAR_422_8 = 0x12, - SURFACE_FORMAT_FM_STRBUF_Y1 = 0x13, - SURFACE_FORMAT_FM_STRBUF_Y8 = 0x14, - SURFACE_FORMAT_FM_STRBUF_Y16 = 0x15, - SURFACE_FORMAT_FM_STRBUF_Y32 = 0x16, - SURFACE_FORMAT_PLANAR_420_16 = 0x17, - SURFACE_FORMAT_R16B16_UNORM_CRCB = 0x18, - SURFACE_FORMAT_R16_UNORM_CR_CB = 0x19, - SURFACE_FORMAT_Y16_UNORM = 0x1a, - } SURFACE_FORMAT; - typedef enum tagSURFACE_MEMORY_OBJECT_CONTROL_STATE { - SURFACE_MEMORY_OBJECT_CONTROL_STATE_DEFAULTVAUEDESC = 0x0, - } SURFACE_MEMORY_OBJECT_CONTROL_STATE; - typedef enum tagTILED_RESOURCE_MODE { - TILED_RESOURCE_MODE_TRMODE_NONE = 0x0, - TILED_RESOURCE_MODE_TRMODE_TILEYF = 0x1, - TILED_RESOURCE_MODE_TRMODE_TILEYS = 0x2, - } TILED_RESOURCE_MODE; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x18, - SURFACEBASEADDRESS_INDEX = 0x6, - SURFACEBASEADDRESSHIGH_BYTEOFFSET = 0x1c, - SURFACEBASEADDRESSHIGH_INDEX = 0x7, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.Rotation = ROTATION_NO_ROTATION_OR_0_DEGREE; - TheStructure.Common.PictureStructure = PICTURE_STRUCTURE_FRAME_PICTURE; - TheStructure.Common.TileMode = TILE_MODE_TILEMODE_LINEAR; - TheStructure.Common.AddressControl = ADDRESS_CONTROL_CLAMP; - TheStructure.Common.MemoryCompressionMode = MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE; - TheStructure.Common.SurfaceFormat = SURFACE_FORMAT_YCRCB_NORMAL; - TheStructure.Common.TiledResourceMode = TILED_RESOURCE_MODE_TRMODE_NONE; - } - static tagMEDIA_SURFACE_STATE sInit() { - MEDIA_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - inline void setRotation(const ROTATION value) { - TheStructure.Common.Rotation = value; - } - inline ROTATION getRotation() const { - return static_cast(TheStructure.Common.Rotation); - } - inline void setCrVCbUPixelOffsetVDirection(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetVDirection = value; - } - inline uint32_t getCrVCbUPixelOffsetVDirection() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirection); - } - inline void setPictureStructure(const PICTURE_STRUCTURE value) { - TheStructure.Common.PictureStructure = value; - } - inline PICTURE_STRUCTURE getPictureStructure() const { - return static_cast(TheStructure.Common.PictureStructure); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setHalfPitchForChroma(const bool value) { - TheStructure.Common.HalfPitchForChroma = value; - } - inline bool getHalfPitchForChroma() const { - return (TheStructure.Common.HalfPitchForChroma); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setAddressControl(const ADDRESS_CONTROL value) { - TheStructure.Common.AddressControl = value; - } - inline ADDRESS_CONTROL getAddressControl() const { - return static_cast(TheStructure.Common.AddressControl); - } - inline void setMemoryCompressionEnable(const bool value) { - TheStructure.Common.MemoryCompressionEnable = value; - } - inline bool getMemoryCompressionEnable() const { - return (TheStructure.Common.MemoryCompressionEnable); - } - inline void setMemoryCompressionMode(const MEMORY_COMPRESSION_MODE value) { - TheStructure.Common.MemoryCompressionMode = value; - } - inline MEMORY_COMPRESSION_MODE getMemoryCompressionMode() const { - return static_cast(TheStructure.Common.MemoryCompressionMode); - } - inline void setCrVCbUPixelOffsetVDirectionMsb(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb = value; - } - inline uint32_t getCrVCbUPixelOffsetVDirectionMsb() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb); - } - inline void setCrVCbUPixelOffsetUDirection(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetUDirection = value; - } - inline uint32_t getCrVCbUPixelOffsetUDirection() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetUDirection); - } - inline void setInterleaveChroma(const bool value) { - TheStructure.Common.InterleaveChroma = value; - } - inline bool getInterleaveChroma() const { - return (TheStructure.Common.InterleaveChroma); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setYOffsetForUCb(const uint32_t value) { - TheStructure.Common.YOffsetForU_Cb = value; - } - inline uint32_t getYOffsetForUCb() const { - return (TheStructure.Common.YOffsetForU_Cb); - } - inline void setXOffsetForUCb(const uint32_t value) { - TheStructure.Common.XOffsetForU_Cb = value; - } - inline uint32_t getXOffsetForUCb() const { - return (TheStructure.Common.XOffsetForU_Cb); - } - inline void setSurfaceMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_Reserved = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); - } - inline void setSurfaceMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getSurfaceMemoryObjectControlState() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); - } - inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { - TheStructure.Common.TiledResourceMode = value; - } - inline TILED_RESOURCE_MODE getTiledResourceMode() const { - return static_cast(TheStructure.Common.TiledResourceMode); - } - inline void setDepth(const uint32_t value) { - TheStructure.Common.Depth = value; - } - inline uint32_t getDepth() const { - return (TheStructure.Common.Depth); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddressLow = static_cast(value & 0xffffffff); - TheStructure.Common.SurfaceBaseAddressHigh = (value >> 32) & 0xffffffff; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddressLow | - static_cast(TheStructure.Common.SurfaceBaseAddressHigh) << 32); - } - inline void setSurfaceBaseAddressHigh(const uint32_t value) { - TheStructure.Common.SurfaceBaseAddressHigh = value; - } - inline uint32_t getSurfaceBaseAddressHigh() const { - return (TheStructure.Common.SurfaceBaseAddressHigh); - } - typedef enum tagYOFFSET { - YOFFSET_BIT_SHIFT = 0x2, - YOFFSET_ALIGN_SIZE = 0x4, - } YOFFSET; - inline void setYOffset(const uint32_t value) { - TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset = value >> YOFFSET_BIT_SHIFT; - } - inline uint32_t getYOffset() const { - return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset << YOFFSET_BIT_SHIFT); - } - typedef enum tagXOFFSET { - XOFFSET_BIT_SHIFT = 0x2, - XOFFSET_ALIGN_SIZE = 0x4, - } XOFFSET; - inline void setXOffset(const uint32_t value) { - TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset = value >> XOFFSET_BIT_SHIFT; - } - inline uint32_t getXOffset() const { - return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset << XOFFSET_BIT_SHIFT); - } - inline void setYOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr = value; - } - inline uint32_t getYOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr); - } - inline void setXOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr = value; - } - inline uint32_t getXOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr); - } -} MEDIA_SURFACE_STATE; -STATIC_ASSERT(32 == sizeof(MEDIA_SURFACE_STATE)); - -typedef struct tagMI_MATH { - union _DW0 { - struct _BitField { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved : BITFIELD_RANGE(8, 22); - uint32_t InstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t InstructionType : BITFIELD_RANGE(29, 31); - } BitField; - uint32_t Value; - } DW0; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_MATH = 0x1A, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; -} MI_MATH; -typedef struct tagMI_MATH_ALU_INST_INLINE { - union _DW0 { - struct _BitField { - uint32_t Operand2 : BITFIELD_RANGE(0, 9); - uint32_t Operand1 : BITFIELD_RANGE(10, 19); - uint32_t ALUOpcode : BITFIELD_RANGE(20, 31); - } BitField; - uint32_t Value; - } DW0; -} MI_MATH_ALU_INST_INLINE; -typedef struct tagMI_SEMAPHORE_WAIT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 11); - uint32_t CompareOperation : BITFIELD_RANGE(12, 14); - uint32_t WaitMode : BITFIELD_RANGE(15, 15); - uint32_t RegisterPollMode : BITFIELD_RANGE(16, 16); - uint32_t Reserved_17 : BITFIELD_RANGE(17, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t SemaphoreDataDword; - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t SemaphoreAddress_Graphicsaddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagCOMPARE_OPERATION { - COMPARE_OPERATION_SAD_GREATER_THAN_SDD = 0x0, - COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD = 0x1, - COMPARE_OPERATION_SAD_LESS_THAN_SDD = 0x2, - COMPARE_OPERATION_SAD_LESS_THAN_OR_EQUAL_SDD = 0x3, - COMPARE_OPERATION_SAD_EQUAL_SDD = 0x4, - COMPARE_OPERATION_SAD_NOT_EQUAL_SDD = 0x5, - } COMPARE_OPERATION; - typedef enum tagWAIT_MODE { - WAIT_MODE_SIGNAL_MODE = 0x0, - WAIT_MODE_POLLING_MODE = 0x1, - } WAIT_MODE; - typedef enum tagREGISTER_POLL_MODE { - REGISTER_POLL_MODE_MEMORY_POLL = 0x0, - REGISTER_POLL_MODE_REGISTER_POLL = 0x1, - } REGISTER_POLL_MODE; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT = 0x1c, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.CompareOperation = COMPARE_OPERATION_SAD_GREATER_THAN_SDD; - TheStructure.Common.WaitMode = WAIT_MODE_SIGNAL_MODE; - TheStructure.Common.RegisterPollMode = REGISTER_POLL_MODE_MEMORY_POLL; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_SEMAPHORE_WAIT sInit() { - MI_SEMAPHORE_WAIT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setCompareOperation(const COMPARE_OPERATION value) { - TheStructure.Common.CompareOperation = value; - } - inline COMPARE_OPERATION getCompareOperation() const { - return static_cast(TheStructure.Common.CompareOperation); - } - inline void setWaitMode(const WAIT_MODE value) { - TheStructure.Common.WaitMode = value; - } - inline WAIT_MODE getWaitMode() const { - return static_cast(TheStructure.Common.WaitMode); - } - inline void setRegisterPollMode(const REGISTER_POLL_MODE value) { - TheStructure.Common.RegisterPollMode = value; - } - inline REGISTER_POLL_MODE getRegisterPollMode() const { - return static_cast(TheStructure.Common.RegisterPollMode); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - inline void setSemaphoreDataDword(const uint32_t value) { - TheStructure.Common.SemaphoreDataDword = value; - } - inline uint32_t getSemaphoreDataDword() const { - return (TheStructure.Common.SemaphoreDataDword); - } - typedef enum tagSEMAPHOREADDRESS_GRAPHICSADDRESS { - SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_GRAPHICSADDRESS_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_GRAPHICSADDRESS39_2; - inline void setSemaphoreGraphicsAddress(const uint64_t value) { - TheStructure.Common.SemaphoreAddress_Graphicsaddress = value >> SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT; - } - inline uint64_t getSemaphoreGraphicsAddress() const { - return (TheStructure.Common.SemaphoreAddress_Graphicsaddress << SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT); - } - typedef enum tagSEMAPHOREADDRESS_RESERVED { - SEMAPHOREADDRESS_RESERVED_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_RESERVED; -} MI_SEMAPHORE_WAIT; -STATIC_ASSERT(16 == sizeof(MI_SEMAPHORE_WAIT)); - -typedef struct tagMI_STORE_DATA_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 20); - uint32_t StoreQword : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t CoreModeEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 1); - uint64_t Address : BITFIELD_RANGE(2, 63); - uint32_t DataDword0; - uint32_t DataDword1; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_STORE_DWORD = 0x2, - DWORD_LENGTH_STORE_QWORD = 0x3, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_DATA_IMM = 0x20, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_STORE_DWORD; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_DATA_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_DATA_IMM sInit() { - MI_STORE_DATA_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setStoreQword(const bool value) { - TheStructure.Common.StoreQword = value; - } - inline bool getStoreQword() const { - return (TheStructure.Common.StoreQword); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - inline void setCoreModeEnable(const uint64_t value) { - TheStructure.Common.CoreModeEnable = value; - } - inline uint64_t getCoreModeEnable() const { - return (TheStructure.Common.CoreModeEnable); - } - typedef enum tagADDRESS { - ADDRESS_BIT_SHIFT = 0x2, - ADDRESS_ALIGN_SIZE = 0x4, - } ADDRESS; - inline void setAddress(const uint64_t value) { - TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT; - } - inline uint64_t getAddress() const { - return (TheStructure.Common.Address << ADDRESS_BIT_SHIFT); - } - inline void setDataDword0(const uint32_t value) { - TheStructure.Common.DataDword0 = value; - } - inline uint32_t getDataDword0() const { - return (TheStructure.Common.DataDword0); - } - inline void setDataDword1(const uint32_t value) { - TheStructure.Common.DataDword1 = value; - } - inline uint32_t getDataDword1() const { - return (TheStructure.Common.DataDword1); - } -} MI_STORE_DATA_IMM; -STATIC_ASSERT(20 == sizeof(MI_STORE_DATA_IMM)); - -typedef struct tagPWR_CLK_STATE_REGISTER { - typedef enum tagADDRESS { - REG_ADDRESS = 0x20C8 - } ADDRESS; - union tagTheStructure { - struct tagCommon { - uint32_t EUmin : BITFIELD_RANGE(0, 3); - uint32_t EUmax : BITFIELD_RANGE(4, 7); - uint32_t SScount : BITFIELD_RANGE(8, 10); - uint32_t SSCountEn : BITFIELD_RANGE(11, 11); - uint32_t SliceCountRequest : BITFIELD_RANGE(12, 17); - uint32_t EnableSliceCountRequest : BITFIELD_RANGE(18, 18); - uint32_t Reserved : BITFIELD_RANGE(19, 30); - uint32_t EnablePwrClockGating : BITFIELD_RANGE(31, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - inline void init() { - TheStructure.RawData[0] = 0; - TheStructure.Common.EnablePwrClockGating = 1; - TheStructure.Common.EUmin = 8; - TheStructure.Common.EUmax = 8; - } - static tagPWR_CLK_STATE_REGISTER sInit() { - PWR_CLK_STATE_REGISTER state; - state.init(); - return state; - } -} PWR_CLK_STATE_REGISTER; -STATIC_ASSERT(4 == sizeof(PWR_CLK_STATE_REGISTER)); - -typedef struct tagASYNC_SLICE_COUNT_SELECT_REGISTER { - typedef enum tagADDRESS { - REG_ADDRESS = 0xA204 - } ADDRESS; - union tagTheStructure { - struct tagCommon { - uint32_t AsyncSliceCount : BITFIELD_RANGE(0, 3); - uint32_t AsyncEuCount : BITFIELD_RANGE(4, 7); - uint32_t AsyncSubSliceCount : BITFIELD_RANGE(8, 10); - uint32_t Reserved : BITFIELD_RANGE(11, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - inline void init() { - TheStructure.RawData[0] = 0; - TheStructure.Common.AsyncSliceCount = 2; - TheStructure.Common.AsyncSubSliceCount = 4; - TheStructure.Common.AsyncEuCount = 8; - } - static tagASYNC_SLICE_COUNT_SELECT_REGISTER sInit() { - ASYNC_SLICE_COUNT_SELECT_REGISTER state; - state.init(); - return state; - } -} ASYNC_SLICE_COUNT_SELECT_REGISTER; -STATIC_ASSERT(4 == sizeof(ASYNC_SLICE_COUNT_SELECT_REGISTER)); - -typedef struct tagSAMPLER_BORDER_COLOR_STATE { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - float BorderColorRed; - // DWORD 1 - float BorderColorGreen; - // DWORD 2 - float BorderColorBlue; - // DWORD 3 - float BorderColorAlpha; - } Common; - uint32_t RawData[4]; - } TheStructure; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.BorderColorRed = 0.0; - TheStructure.Common.BorderColorGreen = 0.0; - TheStructure.Common.BorderColorBlue = 0.0; - TheStructure.Common.BorderColorAlpha = 0.0; - } - static tagSAMPLER_BORDER_COLOR_STATE sInit() { - SAMPLER_BORDER_COLOR_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setBorderColorRed(const float value) { - TheStructure.Common.BorderColorRed = value; - } - inline float getBorderColorRed() const { - return TheStructure.Common.BorderColorRed; - } - inline void setBorderColorGreen(const float value) { - TheStructure.Common.BorderColorGreen = value; - } - inline float getBorderColorGreen() const { - return TheStructure.Common.BorderColorGreen; - } - inline void setBorderColorBlue(const float value) { - TheStructure.Common.BorderColorBlue = value; - } - inline float getBorderColorBlue() const { - return TheStructure.Common.BorderColorBlue; - } - inline void setBorderColorAlpha(const float value) { - TheStructure.Common.BorderColorAlpha = value; - } - inline float getBorderColorAlpha() const { - return TheStructure.Common.BorderColorAlpha; - } -} SAMPLER_BORDER_COLOR_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_BORDER_COLOR_STATE)); - -#pragma pack() diff --git a/shared/source/generated/gen8/hw_cmds_generated_gen8.inl b/shared/source/generated/gen8/hw_cmds_generated_gen8.inl deleted file mode 100644 index 649a64f817..0000000000 --- a/shared/source/generated/gen8/hw_cmds_generated_gen8.inl +++ /dev/null @@ -1,4940 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma pack(1) -typedef struct tagBINDING_TABLE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t SurfaceStatePointer : BITFIELD_RANGE(6, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPATCH_CONSTANTS { - SURFACESTATEPOINTER_BYTEOFFSET = 0x0, - SURFACESTATEPOINTER_INDEX = 0x0, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - } - static tagBINDING_TABLE_STATE sInit() { - BINDING_TABLE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline const uint32_t &getRawData(const uint32_t index) const { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - typedef enum tagSURFACESTATEPOINTER { - SURFACESTATEPOINTER_BIT_SHIFT = 0x6, - SURFACESTATEPOINTER_ALIGN_SIZE = 0x40, - } SURFACESTATEPOINTER; - inline void setSurfaceStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SurfaceStatePointer = (uint32_t)value >> SURFACESTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSurfaceStatePointer() const { - return (TheStructure.Common.SurfaceStatePointer << SURFACESTATEPOINTER_BIT_SHIFT); - } -} BINDING_TABLE_STATE; -STATIC_ASSERT(4 == sizeof(BINDING_TABLE_STATE)); - -typedef struct tagINTERFACE_DESCRIPTOR_DATA { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t KernelStartPointer : BITFIELD_RANGE(6, 31); - uint32_t KernelStartPointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_48 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 6); - uint32_t SoftwareExceptionEnable : BITFIELD_RANGE(7, 7); - uint32_t Reserved_72 : BITFIELD_RANGE(8, 10); - uint32_t MaskStackExceptionEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_76 : BITFIELD_RANGE(12, 12); - uint32_t IllegalOpcodeExceptionEnable : BITFIELD_RANGE(13, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t FloatingPointMode : BITFIELD_RANGE(16, 16); - uint32_t ThreadPriority : BITFIELD_RANGE(17, 17); - uint32_t SingleProgramFlow : BITFIELD_RANGE(18, 18); - uint32_t DenormMode : BITFIELD_RANGE(19, 19); - uint32_t Reserved_84 : BITFIELD_RANGE(20, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 1); - uint32_t SamplerCount : BITFIELD_RANGE(2, 4); - uint32_t SamplerStatePointer : BITFIELD_RANGE(5, 31); - uint32_t BindingTableEntryCount : BITFIELD_RANGE(0, 4); - uint32_t BindingTablePointer : BITFIELD_RANGE(5, 15); - uint32_t Reserved_144 : BITFIELD_RANGE(16, 31); - uint32_t ConstantUrbEntryReadOffset : BITFIELD_RANGE(0, 15); - uint32_t ConstantIndirectUrbEntryReadLength : BITFIELD_RANGE(16, 31); - uint32_t NumberOfThreadsInGpgpuThreadGroup : BITFIELD_RANGE(0, 9); - uint32_t Reserved_202 : BITFIELD_RANGE(10, 15); - uint32_t SharedLocalMemorySize : BITFIELD_RANGE(16, 20); - uint32_t BarrierEnable : BITFIELD_RANGE(21, 21); - uint32_t RoundingMode : BITFIELD_RANGE(22, 23); - uint32_t Reserved_216 : BITFIELD_RANGE(24, 31); - uint32_t Cross_ThreadConstantDataReadLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_232 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagFLOATING_POINT_MODE { - FLOATING_POINT_MODE_IEEE_754 = 0x0, - FLOATING_POINT_MODE_ALTERNATE = 0x1, - } FLOATING_POINT_MODE; - typedef enum tagTHREAD_PRIORITY { - THREAD_PRIORITY_NORMAL_PRIORITY = 0x0, - THREAD_PRIORITY_HIGH_PRIORITY = 0x1, - } THREAD_PRIORITY; - typedef enum tagSINGLE_PROGRAM_FLOW { - SINGLE_PROGRAM_FLOW_MULTIPLE = 0x0, - SINGLE_PROGRAM_FLOW_SINGLE = 0x1, - } SINGLE_PROGRAM_FLOW; - typedef enum tagDENORM_MODE { - DENORM_MODE_FTZ = 0x0, - DENORM_MODE_SETBYKERNEL = 0x1, - } DENORM_MODE; - typedef enum tagSAMPLER_COUNT { - SAMPLER_COUNT_NO_SAMPLERS_USED = 0x0, - SAMPLER_COUNT_BETWEEN_1_AND_4_SAMPLERS_USED = 0x1, - SAMPLER_COUNT_BETWEEN_5_AND_8_SAMPLERS_USED = 0x2, - SAMPLER_COUNT_BETWEEN_9_AND_12_SAMPLERS_USED = 0x3, - SAMPLER_COUNT_BETWEEN_13_AND_16_SAMPLERS_USED = 0x4, - } SAMPLER_COUNT; - typedef enum tagSHARED_LOCAL_MEMORY_SIZE { - SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K = 0x0, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_4K = 0x1, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_8K = 0x2, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_16K = 0x4, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_32K = 0x8, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_64K = 0x10, - } SHARED_LOCAL_MEMORY_SIZE; - typedef enum tagROUNDING_MODE { - ROUNDING_MODE_RTNE = 0x0, - ROUNDING_MODE_RU = 0x1, - ROUNDING_MODE_RD = 0x2, - ROUNDING_MODE_RTZ = 0x3, - } ROUNDING_MODE; - typedef enum tagPATCH_CONSTANTS { - KERNELSTARTPOINTER_BYTEOFFSET = 0x0, - KERNELSTARTPOINTER_INDEX = 0x0, - KERNELSTARTPOINTERHIGH_BYTEOFFSET = 0x4, - KERNELSTARTPOINTERHIGH_INDEX = 0x1, - SAMPLERSTATEPOINTER_BYTEOFFSET = 0xc, - SAMPLERSTATEPOINTER_INDEX = 0x3, - BINDINGTABLEPOINTER_BYTEOFFSET = 0x10, - BINDINGTABLEPOINTER_INDEX = 0x4, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.FloatingPointMode = FLOATING_POINT_MODE_IEEE_754; - TheStructure.Common.ThreadPriority = THREAD_PRIORITY_NORMAL_PRIORITY; - TheStructure.Common.SingleProgramFlow = SINGLE_PROGRAM_FLOW_MULTIPLE; - TheStructure.Common.DenormMode = DENORM_MODE_FTZ; - TheStructure.Common.SamplerCount = SAMPLER_COUNT_NO_SAMPLERS_USED; - TheStructure.Common.SharedLocalMemorySize = SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K; - TheStructure.Common.RoundingMode = ROUNDING_MODE_RTNE; - } - static tagINTERFACE_DESCRIPTOR_DATA sInit() { - INTERFACE_DESCRIPTOR_DATA state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - typedef enum tagKERNELSTARTPOINTER { - KERNELSTARTPOINTER_BIT_SHIFT = 0x6, - KERNELSTARTPOINTER_ALIGN_SIZE = 0x40, - } KERNELSTARTPOINTER; - inline void setKernelStartPointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.KernelStartPointer = (uint32_t)value >> KERNELSTARTPOINTER_BIT_SHIFT; - } - inline uint32_t getKernelStartPointer() const { - return (TheStructure.Common.KernelStartPointer << KERNELSTARTPOINTER_BIT_SHIFT); - } - inline void setKernelStartPointerHigh(const uint32_t value) { - TheStructure.Common.KernelStartPointerHigh = value; - } - inline uint32_t getKernelStartPointerHigh() const { - return (TheStructure.Common.KernelStartPointerHigh); - } - inline void setSoftwareExceptionEnable(const bool value) { - TheStructure.Common.SoftwareExceptionEnable = value; - } - inline bool getSoftwareExceptionEnable() const { - return (TheStructure.Common.SoftwareExceptionEnable); - } - inline void setMaskStackExceptionEnable(const bool value) { - TheStructure.Common.MaskStackExceptionEnable = value; - } - inline bool getMaskStackExceptionEnable() const { - return (TheStructure.Common.MaskStackExceptionEnable); - } - inline void setIllegalOpcodeExceptionEnable(const bool value) { - TheStructure.Common.IllegalOpcodeExceptionEnable = value; - } - inline bool getIllegalOpcodeExceptionEnable() const { - return (TheStructure.Common.IllegalOpcodeExceptionEnable); - } - inline void setFloatingPointMode(const FLOATING_POINT_MODE value) { - TheStructure.Common.FloatingPointMode = value; - } - inline FLOATING_POINT_MODE getFloatingPointMode() const { - return static_cast(TheStructure.Common.FloatingPointMode); - } - inline void setThreadPriority(const THREAD_PRIORITY value) { - TheStructure.Common.ThreadPriority = value; - } - inline THREAD_PRIORITY getThreadPriority() const { - return static_cast(TheStructure.Common.ThreadPriority); - } - inline void setSingleProgramFlow(const SINGLE_PROGRAM_FLOW value) { - TheStructure.Common.SingleProgramFlow = value; - } - inline SINGLE_PROGRAM_FLOW getSingleProgramFlow() const { - return static_cast(TheStructure.Common.SingleProgramFlow); - } - inline void setDenormMode(const DENORM_MODE value) { - TheStructure.Common.DenormMode = value; - } - inline DENORM_MODE getDenormMode() const { - return static_cast(TheStructure.Common.DenormMode); - } - inline void setSamplerCount(const SAMPLER_COUNT value) { - TheStructure.Common.SamplerCount = value; - } - inline SAMPLER_COUNT getSamplerCount() const { - return static_cast(TheStructure.Common.SamplerCount); - } - typedef enum tagSAMPLERSTATEPOINTER { - SAMPLERSTATEPOINTER_BIT_SHIFT = 0x5, - SAMPLERSTATEPOINTER_ALIGN_SIZE = 0x20, - } SAMPLERSTATEPOINTER; - inline void setSamplerStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SamplerStatePointer = (uint32_t)value >> SAMPLERSTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSamplerStatePointer() const { - return (TheStructure.Common.SamplerStatePointer << SAMPLERSTATEPOINTER_BIT_SHIFT); - } - inline void setBindingTableEntryCount(const uint32_t value) { - TheStructure.Common.BindingTableEntryCount = value; - } - inline uint32_t getBindingTableEntryCount() const { - return (TheStructure.Common.BindingTableEntryCount); - } - typedef enum tagBINDINGTABLEPOINTER { - BINDINGTABLEPOINTER_BIT_SHIFT = 0x5, - BINDINGTABLEPOINTER_ALIGN_SIZE = 0x20, - } BINDINGTABLEPOINTER; - inline void setBindingTablePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.BindingTablePointer = (uint32_t)value >> BINDINGTABLEPOINTER_BIT_SHIFT; - } - inline uint32_t getBindingTablePointer() const { - return (TheStructure.Common.BindingTablePointer << BINDINGTABLEPOINTER_BIT_SHIFT); - } - inline void setConstantUrbEntryReadOffset(const uint32_t value) { - TheStructure.Common.ConstantUrbEntryReadOffset = value; - } - inline uint32_t getConstantUrbEntryReadOffset() const { - return (TheStructure.Common.ConstantUrbEntryReadOffset); - } - inline void setConstantIndirectUrbEntryReadLength(const uint32_t value) { - TheStructure.Common.ConstantIndirectUrbEntryReadLength = value; - } - inline uint32_t getConstantIndirectUrbEntryReadLength() const { - return (TheStructure.Common.ConstantIndirectUrbEntryReadLength); - } - inline void setNumberOfThreadsInGpgpuThreadGroup(const uint32_t value) { - TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup = value; - } - inline uint32_t getNumberOfThreadsInGpgpuThreadGroup() const { - return (TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup); - } - inline void setSharedLocalMemorySize(const uint32_t value) { // patched - TheStructure.Common.SharedLocalMemorySize = value; - } - inline uint32_t getSharedLocalMemorySize() const { // patched - return static_cast(TheStructure.Common.SharedLocalMemorySize); - } - inline void setBarrierEnable(const uint32_t value) { - TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u; - } - inline bool getBarrierEnable() const { - return (TheStructure.Common.BarrierEnable); - } - inline void setRoundingMode(const ROUNDING_MODE value) { - TheStructure.Common.RoundingMode = value; - } - inline ROUNDING_MODE getRoundingMode() const { - return static_cast(TheStructure.Common.RoundingMode); - } - inline void setCrossThreadConstantDataReadLength(const uint32_t value) { - TheStructure.Common.Cross_ThreadConstantDataReadLength = value; - } - inline uint32_t getCrossThreadConstantDataReadLength() const { - return (TheStructure.Common.Cross_ThreadConstantDataReadLength); - } -} INTERFACE_DESCRIPTOR_DATA; -STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA)); - -typedef struct tagGPGPU_WALKER { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t PredicateEnable : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t IndirectParameterEnable : BITFIELD_RANGE(10, 10); - uint32_t Reserved_11 : BITFIELD_RANGE(11, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t Reserved_38 : BITFIELD_RANGE(6, 31); - uint32_t IndirectDataLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 5); - uint32_t IndirectDataStartAddress : BITFIELD_RANGE(6, 31); - uint32_t ThreadWidthCounterMaximum : BITFIELD_RANGE(0, 5); - uint32_t Reserved_134 : BITFIELD_RANGE(6, 7); - uint32_t ThreadHeightCounterMaximum : BITFIELD_RANGE(8, 13); - uint32_t Reserved_142 : BITFIELD_RANGE(14, 15); - uint32_t ThreadDepthCounterMaximum : BITFIELD_RANGE(16, 21); - uint32_t Reserved_150 : BITFIELD_RANGE(22, 29); - uint32_t SimdSize : BITFIELD_RANGE(30, 31); - uint32_t ThreadGroupIdStartingX; - uint32_t Reserved_192; - uint32_t ThreadGroupIdXDimension; - uint32_t ThreadGroupIdStartingY; - uint32_t Reserved_288; - uint32_t ThreadGroupIdYDimension; - uint32_t ThreadGroupIdStartingResumeZ; - uint32_t ThreadGroupIdZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; - } Common; - uint32_t RawData[15]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0xd, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_GPGPU_WALKER_SUBOP = 0x5, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_GPGPU_WALKER = 0x1, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagSIMD_SIZE { - SIMD_SIZE_SIMD8 = 0x0, - SIMD_SIZE_SIMD16 = 0x1, - SIMD_SIZE_SIMD32 = 0x2, - } SIMD_SIZE; - typedef enum tagPATCH_CONSTANTS { - INDIRECTDATASTARTADDRESS_BYTEOFFSET = 0xc, - INDIRECTDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_GPGPU_WALKER_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_GPGPU_WALKER; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.SimdSize = SIMD_SIZE_SIMD8; - } - static tagGPGPU_WALKER sInit() { - GPGPU_WALKER state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 15); - return TheStructure.RawData[index]; - } - inline void setPredicateEnable(const bool value) { - TheStructure.Common.PredicateEnable = value; - } - inline bool getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setIndirectParameterEnable(const bool value) { - TheStructure.Common.IndirectParameterEnable = value; - } - inline bool getIndirectParameterEnable() const { - return (TheStructure.Common.IndirectParameterEnable); - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setIndirectDataLength(const uint32_t value) { - TheStructure.Common.IndirectDataLength = value; - } - inline uint32_t getIndirectDataLength() const { - return (TheStructure.Common.IndirectDataLength); - } - typedef enum tagINDIRECTDATASTARTADDRESS { - INDIRECTDATASTARTADDRESS_BIT_SHIFT = 0x6, - INDIRECTDATASTARTADDRESS_ALIGN_SIZE = 0x40, - } INDIRECTDATASTARTADDRESS; - inline void setIndirectDataStartAddress(const uint32_t value) { - TheStructure.Common.IndirectDataStartAddress = value >> INDIRECTDATASTARTADDRESS_BIT_SHIFT; - } - inline uint32_t getIndirectDataStartAddress() const { - return (TheStructure.Common.IndirectDataStartAddress << INDIRECTDATASTARTADDRESS_BIT_SHIFT); - } - inline void setThreadWidthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadWidthCounterMaximum = value - 1; - } - inline uint32_t getThreadWidthCounterMaximum() const { - return (TheStructure.Common.ThreadWidthCounterMaximum + 1); - } - inline void setThreadHeightCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadHeightCounterMaximum = value - 1; - } - inline uint32_t getThreadHeightCounterMaximum() const { - return (TheStructure.Common.ThreadHeightCounterMaximum + 1); - } - inline void setThreadDepthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadDepthCounterMaximum = value; - } - inline uint32_t getThreadDepthCounterMaximum() const { - return (TheStructure.Common.ThreadDepthCounterMaximum); - } - inline void setSimdSize(const SIMD_SIZE value) { - TheStructure.Common.SimdSize = value; - } - inline SIMD_SIZE getSimdSize() const { - return static_cast(TheStructure.Common.SimdSize); - } - inline void setThreadGroupIdStartingX(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingX = value; - } - inline uint32_t getThreadGroupIdStartingX() const { - return (TheStructure.Common.ThreadGroupIdStartingX); - } - inline void setThreadGroupIdXDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdXDimension = value; - } - inline uint32_t getThreadGroupIdXDimension() const { - return (TheStructure.Common.ThreadGroupIdXDimension); - } - inline void setThreadGroupIdStartingY(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingY = value; - } - inline uint32_t getThreadGroupIdStartingY() const { - return (TheStructure.Common.ThreadGroupIdStartingY); - } - inline void setThreadGroupIdYDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdYDimension = value; - } - inline uint32_t getThreadGroupIdYDimension() const { - return (TheStructure.Common.ThreadGroupIdYDimension); - } - inline void setThreadGroupIdStartingResumeZ(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingResumeZ = value; - } - inline uint32_t getThreadGroupIdStartingResumeZ() const { - return (TheStructure.Common.ThreadGroupIdStartingResumeZ); - } - inline void setThreadGroupIdZDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdZDimension = value; - } - inline uint32_t getThreadGroupIdZDimension() const { - return (TheStructure.Common.ThreadGroupIdZDimension); - } - inline void setRightExecutionMask(const uint32_t value) { - TheStructure.Common.RightExecutionMask = value; - } - inline uint32_t getRightExecutionMask() const { - return (TheStructure.Common.RightExecutionMask); - } - inline void setBottomExecutionMask(const uint32_t value) { - TheStructure.Common.BottomExecutionMask = value; - } - inline uint32_t getBottomExecutionMask() const { - return (TheStructure.Common.BottomExecutionMask); - } - static constexpr uint32_t getInlineDataSize() { // patched - return 0u; - } - using InterfaceDescriptorType = INTERFACE_DESCRIPTOR_DATA; // patched -} GPGPU_WALKER; -STATIC_ASSERT(60 == sizeof(GPGPU_WALKER)); - -typedef struct tagMEDIA_INTERFACE_DESCRIPTOR_LOAD { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32; - uint32_t InterfaceDescriptorTotalLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t InterfaceDescriptorDataStartAddress; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x2, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP = 0x2, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - INTERFACEDESCRIPTORDATASTARTADDRESS_BYTEOFFSET = 0xc, - INTERFACEDESCRIPTORDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_INTERFACE_DESCRIPTOR_LOAD sInit() { - MEDIA_INTERFACE_DESCRIPTOR_LOAD state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorTotalLength(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorTotalLength = value; - } - inline uint32_t getInterfaceDescriptorTotalLength() const { - return (TheStructure.Common.InterfaceDescriptorTotalLength); - } - inline void setInterfaceDescriptorDataStartAddress(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorDataStartAddress = value; - } - inline uint32_t getInterfaceDescriptorDataStartAddress() const { - return (TheStructure.Common.InterfaceDescriptorDataStartAddress); - } -} MEDIA_INTERFACE_DESCRIPTOR_LOAD; -STATIC_ASSERT(16 == sizeof(MEDIA_INTERFACE_DESCRIPTOR_LOAD)); - -typedef struct tagMEDIA_STATE_FLUSH { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t WatermarkRequired : BITFIELD_RANGE(6, 6); - uint32_t FlushToGo : BITFIELD_RANGE(7, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[2]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x0, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP = 0x4, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_STATE_FLUSH sInit() { - MEDIA_STATE_FLUSH state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 2); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setWatermarkRequired(const uint32_t value) { - TheStructure.Common.WatermarkRequired = value; - } - inline uint32_t getWatermarkRequired() const { - return (TheStructure.Common.WatermarkRequired); - } - inline void setFlushToGo(const bool value) { - TheStructure.Common.FlushToGo = value; - } - inline bool getFlushToGo() const { - return (TheStructure.Common.FlushToGo); - } -} MEDIA_STATE_FLUSH; -STATIC_ASSERT(8 == sizeof(MEDIA_STATE_FLUSH)); - -typedef struct tagMEDIA_VFE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t PerThreadScratchSpace : BITFIELD_RANGE(0, 3); - uint32_t StackSize : BITFIELD_RANGE(4, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 9); - uint32_t ScratchSpaceBasePointer : BITFIELD_RANGE(10, 31); - uint32_t ScratchSpaceBasePointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 5); - uint32_t BypassGatewayControl : BITFIELD_RANGE(6, 6); - uint32_t ResetGatewayTimer : BITFIELD_RANGE(7, 7); - uint32_t NumberOfUrbEntries : BITFIELD_RANGE(8, 15); - uint32_t MaximumNumberOfThreads : BITFIELD_RANGE(16, 31); - uint32_t SliceDisable : BITFIELD_RANGE(0, 1); - uint32_t Reserved_130 : BITFIELD_RANGE(2, 31); - uint32_t CurbeAllocationSize : BITFIELD_RANGE(0, 15); - uint32_t UrbEntryAllocationSize : BITFIELD_RANGE(16, 31); - uint32_t ScoreboardMask : BITFIELD_RANGE(0, 7); - uint32_t Reserved_200 : BITFIELD_RANGE(8, 29); - uint32_t ScoreboardType : BITFIELD_RANGE(30, 30); - uint32_t ScoreboardEnable : BITFIELD_RANGE(31, 31); - uint32_t Scoreboard0DeltaX : BITFIELD_RANGE(0, 3); - uint32_t Scoreboard0DeltaY : BITFIELD_RANGE(4, 7); - uint32_t Scoreboard1DeltaX : BITFIELD_RANGE(8, 11); - uint32_t Scoreboard1DeltaY : BITFIELD_RANGE(12, 15); - uint32_t Scoreboard2DeltaX : BITFIELD_RANGE(16, 19); - uint32_t Scoreboard2DeltaY : BITFIELD_RANGE(20, 23); - uint32_t Scoreboard3DeltaX : BITFIELD_RANGE(24, 27); - uint32_t Scoreboard3DeltaY : BITFIELD_RANGE(28, 31); - uint32_t Scoreboard4DeltaX : BITFIELD_RANGE(0, 3); - uint32_t Scoreboard4DeltaY : BITFIELD_RANGE(4, 7); - uint32_t Scoreboard5DeltaX : BITFIELD_RANGE(8, 11); - uint32_t Scoreboard5DeltaY : BITFIELD_RANGE(12, 15); - uint32_t Scoreboard6DeltaX : BITFIELD_RANGE(16, 19); - uint32_t Scoreboard6DeltaY : BITFIELD_RANGE(20, 23); - uint32_t Scoreboard7DeltaX : BITFIELD_RANGE(24, 27); - uint32_t Scoreboard7DeltaY : BITFIELD_RANGE(28, 31); - } Common; - uint32_t RawData[9]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x7, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_VFE_STATE_SUBOP = 0x0, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagBYPASS_GATEWAY_CONTROL { - BYPASS_GATEWAY_CONTROL_MAINTAINING_OPENGATEWAY_FORWARDMSG_CLOSEGATEWAY_PROTOCOL_LEGACY_MODE = 0x0, - BYPASS_GATEWAY_CONTROL_BYPASSING_OPENGATEWAY_CLOSEGATEWAY_PROTOCOL = 0x1, - } BYPASS_GATEWAY_CONTROL; - typedef enum tagRESET_GATEWAY_TIMER { - RESET_GATEWAY_TIMER_MAINTAINING_THE_EXISTING_TIMESTAMP_STATE = 0x0, - RESET_GATEWAY_TIMER_RESETTING_RELATIVE_TIMER_AND_LATCHING_THE_GLOBAL_TIMESTAMP = 0x1, - } RESET_GATEWAY_TIMER; - typedef enum tagSLICE_DISABLE { - SLICE_DISABLE_ALL_SUBSLICES_ENABLED = 0x0, - SLICE_DISABLE_ONLY_SLICE_0_ENABLED = 0x1, - SLICE_DISABLE_ONLY_SLICE_0_SUBSLICE_0_ENABLED = 0x3, - } SLICE_DISABLE; - typedef enum tagSCOREBOARD_TYPE { - SCOREBOARD_TYPE_STALLING_SCOREBOARD = 0x0, - SCOREBOARD_TYPE_NON_STALLING_SCOREBOARD = 0x1, - } SCOREBOARD_TYPE; - typedef enum tagPATCH_CONSTANTS { - SCRATCHSPACEBASEPOINTER_BYTEOFFSET = 0x4, - SCRATCHSPACEBASEPOINTER_INDEX = 0x1, - SCRATCHSPACEBASEPOINTERHIGH_BYTEOFFSET = 0x8, - SCRATCHSPACEBASEPOINTERHIGH_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_VFE_STATE_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.BypassGatewayControl = BYPASS_GATEWAY_CONTROL_MAINTAINING_OPENGATEWAY_FORWARDMSG_CLOSEGATEWAY_PROTOCOL_LEGACY_MODE; - TheStructure.Common.ResetGatewayTimer = RESET_GATEWAY_TIMER_MAINTAINING_THE_EXISTING_TIMESTAMP_STATE; - TheStructure.Common.SliceDisable = SLICE_DISABLE_ALL_SUBSLICES_ENABLED; - TheStructure.Common.ScoreboardType = SCOREBOARD_TYPE_STALLING_SCOREBOARD; - } - static tagMEDIA_VFE_STATE sInit() { - MEDIA_VFE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 9); - return TheStructure.RawData[index]; - } - inline void setPerThreadScratchSpace(const uint32_t value) { - TheStructure.Common.PerThreadScratchSpace = value; - } - inline uint32_t getPerThreadScratchSpace() const { - return (TheStructure.Common.PerThreadScratchSpace); - } - inline void setStackSize(const uint32_t value) { - TheStructure.Common.StackSize = value; - } - inline uint32_t getStackSize() const { - return (TheStructure.Common.StackSize); - } - typedef enum tagSCRATCHSPACEBASEPOINTER { - SCRATCHSPACEBASEPOINTER_BIT_SHIFT = 0xa, - SCRATCHSPACEBASEPOINTER_ALIGN_SIZE = 0x400, - } SCRATCHSPACEBASEPOINTER; - inline void setScratchSpaceBasePointer(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointer = value >> SCRATCHSPACEBASEPOINTER_BIT_SHIFT; - } - inline uint32_t getScratchSpaceBasePointer() const { - return (TheStructure.Common.ScratchSpaceBasePointer << SCRATCHSPACEBASEPOINTER_BIT_SHIFT); - } - inline void setScratchSpaceBasePointerHigh(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointerHigh = value; - } - inline uint32_t getScratchSpaceBasePointerHigh() const { - return (TheStructure.Common.ScratchSpaceBasePointerHigh); - } - inline void setBypassGatewayControl(const BYPASS_GATEWAY_CONTROL value) { - TheStructure.Common.BypassGatewayControl = value; - } - inline BYPASS_GATEWAY_CONTROL getBypassGatewayControl() const { - return static_cast(TheStructure.Common.BypassGatewayControl); - } - inline void setResetGatewayTimer(const RESET_GATEWAY_TIMER value) { - TheStructure.Common.ResetGatewayTimer = value; - } - inline RESET_GATEWAY_TIMER getResetGatewayTimer() const { - return static_cast(TheStructure.Common.ResetGatewayTimer); - } - inline void setNumberOfUrbEntries(const uint32_t value) { - TheStructure.Common.NumberOfUrbEntries = value; - } - inline uint32_t getNumberOfUrbEntries() const { - return (TheStructure.Common.NumberOfUrbEntries); - } - inline void setMaximumNumberOfThreads(const uint32_t value) { - TheStructure.Common.MaximumNumberOfThreads = value - 1; - } - inline uint32_t getMaximumNumberOfThreads() const { - return (TheStructure.Common.MaximumNumberOfThreads + 1); - } - inline void setSliceDisable(const SLICE_DISABLE value) { - TheStructure.Common.SliceDisable = value; - } - inline SLICE_DISABLE getSliceDisable() const { - return static_cast(TheStructure.Common.SliceDisable); - } - inline void setCurbeAllocationSize(const uint32_t value) { - TheStructure.Common.CurbeAllocationSize = value; - } - inline uint32_t getCurbeAllocationSize() const { - return (TheStructure.Common.CurbeAllocationSize); - } - inline void setUrbEntryAllocationSize(const uint32_t value) { - TheStructure.Common.UrbEntryAllocationSize = value; - } - inline uint32_t getUrbEntryAllocationSize() const { - return (TheStructure.Common.UrbEntryAllocationSize); - } - inline void setScoreboardMask(const uint32_t value) { - TheStructure.Common.ScoreboardMask = value; - } - inline uint32_t getScoreboardMask() const { - return (TheStructure.Common.ScoreboardMask); - } - inline void setScoreboardType(const SCOREBOARD_TYPE value) { - TheStructure.Common.ScoreboardType = value; - } - inline SCOREBOARD_TYPE getScoreboardType() const { - return static_cast(TheStructure.Common.ScoreboardType); - } - inline void setScoreboardEnable(const bool value) { - TheStructure.Common.ScoreboardEnable = value; - } - inline bool getScoreboardEnable() const { - return (TheStructure.Common.ScoreboardEnable); - } - inline void setScoreboard0DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard0DeltaX = value; - } - inline uint32_t getScoreboard0DeltaX() const { - return (TheStructure.Common.Scoreboard0DeltaX); - } - inline void setScoreboard0DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard0DeltaY = value; - } - inline uint32_t getScoreboard0DeltaY() const { - return (TheStructure.Common.Scoreboard0DeltaY); - } - inline void setScoreboard1DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard1DeltaX = value; - } - inline uint32_t getScoreboard1DeltaX() const { - return (TheStructure.Common.Scoreboard1DeltaX); - } - inline void setScoreboard1DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard1DeltaY = value; - } - inline uint32_t getScoreboard1DeltaY() const { - return (TheStructure.Common.Scoreboard1DeltaY); - } - inline void setScoreboard2DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard2DeltaX = value; - } - inline uint32_t getScoreboard2DeltaX() const { - return (TheStructure.Common.Scoreboard2DeltaX); - } - inline void setScoreboard2DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard2DeltaY = value; - } - inline uint32_t getScoreboard2DeltaY() const { - return (TheStructure.Common.Scoreboard2DeltaY); - } - inline void setScoreboard3DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard3DeltaX = value; - } - inline uint32_t getScoreboard3DeltaX() const { - return (TheStructure.Common.Scoreboard3DeltaX); - } - inline void setScoreboard3DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard3DeltaY = value; - } - inline uint32_t getScoreboard3DeltaY() const { - return (TheStructure.Common.Scoreboard3DeltaY); - } - inline void setScoreboard4DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard4DeltaX = value; - } - inline uint32_t getScoreboard4DeltaX() const { - return (TheStructure.Common.Scoreboard4DeltaX); - } - inline void setScoreboard4DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard4DeltaY = value; - } - inline uint32_t getScoreboard4DeltaY() const { - return (TheStructure.Common.Scoreboard4DeltaY); - } - inline void setScoreboard5DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard5DeltaX = value; - } - inline uint32_t getScoreboard5DeltaX() const { - return (TheStructure.Common.Scoreboard5DeltaX); - } - inline void setScoreboard5DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard5DeltaY = value; - } - inline uint32_t getScoreboard5DeltaY() const { - return (TheStructure.Common.Scoreboard5DeltaY); - } - inline void setScoreboard6DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard6DeltaX = value; - } - inline uint32_t getScoreboard6DeltaX() const { - return (TheStructure.Common.Scoreboard6DeltaX); - } - inline void setScoreboard6DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard6DeltaY = value; - } - inline uint32_t getScoreboard6DeltaY() const { - return (TheStructure.Common.Scoreboard6DeltaY); - } - inline void setScoreboard7DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard7DeltaX = value; - } - inline uint32_t getScoreboard7DeltaX() const { - return (TheStructure.Common.Scoreboard7DeltaX); - } - inline void setScoreboard7DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard7DeltaY = value; - } - inline uint32_t getScoreboard7DeltaY() const { - return (TheStructure.Common.Scoreboard7DeltaY); - } -} MEDIA_VFE_STATE; -STATIC_ASSERT(36 == sizeof(MEDIA_VFE_STATE)); - -typedef struct tagMI_ARB_CHECK { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MiInstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t MiInstructionType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_INSTRUCTION_OPCODE { - MI_INSTRUCTION_OPCODE_MI_ARB_CHECK = 0x5, - } MI_INSTRUCTION_OPCODE; - typedef enum tagMI_INSTRUCTION_TYPE { - MI_INSTRUCTION_TYPE_MI_INSTRUCTION = 0x0, - } MI_INSTRUCTION_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiInstructionOpcode = MI_INSTRUCTION_OPCODE_MI_ARB_CHECK; - TheStructure.Common.MiInstructionType = MI_INSTRUCTION_TYPE_MI_INSTRUCTION; - } - static tagMI_ARB_CHECK sInit() { - MI_ARB_CHECK state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setMiInstructionOpcode(const MI_INSTRUCTION_OPCODE value) { - TheStructure.Common.MiInstructionOpcode = value; - } - inline MI_INSTRUCTION_OPCODE getMiInstructionOpcode() const { - return static_cast(TheStructure.Common.MiInstructionOpcode); - } - inline void setMiInstructionType(const MI_INSTRUCTION_TYPE value) { - TheStructure.Common.MiInstructionType = value; - } - inline MI_INSTRUCTION_TYPE getMiInstructionType() const { - return static_cast(TheStructure.Common.MiInstructionType); - } -} MI_ARB_CHECK; -STATIC_ASSERT(4 == sizeof(MI_ARB_CHECK)); - -typedef struct tagMI_ATOMIC { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AtomicOpcode : BITFIELD_RANGE(8, 15); - uint32_t ReturnDataControl : BITFIELD_RANGE(16, 16); - uint32_t CsStall : BITFIELD_RANGE(17, 17); - uint32_t InlineData : BITFIELD_RANGE(18, 18); - uint32_t DataSize : BITFIELD_RANGE(19, 20); - uint32_t Post_SyncOperation : BITFIELD_RANGE(21, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t MemoryAddress : BITFIELD_RANGE(2, 31); - uint32_t MemoryAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Operand1DataDword0; - uint32_t Operand2DataDword0; - uint32_t Operand1DataDword1; - uint32_t Operand2DataDword1; - uint32_t Operand1DataDword2; - uint32_t Operand2DataDword2; - uint32_t Operand1DataDword3; - uint32_t Operand2DataDword3; - } Common; - uint32_t RawData[11]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_INLINE_DATA_0 = 0x1, - DWORD_LENGTH_INLINE_DATA_1 = 0x9, - } DWORD_LENGTH; - typedef enum tagDATA_SIZE { - DATA_SIZE_DWORD = 0x0, - DATA_SIZE_QWORD = 0x1, - DATA_SIZE_OCTWORD = 0x2, - } DATA_SIZE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION = 0x0, - POST_SYNC_OPERATION_POST_SYNC_OPERATION = 0x1, - } POST_SYNC_OPERATION; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_ATOMIC = 0x2f, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - typedef enum tagATOMIC_OPCODES { - ATOMIC_4B_MOVE = 0x4, - ATOMIC_4B_INCREMENT = 0x5, - ATOMIC_4B_DECREMENT = 0x6, - ATOMIC_8B_MOVE = 0x24, - ATOMIC_8B_INCREMENT = 0x25, - ATOMIC_8B_DECREMENT = 0x26, - ATOMIC_8B_ADD = 0x27, - ATOMIC_8B_CMP_WR = 0x2E, - } ATOMIC_OPCODES; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_INLINE_DATA_0; - TheStructure.Common.DataSize = DATA_SIZE_DWORD; - TheStructure.Common.Post_SyncOperation = POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_ATOMIC; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_ATOMIC sInit() { - MI_ATOMIC state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 11); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setAtomicOpcode(const uint32_t value) { - TheStructure.Common.AtomicOpcode = value; - } - inline uint32_t getAtomicOpcode() const { - return (TheStructure.Common.AtomicOpcode); - } - inline void setReturnDataControl(const uint32_t value) { - TheStructure.Common.ReturnDataControl = value; - } - inline uint32_t getReturnDataControl() const { - return (TheStructure.Common.ReturnDataControl); - } - inline void setCsStall(const uint32_t value) { - TheStructure.Common.CsStall = value; - } - inline uint32_t getCsStall() const { - return (TheStructure.Common.CsStall); - } - inline void setInlineData(const uint32_t value) { - TheStructure.Common.InlineData = value; - } - inline uint32_t getInlineData() const { - return (TheStructure.Common.InlineData); - } - inline void setDataSize(const DATA_SIZE value) { - TheStructure.Common.DataSize = value; - } - inline DATA_SIZE getDataSize() const { - return static_cast(TheStructure.Common.DataSize); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.Post_SyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.Post_SyncOperation); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint32_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint32_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setMemoryAddressHigh(const uint32_t value) { - TheStructure.Common.MemoryAddressHigh = value; - } - inline uint32_t getMemoryAddressHigh() const { - return (TheStructure.Common.MemoryAddressHigh); - } - inline void setOperand1DataDword0(const uint32_t value) { - TheStructure.Common.Operand1DataDword0 = value; - } - inline uint32_t getOperand1DataDword0() const { - return (TheStructure.Common.Operand1DataDword0); - } - inline void setOperand2DataDword0(const uint32_t value) { - TheStructure.Common.Operand2DataDword0 = value; - } - inline uint32_t getOperand2DataDword0() const { - return (TheStructure.Common.Operand2DataDword0); - } - inline void setOperand1DataDword1(const uint32_t value) { - TheStructure.Common.Operand1DataDword1 = value; - } - inline uint32_t getOperand1DataDword1() const { - return (TheStructure.Common.Operand1DataDword1); - } - inline void setOperand2DataDword1(const uint32_t value) { - TheStructure.Common.Operand2DataDword1 = value; - } - inline uint32_t getOperand2DataDword1() const { - return (TheStructure.Common.Operand2DataDword1); - } - inline void setOperand1DataDword2(const uint32_t value) { - TheStructure.Common.Operand1DataDword2 = value; - } - inline uint32_t getOperand1DataDword2() const { - return (TheStructure.Common.Operand1DataDword2); - } - inline void setOperand2DataDword2(const uint32_t value) { - TheStructure.Common.Operand2DataDword2 = value; - } - inline uint32_t getOperand2DataDword2() const { - return (TheStructure.Common.Operand2DataDword2); - } - inline void setOperand1DataDword3(const uint32_t value) { - TheStructure.Common.Operand1DataDword3 = value; - } - inline uint32_t getOperand1DataDword3() const { - return (TheStructure.Common.Operand1DataDword3); - } - inline void setOperand2DataDword3(const uint32_t value) { - TheStructure.Common.Operand2DataDword3 = value; - } - inline uint32_t getOperand2DataDword3() const { - return (TheStructure.Common.Operand2DataDword3); - } -} MI_ATOMIC; -STATIC_ASSERT(44 == sizeof(MI_ATOMIC)); - -typedef struct tagMI_BATCH_BUFFER_END { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END = 0xa, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_END sInit() { - MI_BATCH_BUFFER_END state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } -} MI_BATCH_BUFFER_END; -STATIC_ASSERT(4 == sizeof(MI_BATCH_BUFFER_END)); - -typedef struct tagMI_BATCH_BUFFER_START { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AddressSpaceIndicator : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 21); - uint32_t _2NdLevelBatchBuffer : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t BatchBufferStartAddress_Graphicsaddress47_2 : BITFIELD_RANGE(2, 47); - uint64_t BatchBufferStartAddress_Reserved : BITFIELD_RANGE(48, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagADDRESS_SPACE_INDICATOR { - ADDRESS_SPACE_INDICATOR_GGTT = 0x0, - ADDRESS_SPACE_INDICATOR_PPGTT = 0x1, - } ADDRESS_SPACE_INDICATOR; - typedef enum tag_2ND_LEVEL_BATCH_BUFFER { - _2ND_LEVEL_BATCH_BUFFER_1ST_LEVEL_BATCH = 0x0, - _2ND_LEVEL_BATCH_BUFFER_2ND_LEVEL_BATCH = 0x1, - } _2ND_LEVEL_BATCH_BUFFER; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START = 0x31, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - BATCHBUFFERSTARTADDRESS_BYTEOFFSET = 0x4, - BATCHBUFFERSTARTADDRESS_INDEX = 0x1, - BATCHBUFFERSTARTADDRESSHIGH_BYTEOFFSET = 0x8, - BATCHBUFFERSTARTADDRESSHIGH_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.AddressSpaceIndicator = ADDRESS_SPACE_INDICATOR_GGTT; - TheStructure.Common._2NdLevelBatchBuffer = _2ND_LEVEL_BATCH_BUFFER_1ST_LEVEL_BATCH; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_START sInit() { - MI_BATCH_BUFFER_START state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setAddressSpaceIndicator(const ADDRESS_SPACE_INDICATOR value) { - TheStructure.Common.AddressSpaceIndicator = value; - } - inline ADDRESS_SPACE_INDICATOR getAddressSpaceIndicator() const { - return static_cast(TheStructure.Common.AddressSpaceIndicator); - } - inline void set2NdLevelBatchBuffer(const _2ND_LEVEL_BATCH_BUFFER value) { - TheStructure.Common._2NdLevelBatchBuffer = value; - } - inline _2ND_LEVEL_BATCH_BUFFER get2NdLevelBatchBuffer() const { - return static_cast<_2ND_LEVEL_BATCH_BUFFER>(TheStructure.Common._2NdLevelBatchBuffer); - } - typedef enum tag_SECOND_LEVEL_BATCH_BUFFER { - SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH = 0x0, - SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH = 0x1, - } SECOND_LEVEL_BATCH_BUFFER; - inline void setSecondLevelBatchBuffer(const SECOND_LEVEL_BATCH_BUFFER value) { - TheStructure.Common._2NdLevelBatchBuffer = (_2ND_LEVEL_BATCH_BUFFER)value; - } - inline SECOND_LEVEL_BATCH_BUFFER getSecondLevelBatchBuffer() const { - return static_cast(TheStructure.Common._2NdLevelBatchBuffer); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2 { - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2; - inline void setBatchBufferStartAddress(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Graphicsaddress47_2 = value >> BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddress() const { - return (TheStructure.Common.BatchBufferStartAddress_Graphicsaddress47_2 << BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_RESERVED { - BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_RESERVED; - inline void setBatchBufferStartAddressReserved(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Reserved = value >> BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddressReserved() const { - return (TheStructure.Common.BatchBufferStartAddress_Reserved << BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT); - } -} MI_BATCH_BUFFER_START; -STATIC_ASSERT(12 == sizeof(MI_BATCH_BUFFER_START)); - -typedef struct tagMI_LOAD_REGISTER_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t ByteWriteDisables : BITFIELD_RANGE(8, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterOffset : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t DataDword; - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM = 0x22, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_IMM sInit() { - MI_LOAD_REGISTER_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setByteWriteDisables(const uint32_t value) { - TheStructure.Common.ByteWriteDisables = value; - } - inline uint32_t getByteWriteDisables() const { - return (TheStructure.Common.ByteWriteDisables); - } - typedef enum tagREGISTEROFFSET { - REGISTEROFFSET_BIT_SHIFT = 0x2, - REGISTEROFFSET_ALIGN_SIZE = 0x4, - } REGISTEROFFSET; - inline void setRegisterOffset(const uint32_t value) { - TheStructure.Common.RegisterOffset = value >> REGISTEROFFSET_BIT_SHIFT; - } - inline uint32_t getRegisterOffset() const { - return (TheStructure.Common.RegisterOffset << REGISTEROFFSET_BIT_SHIFT); - } - inline void setDataDword(const uint32_t value) { - TheStructure.Common.DataDword = value; - } - inline uint32_t getDataDword() const { - return (TheStructure.Common.DataDword); - } -} MI_LOAD_REGISTER_IMM; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_IMM)); - -typedef struct tagMI_LOAD_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 20); - uint32_t AsyncModeEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM = 0x29, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_MEM sInit() { - MI_LOAD_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setAsyncModeEnable(const bool value) { - TheStructure.Common.AsyncModeEnable = value; - } - inline bool getAsyncModeEnable() const { - return (TheStructure.Common.AsyncModeEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_LOAD_REGISTER_MEM)); - -typedef struct tagMI_LOAD_REGISTER_REG { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t SourceRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t DestinationRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_87 : BITFIELD_RANGE(23, 31); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG = 0x2a, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_REG sInit() { - MI_LOAD_REGISTER_REG state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagSOURCEREGISTERADDRESS { - SOURCEREGISTERADDRESS_BIT_SHIFT = 0x2, - SOURCEREGISTERADDRESS_ALIGN_SIZE = 0x4, - } SOURCEREGISTERADDRESS; - inline void setSourceRegisterAddress(const uint32_t value) { - TheStructure.Common.SourceRegisterAddress = value >> SOURCEREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getSourceRegisterAddress() const { - return (TheStructure.Common.SourceRegisterAddress << SOURCEREGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagDESTINATIONREGISTERADDRESS { - DESTINATIONREGISTERADDRESS_BIT_SHIFT = 0x2, - DESTINATIONREGISTERADDRESS_ALIGN_SIZE = 0x4, - } DESTINATIONREGISTERADDRESS; - inline void setDestinationRegisterAddress(const uint32_t value) { - TheStructure.Common.DestinationRegisterAddress = value >> DESTINATIONREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getDestinationRegisterAddress() const { - return (TheStructure.Common.DestinationRegisterAddress << DESTINATIONREGISTERADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_REG; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_REG)); - -typedef struct tagMI_NOOP { - union tagTheStructure { - struct tagCommon { - uint32_t IdentificationNumber : BITFIELD_RANGE(0, 21); - uint32_t IdentificationNumberRegisterWriteEnable : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_NOOP = 0x0, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_NOOP; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_NOOP sInit() { - MI_NOOP state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setIdentificationNumber(const uint32_t value) { - TheStructure.Common.IdentificationNumber = value; - } - inline uint32_t getIdentificationNumber() const { - return (TheStructure.Common.IdentificationNumber); - } - inline void setIdentificationNumberRegisterWriteEnable(const bool value) { - TheStructure.Common.IdentificationNumberRegisterWriteEnable = value; - } - inline bool getIdentificationNumberRegisterWriteEnable() const { - return (TheStructure.Common.IdentificationNumberRegisterWriteEnable); - } -} MI_NOOP; -STATIC_ASSERT(4 == sizeof(MI_NOOP)); - -typedef struct tagMI_STORE_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 20); - uint32_t PredicateEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM = 0x24, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_REGISTER_MEM sInit() { - MI_STORE_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setPredicateEnable(const uint32_t value) { - TheStructure.Common.PredicateEnable = value; - } - inline uint32_t getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_STORE_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_STORE_REGISTER_MEM)); - -typedef struct tagPIPELINE_SELECT { - union tagTheStructure { - struct tagCommon { - uint32_t PipelineSelection : BITFIELD_RANGE(0, 1); - uint32_t Reserved_2 : BITFIELD_RANGE(2, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPIPELINE_SELECTION { - PIPELINE_SELECTION_3D = 0x0, - PIPELINE_SELECTION_MEDIA = 0x1, - PIPELINE_SELECTION_GPGPU = 0x2, - } PIPELINE_SELECTION; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW = 0x1, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.PipelineSelection = PIPELINE_SELECTION_3D; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagPIPELINE_SELECT sInit() { - PIPELINE_SELECT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setMaskBits(const uint32_t value) { - } - inline uint32_t getMaskBits() const { - return 0x3; - } - inline void setPipelineSelection(const PIPELINE_SELECTION value) { - TheStructure.Common.PipelineSelection = value; - } - inline PIPELINE_SELECTION getPipelineSelection() const { - return static_cast(TheStructure.Common.PipelineSelection); - } -} PIPELINE_SELECT; -STATIC_ASSERT(4 == sizeof(PIPELINE_SELECT)); - -typedef struct tagPIPE_CONTROL { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t DepthCacheFlushEnable : BITFIELD_RANGE(0, 0); - uint32_t StallAtPixelScoreboard : BITFIELD_RANGE(1, 1); - uint32_t StateCacheInvalidationEnable : BITFIELD_RANGE(2, 2); - uint32_t ConstantCacheInvalidationEnable : BITFIELD_RANGE(3, 3); - uint32_t VfCacheInvalidationEnable : BITFIELD_RANGE(4, 4); - uint32_t DcFlushEnable : BITFIELD_RANGE(5, 5); - uint32_t ProtectedMemoryApplicationId : BITFIELD_RANGE(6, 6); - uint32_t PipeControlFlushEnable : BITFIELD_RANGE(7, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t IndirectStatePointersDisable : BITFIELD_RANGE(9, 9); - uint32_t TextureCacheInvalidationEnable : BITFIELD_RANGE(10, 10); - uint32_t InstructionCacheInvalidateEnable : BITFIELD_RANGE(11, 11); - uint32_t RenderTargetCacheFlushEnable : BITFIELD_RANGE(12, 12); - uint32_t DepthStallEnable : BITFIELD_RANGE(13, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t GenericMediaStateClear : BITFIELD_RANGE(16, 16); - uint32_t Reserved_49 : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t GlobalSnapshotCountReset : BITFIELD_RANGE(19, 19); - uint32_t CommandStreamerStallEnable : BITFIELD_RANGE(20, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_54 : BITFIELD_RANGE(22, 22); - uint32_t LriPostSyncOperation : BITFIELD_RANGE(23, 23); - uint32_t DestinationAddressType : BITFIELD_RANGE(24, 24); - uint32_t Reserved_57 : BITFIELD_RANGE(25, 26); - uint32_t ProtectedMemoryDisable : BITFIELD_RANGE(27, 27); - uint32_t Reserved_60 : BITFIELD_RANGE(28, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t Address : BITFIELD_RANGE(2, 31); - uint32_t AddressHigh; - uint64_t ImmediateData; - } Common; - uint32_t RawData[6]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x4, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL = 0x0, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_PIPE_CONTROL = 0x2, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_3D = 0x3, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA = 0x1, - POST_SYNC_OPERATION_WRITE_PS_DEPTH_COUNT = 0x2, - POST_SYNC_OPERATION_WRITE_TIMESTAMP = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagGLOBAL_SNAPSHOT_COUNT_RESET { - GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET = 0x0, - GLOBAL_SNAPSHOT_COUNT_RESET_RESET = 0x1, - } GLOBAL_SNAPSHOT_COUNT_RESET; - typedef enum tagLRI_POST_SYNC_OPERATION { - LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION = 0x0, - LRI_POST_SYNC_OPERATION_MMIO_WRITE_IMMEDIATE_DATA = 0x1, - } LRI_POST_SYNC_OPERATION; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - typedef enum tagPATCH_CONSTANTS { - ADDRESS_BYTEOFFSET = 0x8, - ADDRESS_INDEX = 0x2, - ADDRESSHIGH_BYTEOFFSET = 0xc, - ADDRESSHIGH_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_PIPE_CONTROL; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_3D; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.GlobalSnapshotCountReset = GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET; - TheStructure.Common.LriPostSyncOperation = LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagPIPE_CONTROL sInit() { - PIPE_CONTROL state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 6); - return TheStructure.RawData[index]; - } - inline void setDepthCacheFlushEnable(const bool value) { - TheStructure.Common.DepthCacheFlushEnable = value; - } - inline bool getDepthCacheFlushEnable() const { - return (TheStructure.Common.DepthCacheFlushEnable); - } - inline void setStallAtPixelScoreboard(const bool value) { - TheStructure.Common.StallAtPixelScoreboard = value; - } - inline bool getStallAtPixelScoreboard() const { - return (TheStructure.Common.StallAtPixelScoreboard); - } - inline void setStateCacheInvalidationEnable(const bool value) { - TheStructure.Common.StateCacheInvalidationEnable = value; - } - inline bool getStateCacheInvalidationEnable() const { - return (TheStructure.Common.StateCacheInvalidationEnable); - } - inline void setConstantCacheInvalidationEnable(const bool value) { - TheStructure.Common.ConstantCacheInvalidationEnable = value; - } - inline bool getConstantCacheInvalidationEnable() const { - return (TheStructure.Common.ConstantCacheInvalidationEnable); - } - inline void setVfCacheInvalidationEnable(const bool value) { - TheStructure.Common.VfCacheInvalidationEnable = value; - } - inline bool getVfCacheInvalidationEnable() const { - return (TheStructure.Common.VfCacheInvalidationEnable); - } - inline void setDcFlushEnable(const bool value) { - TheStructure.Common.DcFlushEnable = value; - } - inline bool getDcFlushEnable() const { - return (TheStructure.Common.DcFlushEnable); - } - inline void setProtectedMemoryApplicationId(const uint32_t value) { - TheStructure.Common.ProtectedMemoryApplicationId = value; - } - inline uint32_t getProtectedMemoryApplicationId() const { - return (TheStructure.Common.ProtectedMemoryApplicationId); - } - inline void setPipeControlFlushEnable(const bool value) { - TheStructure.Common.PipeControlFlushEnable = value; - } - inline bool getPipeControlFlushEnable() const { - return (TheStructure.Common.PipeControlFlushEnable); - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return (TheStructure.Common.NotifyEnable); - } - inline void setIndirectStatePointersDisable(const bool value) { - TheStructure.Common.IndirectStatePointersDisable = value; - } - inline bool getIndirectStatePointersDisable() const { - return (TheStructure.Common.IndirectStatePointersDisable); - } - inline void setTextureCacheInvalidationEnable(const bool value) { - TheStructure.Common.TextureCacheInvalidationEnable = value; - } - inline bool getTextureCacheInvalidationEnable() const { - return (TheStructure.Common.TextureCacheInvalidationEnable); - } - inline void setInstructionCacheInvalidateEnable(const bool value) { - TheStructure.Common.InstructionCacheInvalidateEnable = value; - } - inline bool getInstructionCacheInvalidateEnable() const { - return (TheStructure.Common.InstructionCacheInvalidateEnable); - } - inline void setRenderTargetCacheFlushEnable(const bool value) { - TheStructure.Common.RenderTargetCacheFlushEnable = value; - } - inline bool getRenderTargetCacheFlushEnable() const { - return (TheStructure.Common.RenderTargetCacheFlushEnable); - } - inline void setDepthStallEnable(const bool value) { - TheStructure.Common.DepthStallEnable = value; - } - inline bool getDepthStallEnable() const { - return (TheStructure.Common.DepthStallEnable); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setGenericMediaStateClear(const bool value) { - TheStructure.Common.GenericMediaStateClear = value; - } - inline bool getGenericMediaStateClear() const { - return (TheStructure.Common.GenericMediaStateClear); - } - inline void setTlbInvalidate(const uint32_t value) { - TheStructure.Common.TlbInvalidate = value; - } - inline uint32_t getTlbInvalidate() const { - return (TheStructure.Common.TlbInvalidate); - } - inline void setGlobalSnapshotCountReset(const GLOBAL_SNAPSHOT_COUNT_RESET value) { - TheStructure.Common.GlobalSnapshotCountReset = value; - } - inline GLOBAL_SNAPSHOT_COUNT_RESET getGlobalSnapshotCountReset() const { - return static_cast(TheStructure.Common.GlobalSnapshotCountReset); - } - inline void setCommandStreamerStallEnable(const uint32_t value) { - TheStructure.Common.CommandStreamerStallEnable = value; - } - inline uint32_t getCommandStreamerStallEnable() const { - return (TheStructure.Common.CommandStreamerStallEnable); - } - inline void setStoreDataIndex(const uint32_t value) { - TheStructure.Common.StoreDataIndex = value; - } - inline uint32_t getStoreDataIndex() const { - return (TheStructure.Common.StoreDataIndex); - } - inline void setLriPostSyncOperation(const LRI_POST_SYNC_OPERATION value) { - TheStructure.Common.LriPostSyncOperation = value; - } - inline LRI_POST_SYNC_OPERATION getLriPostSyncOperation() const { - return static_cast(TheStructure.Common.LriPostSyncOperation); - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - inline void setProtectedMemoryDisable(const uint32_t value) { - TheStructure.Common.ProtectedMemoryDisable = value; - } - inline uint32_t getProtectedMemoryDisable() const { - return (TheStructure.Common.ProtectedMemoryDisable); - } - typedef enum tagADDRESS { - ADDRESS_BIT_SHIFT = 0x2, - ADDRESS_ALIGN_SIZE = 0x4, - } ADDRESS; - inline void setAddress(const uint32_t value) { - TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT; - } - inline uint32_t getAddress() const { - return (TheStructure.Common.Address << ADDRESS_BIT_SHIFT); - } - inline void setAddressHigh(const uint32_t value) { - TheStructure.Common.AddressHigh = value; - } - inline uint32_t getAddressHigh() const { - return (TheStructure.Common.AddressHigh); - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return (TheStructure.Common.ImmediateData); - } -} PIPE_CONTROL; -STATIC_ASSERT(24 == sizeof(PIPE_CONTROL)); - -typedef struct tagRENDER_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t MediaBoundaryPixelMode : BITFIELD_RANGE(6, 7); - uint32_t RenderCacheReadWriteMode : BITFIELD_RANGE(8, 8); - uint32_t SamplerL2OutOfOrderModeDisable : BITFIELD_RANGE(9, 9); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(10, 10); - uint32_t VerticalLineStride : BITFIELD_RANGE(11, 11); - uint32_t TileMode : BITFIELD_RANGE(12, 13); - uint32_t SurfaceHorizontalAlignment : BITFIELD_RANGE(14, 15); - uint32_t SurfaceVerticalAlignment : BITFIELD_RANGE(16, 17); - uint32_t SurfaceFormat : BITFIELD_RANGE(18, 26); - uint32_t Reserved_27 : BITFIELD_RANGE(27, 27); - uint32_t SurfaceArray : BITFIELD_RANGE(28, 28); - uint32_t SurfaceType : BITFIELD_RANGE(29, 31); - uint32_t SurfaceQpitch : BITFIELD_RANGE(0, 14); - uint32_t Reserved_47 : BITFIELD_RANGE(15, 18); - uint32_t BaseMipLevel : BITFIELD_RANGE(19, 23); - uint32_t MemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(24, 25); - uint32_t MemoryObjectControlState_Reserved : BITFIELD_RANGE(26, 26); - uint32_t MemoryObjectControlState_TargetCache : BITFIELD_RANGE(27, 28); - uint32_t MemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(29, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - uint32_t Width : BITFIELD_RANGE(0, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t Height : BITFIELD_RANGE(16, 29); - uint32_t Reserved_94 : BITFIELD_RANGE(30, 31); - uint32_t SurfacePitch : BITFIELD_RANGE(0, 17); - uint32_t Reserved_114 : BITFIELD_RANGE(18, 20); - uint32_t Depth : BITFIELD_RANGE(21, 31); - uint32_t Reserved_128; - uint32_t MipCountLod : BITFIELD_RANGE(0, 3); - uint32_t SurfaceMinLod : BITFIELD_RANGE(4, 7); - uint32_t Reserved_168 : BITFIELD_RANGE(8, 13); - uint32_t CoherencyType : BITFIELD_RANGE(14, 14); - uint32_t Reserved_175 : BITFIELD_RANGE(15, 19); - uint32_t EwaDisableForCube : BITFIELD_RANGE(20, 20); - uint32_t YOffset : BITFIELD_RANGE(21, 23); - uint32_t Reserved_184 : BITFIELD_RANGE(24, 24); - uint32_t XOffset : BITFIELD_RANGE(25, 31); - uint32_t Reserved_192; - uint32_t ResourceMinLod : BITFIELD_RANGE(0, 11); - uint32_t Reserved_236 : BITFIELD_RANGE(12, 15); - uint32_t ShaderChannelSelectAlpha : BITFIELD_RANGE(16, 18); - uint32_t ShaderChannelSelectBlue : BITFIELD_RANGE(19, 21); - uint32_t ShaderChannelSelectGreen : BITFIELD_RANGE(22, 24); - uint32_t ShaderChannelSelectRed : BITFIELD_RANGE(25, 27); - uint32_t AlphaClearColor : BITFIELD_RANGE(28, 28); - uint32_t BlueClearColor : BITFIELD_RANGE(29, 29); - uint32_t GreenClearColor : BITFIELD_RANGE(30, 30); - uint32_t RedClearColor : BITFIELD_RANGE(31, 31); - uint64_t SurfaceBaseAddress; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } Common; - struct tagSurfaceTypeIsnotSurftype_Cube { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Cube; - struct tagSurfaceTypeIsSurftype_Cube { - uint32_t CubeFaceEnable_PositiveZ : BITFIELD_RANGE(0, 0); - uint32_t CubeFaceEnable_NegativeZ : BITFIELD_RANGE(1, 1); - uint32_t CubeFaceEnable_PositiveY : BITFIELD_RANGE(2, 2); - uint32_t CubeFaceEnable_NegativeY : BITFIELD_RANGE(3, 3); - uint32_t CubeFaceEnable_PositiveX : BITFIELD_RANGE(4, 4); - uint32_t CubeFaceEnable_NegativeX : BITFIELD_RANGE(5, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 31); - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Cube; - struct tagSurfaceTypeIsnotSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t MultisamplePositionPaletteIndex : BITFIELD_RANGE(0, 2); - uint32_t NumberOfMultisamples : BITFIELD_RANGE(3, 5); - uint32_t MultisampledSurfaceStorageFormat : BITFIELD_RANGE(6, 6); - uint32_t RenderTargetViewExtent : BITFIELD_RANGE(7, 17); - uint32_t MinimumArrayElement : BITFIELD_RANGE(18, 28); - uint32_t RenderTargetAndSampleUnormRotation : BITFIELD_RANGE(29, 30); - uint32_t Reserved_159 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Strbuf; - struct tagSurfaceTypeIsSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Strbuf; - struct tag_SurfaceFormatIsPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t YOffsetForUOrUvPlane : BITFIELD_RANGE(0, 13); - uint32_t Reserved_206 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForUOrUvPlane : BITFIELD_RANGE(16, 29); - uint32_t Reserved_222 : BITFIELD_RANGE(30, 30); - uint32_t SeparateUvPlaneEnable : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 31); - uint64_t YOffsetForVPlane : BITFIELD_RANGE(32, 45); - uint64_t Reserved_366 : BITFIELD_RANGE(46, 47); - uint64_t XOffsetForVPlane : BITFIELD_RANGE(48, 61); - uint64_t Reserved_382 : BITFIELD_RANGE(62, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsPlanar; - struct tag_SurfaceFormatIsnotPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t AuxiliarySurfaceMode : BITFIELD_RANGE(0, 2); - uint32_t AuxiliarySurfacePitch : BITFIELD_RANGE(3, 11); - uint32_t Reserved_204 : BITFIELD_RANGE(12, 15); - uint32_t AuxiliarySurfaceQpitch : BITFIELD_RANGE(16, 30); - uint32_t Reserved_223 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanar; - struct tag_SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 11); - uint64_t AuxiliarySurfaceBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0; - struct tagMemoryCompressionEnableIs1 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 20); - uint64_t AuxiliaryTableIndexForMediaCompressedSurface : BITFIELD_RANGE(21, 31); - uint64_t Reserved_352 : BITFIELD_RANGE(32, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } MemoryCompressionEnableIs1; - struct tagAuxiliarySurfaceModeIsAux_Hiz { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } AuxiliarySurfaceModeIsAux_Hiz; - uint32_t RawData[16]; - } TheStructure; - typedef enum tagMEDIA_BOUNDARY_PIXEL_MODE { - MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE = 0x0, - MEDIA_BOUNDARY_PIXEL_MODE_PROGRESSIVE_FRAME = 0x2, - MEDIA_BOUNDARY_PIXEL_MODE_INTERLACED_FRAME = 0x3, - } MEDIA_BOUNDARY_PIXEL_MODE; - typedef enum tagRENDER_CACHE_READ_WRITE_MODE { - RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE = 0x0, - RENDER_CACHE_READ_WRITE_MODE_READ_WRITE_CACHE = 0x1, - } RENDER_CACHE_READ_WRITE_MODE; - typedef enum tagTILE_MODE { - TILE_MODE_LINEAR = 0x0, - TILE_MODE_WMAJOR = 0x1, - TILE_MODE_XMAJOR = 0x2, - TILE_MODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT { - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4 = 0x1, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_8 = 0x2, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x3, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_DEFAULT = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4, - } SURFACE_HORIZONTAL_ALIGNMENT; - typedef enum tagSURFACE_VERTICAL_ALIGNMENT { - SURFACE_VERTICAL_ALIGNMENT_VALIGN_4 = 0x1, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_8 = 0x2, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_16 = 0x3, - } SURFACE_VERTICAL_ALIGNMENT; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_R32G32B32A32_FLOAT = 0x0, - SURFACE_FORMAT_R32G32B32A32_SINT = 0x1, - SURFACE_FORMAT_R32G32B32A32_UINT = 0x2, - SURFACE_FORMAT_R32G32B32A32_UNORM = 0x3, - SURFACE_FORMAT_R32G32B32A32_SNORM = 0x4, - SURFACE_FORMAT_R64G64_FLOAT = 0x5, - SURFACE_FORMAT_R32G32B32X32_FLOAT = 0x6, - SURFACE_FORMAT_R32G32B32A32_SSCALED = 0x7, - SURFACE_FORMAT_R32G32B32A32_USCALED = 0x8, - SURFACE_FORMAT_R32G32B32A32_SFIXED = 0x20, - SURFACE_FORMAT_R64G64_PASSTHRU = 0x21, - SURFACE_FORMAT_R32G32B32_FLOAT = 0x40, - SURFACE_FORMAT_R32G32B32_SINT = 0x41, - SURFACE_FORMAT_R32G32B32_UINT = 0x42, - SURFACE_FORMAT_R32G32B32_UNORM = 0x43, - SURFACE_FORMAT_R32G32B32_SNORM = 0x44, - SURFACE_FORMAT_R32G32B32_SSCALED = 0x45, - SURFACE_FORMAT_R32G32B32_USCALED = 0x46, - SURFACE_FORMAT_R32G32B32_SFIXED = 0x50, - SURFACE_FORMAT_R16G16B16A16_UNORM = 0x80, - SURFACE_FORMAT_R16G16B16A16_SNORM = 0x81, - SURFACE_FORMAT_R16G16B16A16_SINT = 0x82, - SURFACE_FORMAT_R16G16B16A16_UINT = 0x83, - SURFACE_FORMAT_R16G16B16A16_FLOAT = 0x84, - SURFACE_FORMAT_R32G32_FLOAT = 0x85, - SURFACE_FORMAT_R32G32_SINT = 0x86, - SURFACE_FORMAT_R32G32_UINT = 0x87, - SURFACE_FORMAT_R32_FLOAT_X8X24_TYPELESS = 0x88, - SURFACE_FORMAT_X32_TYPELESS_G8X24_UINT = 0x89, - SURFACE_FORMAT_L32A32_FLOAT = 0x8a, - SURFACE_FORMAT_R32G32_UNORM = 0x8b, - SURFACE_FORMAT_R32G32_SNORM = 0x8c, - SURFACE_FORMAT_R64_FLOAT = 0x8d, - SURFACE_FORMAT_R16G16B16X16_UNORM = 0x8e, - SURFACE_FORMAT_R16G16B16X16_FLOAT = 0x8f, - SURFACE_FORMAT_A32X32_FLOAT = 0x90, - SURFACE_FORMAT_L32X32_FLOAT = 0x91, - SURFACE_FORMAT_I32X32_FLOAT = 0x92, - SURFACE_FORMAT_R16G16B16A16_SSCALED = 0x93, - SURFACE_FORMAT_R16G16B16A16_USCALED = 0x94, - SURFACE_FORMAT_R32G32_SSCALED = 0x95, - SURFACE_FORMAT_R32G32_USCALED = 0x96, - SURFACE_FORMAT_R32G32_SFIXED = 0xa0, - SURFACE_FORMAT_R64_PASSTHRU = 0xa1, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xc0, - SURFACE_FORMAT_B8G8R8A8_UNORM_SRGB = 0xc1, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0xc2, - SURFACE_FORMAT_R10G10B10A2_UNORM_SRGB = 0xc3, - SURFACE_FORMAT_R10G10B10A2_UINT = 0xc4, - SURFACE_FORMAT_R10G10B10_SNORM_A2_UNORM = 0xc5, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0xc7, - SURFACE_FORMAT_R8G8B8A8_UNORM_SRGB = 0xc8, - SURFACE_FORMAT_R8G8B8A8_SNORM = 0xc9, - SURFACE_FORMAT_R8G8B8A8_SINT = 0xca, - SURFACE_FORMAT_R8G8B8A8_UINT = 0xcb, - SURFACE_FORMAT_R16G16_UNORM = 0xcc, - SURFACE_FORMAT_R16G16_SNORM = 0xcd, - SURFACE_FORMAT_R16G16_SINT = 0xce, - SURFACE_FORMAT_R16G16_UINT = 0xcf, - SURFACE_FORMAT_R16G16_FLOAT = 0xd0, - SURFACE_FORMAT_B10G10R10A2_UNORM = 0xd1, - SURFACE_FORMAT_B10G10R10A2_UNORM_SRGB = 0xd2, - SURFACE_FORMAT_R11G11B10_FLOAT = 0xd3, - SURFACE_FORMAT_R32_SINT = 0xd6, - SURFACE_FORMAT_R32_UINT = 0xd7, - SURFACE_FORMAT_R32_FLOAT = 0xd8, - SURFACE_FORMAT_R24_UNORM_X8_TYPELESS = 0xd9, - SURFACE_FORMAT_X24_TYPELESS_G8_UINT = 0xda, - SURFACE_FORMAT_L32_UNORM = 0xdd, - SURFACE_FORMAT_A32_UNORM = 0xde, - SURFACE_FORMAT_L16A16_UNORM = 0xdf, - SURFACE_FORMAT_I24X8_UNORM = 0xe0, - SURFACE_FORMAT_L24X8_UNORM = 0xe1, - SURFACE_FORMAT_A24X8_UNORM = 0xe2, - SURFACE_FORMAT_I32_FLOAT = 0xe3, - SURFACE_FORMAT_L32_FLOAT = 0xe4, - SURFACE_FORMAT_A32_FLOAT = 0xe5, - SURFACE_FORMAT_X8B8_UNORM_G8R8_SNORM = 0xe6, - SURFACE_FORMAT_A8X8_UNORM_G8R8_SNORM = 0xe7, - SURFACE_FORMAT_B8X8_UNORM_G8R8_SNORM = 0xe8, - SURFACE_FORMAT_B8G8R8X8_UNORM = 0xe9, - SURFACE_FORMAT_B8G8R8X8_UNORM_SRGB = 0xea, - SURFACE_FORMAT_R8G8B8X8_UNORM = 0xeb, - SURFACE_FORMAT_R8G8B8X8_UNORM_SRGB = 0xec, - SURFACE_FORMAT_R9G9B9E5_SHAREDEXP = 0xed, - SURFACE_FORMAT_B10G10R10X2_UNORM = 0xee, - SURFACE_FORMAT_L16A16_FLOAT = 0xf0, - SURFACE_FORMAT_R32_UNORM = 0xf1, - SURFACE_FORMAT_R32_SNORM = 0xf2, - SURFACE_FORMAT_R10G10B10X2_USCALED = 0xf3, - SURFACE_FORMAT_R8G8B8A8_SSCALED = 0xf4, - SURFACE_FORMAT_R8G8B8A8_USCALED = 0xf5, - SURFACE_FORMAT_R16G16_SSCALED = 0xf6, - SURFACE_FORMAT_R16G16_USCALED = 0xf7, - SURFACE_FORMAT_R32_SSCALED = 0xf8, - SURFACE_FORMAT_R32_USCALED = 0xf9, - SURFACE_FORMAT_B5G6R5_UNORM = 0x100, - SURFACE_FORMAT_B5G6R5_UNORM_SRGB = 0x101, - SURFACE_FORMAT_B5G5R5A1_UNORM = 0x102, - SURFACE_FORMAT_B5G5R5A1_UNORM_SRGB = 0x103, - SURFACE_FORMAT_B4G4R4A4_UNORM = 0x104, - SURFACE_FORMAT_B4G4R4A4_UNORM_SRGB = 0x105, - SURFACE_FORMAT_R8G8_UNORM = 0x106, - SURFACE_FORMAT_R8G8_SNORM = 0x107, - SURFACE_FORMAT_R8G8_SINT = 0x108, - SURFACE_FORMAT_R8G8_UINT = 0x109, - SURFACE_FORMAT_R16_UNORM = 0x10a, - SURFACE_FORMAT_R16_SNORM = 0x10b, - SURFACE_FORMAT_R16_SINT = 0x10c, - SURFACE_FORMAT_R16_UINT = 0x10d, - SURFACE_FORMAT_R16_FLOAT = 0x10e, - SURFACE_FORMAT_A8P8_UNORM_PALETTE0 = 0x10f, - SURFACE_FORMAT_A8P8_UNORM_PALETTE1 = 0x110, - SURFACE_FORMAT_I16_UNORM = 0x111, - SURFACE_FORMAT_L16_UNORM = 0x112, - SURFACE_FORMAT_A16_UNORM = 0x113, - SURFACE_FORMAT_L8A8_UNORM = 0x114, - SURFACE_FORMAT_I16_FLOAT = 0x115, - SURFACE_FORMAT_L16_FLOAT = 0x116, - SURFACE_FORMAT_A16_FLOAT = 0x117, - SURFACE_FORMAT_L8A8_UNORM_SRGB = 0x118, - SURFACE_FORMAT_R5G5_SNORM_B6_UNORM = 0x119, - SURFACE_FORMAT_B5G5R5X1_UNORM = 0x11a, - SURFACE_FORMAT_B5G5R5X1_UNORM_SRGB = 0x11b, - SURFACE_FORMAT_R8G8_SSCALED = 0x11c, - SURFACE_FORMAT_R8G8_USCALED = 0x11d, - SURFACE_FORMAT_R16_SSCALED = 0x11e, - SURFACE_FORMAT_R16_USCALED = 0x11f, - SURFACE_FORMAT_P8A8_UNORM_PALETTE0 = 0x122, - SURFACE_FORMAT_P8A8_UNORM_PALETTE1 = 0x123, - SURFACE_FORMAT_A1B5G5R5_UNORM = 0x124, - SURFACE_FORMAT_A4B4G4R4_UNORM = 0x125, - SURFACE_FORMAT_L8A8_UINT = 0x126, - SURFACE_FORMAT_L8A8_SINT = 0x127, - SURFACE_FORMAT_R8_UNORM = 0x140, - SURFACE_FORMAT_R8_SNORM = 0x141, - SURFACE_FORMAT_R8_SINT = 0x142, - SURFACE_FORMAT_R8_UINT = 0x143, - SURFACE_FORMAT_A8_UNORM = 0x144, - SURFACE_FORMAT_I8_UNORM = 0x145, - SURFACE_FORMAT_L8_UNORM = 0x146, - SURFACE_FORMAT_P4A4_UNORM_PALETTE0 = 0x147, - SURFACE_FORMAT_A4P4_UNORM_PALETTE0 = 0x148, - SURFACE_FORMAT_R8_SSCALED = 0x149, - SURFACE_FORMAT_R8_USCALED = 0x14a, - SURFACE_FORMAT_P8_UNORM_PALETTE0 = 0x14b, - SURFACE_FORMAT_L8_UNORM_SRGB = 0x14c, - SURFACE_FORMAT_P8_UNORM_PALETTE1 = 0x14d, - SURFACE_FORMAT_P4A4_UNORM_PALETTE1 = 0x14e, - SURFACE_FORMAT_A4P4_UNORM_PALETTE1 = 0x14f, - SURFACE_FORMAT_Y8_UNORM = 0x150, - SURFACE_FORMAT_L8_UINT = 0x152, - SURFACE_FORMAT_L8_SINT = 0x153, - SURFACE_FORMAT_I8_UINT = 0x154, - SURFACE_FORMAT_I8_SINT = 0x155, - SURFACE_FORMAT_DXT1_RGB_SRGB = 0x180, - SURFACE_FORMAT_R1_UNORM = 0x181, - SURFACE_FORMAT_YCRCB_NORMAL = 0x182, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x183, - SURFACE_FORMAT_P2_UNORM_PALETTE0 = 0x184, - SURFACE_FORMAT_P2_UNORM_PALETTE1 = 0x185, - SURFACE_FORMAT_BC1_UNORM = 0x186, - SURFACE_FORMAT_BC2_UNORM = 0x187, - SURFACE_FORMAT_BC3_UNORM = 0x188, - SURFACE_FORMAT_BC4_UNORM = 0x189, - SURFACE_FORMAT_BC5_UNORM = 0x18a, - SURFACE_FORMAT_BC1_UNORM_SRGB = 0x18b, - SURFACE_FORMAT_BC2_UNORM_SRGB = 0x18c, - SURFACE_FORMAT_BC3_UNORM_SRGB = 0x18d, - SURFACE_FORMAT_MONO8 = 0x18e, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x18f, - SURFACE_FORMAT_YCRCB_SWAPY = 0x190, - SURFACE_FORMAT_DXT1_RGB = 0x191, - SURFACE_FORMAT_FXT1 = 0x192, - SURFACE_FORMAT_R8G8B8_UNORM = 0x193, - SURFACE_FORMAT_R8G8B8_SNORM = 0x194, - SURFACE_FORMAT_R8G8B8_SSCALED = 0x195, - SURFACE_FORMAT_R8G8B8_USCALED = 0x196, - SURFACE_FORMAT_R64G64B64A64_FLOAT = 0x197, - SURFACE_FORMAT_R64G64B64_FLOAT = 0x198, - SURFACE_FORMAT_BC4_SNORM = 0x199, - SURFACE_FORMAT_BC5_SNORM = 0x19a, - SURFACE_FORMAT_R16G16B16_FLOAT = 0x19b, - SURFACE_FORMAT_R16G16B16_UNORM = 0x19c, - SURFACE_FORMAT_R16G16B16_SNORM = 0x19d, - SURFACE_FORMAT_R16G16B16_SSCALED = 0x19e, - SURFACE_FORMAT_R16G16B16_USCALED = 0x19f, - SURFACE_FORMAT_BC6H_SF16 = 0x1a1, - SURFACE_FORMAT_BC7_UNORM = 0x1a2, - SURFACE_FORMAT_BC7_UNORM_SRGB = 0x1a3, - SURFACE_FORMAT_BC6H_UF16 = 0x1a4, - SURFACE_FORMAT_PLANAR_420_8 = 0x1a5, - SURFACE_FORMAT_R8G8B8_UNORM_SRGB = 0x1a8, - SURFACE_FORMAT_ETC1_RGB8 = 0x1a9, - SURFACE_FORMAT_ETC2_RGB8 = 0x1aa, - SURFACE_FORMAT_EAC_R11 = 0x1ab, - SURFACE_FORMAT_EAC_RG11 = 0x1ac, - SURFACE_FORMAT_EAC_SIGNED_R11 = 0x1ad, - SURFACE_FORMAT_EAC_SIGNED_RG11 = 0x1ae, - SURFACE_FORMAT_ETC2_SRGB8 = 0x1af, - SURFACE_FORMAT_R16G16B16_UINT = 0x1b0, - SURFACE_FORMAT_R16G16B16_SINT = 0x1b1, - SURFACE_FORMAT_R32_SFIXED = 0x1b2, - SURFACE_FORMAT_R10G10B10A2_SNORM = 0x1b3, - SURFACE_FORMAT_R10G10B10A2_USCALED = 0x1b4, - SURFACE_FORMAT_R10G10B10A2_SSCALED = 0x1b5, - SURFACE_FORMAT_R10G10B10A2_SINT = 0x1b6, - SURFACE_FORMAT_B10G10R10A2_SNORM = 0x1b7, - SURFACE_FORMAT_B10G10R10A2_USCALED = 0x1b8, - SURFACE_FORMAT_B10G10R10A2_SSCALED = 0x1b9, - SURFACE_FORMAT_B10G10R10A2_UINT = 0x1ba, - SURFACE_FORMAT_B10G10R10A2_SINT = 0x1bb, - SURFACE_FORMAT_R64G64B64A64_PASSTHRU = 0x1bc, - SURFACE_FORMAT_R64G64B64_PASSTHRU = 0x1bd, - SURFACE_FORMAT_ETC2_RGB8_PTA = 0x1c0, - SURFACE_FORMAT_ETC2_SRGB8_PTA = 0x1c1, - SURFACE_FORMAT_ETC2_EAC_RGBA8 = 0x1c2, - SURFACE_FORMAT_ETC2_EAC_SRGB8_A8 = 0x1c3, - SURFACE_FORMAT_R8G8B8_UINT = 0x1c8, - SURFACE_FORMAT_R8G8B8_SINT = 0x1c9, - SURFACE_FORMAT_RAW = 0x1ff, - } SURFACE_FORMAT; - typedef enum tagSURFACE_TYPE { - SURFACE_TYPE_SURFTYPE_1D = 0x0, - SURFACE_TYPE_SURFTYPE_2D = 0x1, - SURFACE_TYPE_SURFTYPE_3D = 0x2, - SURFACE_TYPE_SURFTYPE_CUBE = 0x3, - SURFACE_TYPE_SURFTYPE_BUFFER = 0x4, - SURFACE_TYPE_SURFTYPE_STRBUF = 0x5, - SURFACE_TYPE_SURFTYPE_NULL = 0x7, - } SURFACE_TYPE; - typedef enum tagNUMBER_OF_MULTISAMPLES { - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1 = 0x0, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_2 = 0x1, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_4 = 0x2, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_8 = 0x3, - } NUMBER_OF_MULTISAMPLES; - typedef enum tagMULTISAMPLED_SURFACE_STORAGE_FORMAT { - MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS = 0x0, - MULTISAMPLED_SURFACE_STORAGE_FORMAT_DEPTH_STENCIL = 0x1, - } MULTISAMPLED_SURFACE_STORAGE_FORMAT; - typedef enum tagRENDER_TARGET_AND_SAMPLE_UNORM_ROTATION { - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG = 0x0, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_90DEG = 0x1, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_270DEG = 0x3, - } RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION; - typedef enum tagCOHERENCY_TYPE { - COHERENCY_TYPE_GPU_COHERENT = 0x0, - COHERENCY_TYPE_IA_COHERENT = 0x1, - } COHERENCY_TYPE; - typedef enum tagAUXILIARY_SURFACE_MODE { - AUXILIARY_SURFACE_MODE_AUX_NONE = 0x0, - AUXILIARY_SURFACE_MODE_AUX_MCS = 0x1, - AUXILIARY_SURFACE_MODE_AUX_APPEND = 0x2, - AUXILIARY_SURFACE_MODE_AUX_HIZ = 0x3, - AUXILIARY_SURFACE_MODE_AUX_CCS_E = 0x5, - } AUXILIARY_SURFACE_MODE; - typedef enum tagSHADER_CHANNEL_SELECT { - SHADER_CHANNEL_SELECT_ZERO = 0x0, - SHADER_CHANNEL_SELECT_ONE = 0x1, - SHADER_CHANNEL_SELECT_RED = 0x4, - SHADER_CHANNEL_SELECT_GREEN = 0x5, - SHADER_CHANNEL_SELECT_BLUE = 0x6, - SHADER_CHANNEL_SELECT_ALPHA = 0x7, - } SHADER_CHANNEL_SELECT; - typedef enum tagALPHA_CLEAR_COLOR { - ALPHA_CLEAR_COLOR_CC_ZERO = 0x0, - ALPHA_CLEAR_COLOR_CC_ONE = 0x1, - } ALPHA_CLEAR_COLOR; - typedef enum tagBLUE_CLEAR_COLOR { - BLUE_CLEAR_COLOR_CC_ZERO = 0x0, - BLUE_CLEAR_COLOR_CC_ONE = 0x1, - } BLUE_CLEAR_COLOR; - typedef enum tagGREEN_CLEAR_COLOR { - GREEN_CLEAR_COLOR_CC_ZERO = 0x0, - GREEN_CLEAR_COLOR_CC_ONE = 0x1, - } GREEN_CLEAR_COLOR; - typedef enum tagRED_CLEAR_COLOR { - RED_CLEAR_COLOR_CC_ZERO = 0x0, - RED_CLEAR_COLOR_CC_ONE = 0x1, - } RED_CLEAR_COLOR; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x20, - SURFACEBASEADDRESS_INDEX = 0x8, - AUXILIARYSURFACEBASEADDRESS_BYTEOFFSET = 0x28, - AUXILIARYSURFACEBASEADDRESS_INDEX = 0xa, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MediaBoundaryPixelMode = MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE; - TheStructure.Common.RenderCacheReadWriteMode = RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE; - TheStructure.Common.TileMode = TILE_MODE_LINEAR; - TheStructure.Common.SurfaceHorizontalAlignment = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4; - TheStructure.Common.SurfaceVerticalAlignment = SURFACE_VERTICAL_ALIGNMENT_VALIGN_4; - TheStructure.Common.SurfaceType = SURFACE_TYPE_SURFTYPE_1D; - TheStructure.Common.CoherencyType = COHERENCY_TYPE_GPU_COHERENT; - TheStructure.Common.ShaderChannelSelectAlpha = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectBlue = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectGreen = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectRed = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.AlphaClearColor = ALPHA_CLEAR_COLOR_CC_ZERO; - TheStructure.Common.BlueClearColor = BLUE_CLEAR_COLOR_CC_ZERO; - TheStructure.Common.GreenClearColor = GREEN_CLEAR_COLOR_CC_ZERO; - TheStructure.Common.RedClearColor = RED_CLEAR_COLOR_CC_ZERO; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG; - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = AUXILIARY_SURFACE_MODE_AUX_NONE; - } - static tagRENDER_SURFACE_STATE sInit() { - RENDER_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 15); - return TheStructure.RawData[index]; - } - inline void setMediaBoundaryPixelMode(const MEDIA_BOUNDARY_PIXEL_MODE value) { - TheStructure.Common.MediaBoundaryPixelMode = value; - } - inline MEDIA_BOUNDARY_PIXEL_MODE getMediaBoundaryPixelMode() const { - return static_cast(TheStructure.Common.MediaBoundaryPixelMode); - } - inline void setRenderCacheReadWriteMode(const RENDER_CACHE_READ_WRITE_MODE value) { - TheStructure.Common.RenderCacheReadWriteMode = value; - } - inline RENDER_CACHE_READ_WRITE_MODE getRenderCacheReadWriteMode() const { - return static_cast(TheStructure.Common.RenderCacheReadWriteMode); - } - inline void setSamplerL2OutOfOrderModeDisable(const bool value) { - TheStructure.Common.SamplerL2OutOfOrderModeDisable = value; - } - inline bool getSamplerL2OutOfOrderModeDisable() const { - return (TheStructure.Common.SamplerL2OutOfOrderModeDisable); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setSurfaceHorizontalAlignment(const SURFACE_HORIZONTAL_ALIGNMENT value) { - TheStructure.Common.SurfaceHorizontalAlignment = value; - } - inline SURFACE_HORIZONTAL_ALIGNMENT getSurfaceHorizontalAlignment() const { - return static_cast(TheStructure.Common.SurfaceHorizontalAlignment); - } - inline void setSurfaceVerticalAlignment(const SURFACE_VERTICAL_ALIGNMENT value) { - TheStructure.Common.SurfaceVerticalAlignment = value; - } - inline SURFACE_VERTICAL_ALIGNMENT getSurfaceVerticalAlignment() const { - return static_cast(TheStructure.Common.SurfaceVerticalAlignment); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setSurfaceArray(const bool value) { - TheStructure.Common.SurfaceArray = value; - } - inline bool getSurfaceArray() const { - return (TheStructure.Common.SurfaceArray); - } - inline void setSurfaceType(const SURFACE_TYPE value) { - TheStructure.Common.SurfaceType = value; - } - inline SURFACE_TYPE getSurfaceType() const { - return static_cast(TheStructure.Common.SurfaceType); - } - typedef enum tagSURFACEQPITCH { - SURFACEQPITCH_BIT_SHIFT = 0x2, - SURFACEQPITCH_ALIGN_SIZE = 0x4, - } SURFACEQPITCH; - inline void setSurfaceQpitch(const uint32_t value) { - TheStructure.Common.SurfaceQpitch = value >> SURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getSurfaceQpitch() const { - return (TheStructure.Common.SurfaceQpitch << SURFACEQPITCH_BIT_SHIFT); - } - inline void setBaseMipLevel(const uint32_t value) { - TheStructure.Common.BaseMipLevel = value; - } - inline uint32_t getBaseMipLevel() const { - return (TheStructure.Common.BaseMipLevel); - } - inline void setMemoryObjectControlStateAgeForQuadlru(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_AgeForQuadlru = value; - } - inline uint32_t getMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.MemoryObjectControlState_AgeForQuadlru); - } - inline void setMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_Reserved = value; - } - inline uint32_t getMemoryObjectControlStateReserved() const { - return (TheStructure.Common.MemoryObjectControlState_Reserved); - } - inline void setMemoryObjectControlStateTargetCache(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_TargetCache = value; - } - inline uint32_t getMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.MemoryObjectControlState_TargetCache); - } - inline void setMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint32_t getMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.MemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - inline void setMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_AgeForQuadlru = value; - TheStructure.Common.MemoryObjectControlState_Reserved = (value >> 2); - TheStructure.Common.MemoryObjectControlState_TargetCache = (value >> 3); - TheStructure.Common.MemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = (value >> 5); - } - inline uint32_t getMemoryObjectControlState() const { - int32_t mocs = TheStructure.Common.MemoryObjectControlState_AgeForQuadlru; - mocs |= (TheStructure.Common.MemoryObjectControlState_Reserved << 2); - mocs |= (TheStructure.Common.MemoryObjectControlState_TargetCache << 3); - mocs |= (TheStructure.Common.MemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl << 5); - return (mocs); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setDepth(const uint32_t value) { - TheStructure.Common.Depth = value - 1; - } - inline uint32_t getDepth() const { - return (TheStructure.Common.Depth + 1); - } - inline void setMipCountLod(const uint32_t value) { - TheStructure.Common.MipCountLod = value; - } - inline uint32_t getMipCountLod() const { - return (TheStructure.Common.MipCountLod); - } - inline void setMipTailStartLod(const uint32_t value) { - UNRECOVERABLE_IF(true); - } - inline uint32_t getMipTailStartLod() const { - UNRECOVERABLE_IF(true); - return 0; - } - inline void setSurfaceMinLod(const uint32_t value) { - TheStructure.Common.SurfaceMinLod = value; - } - inline uint32_t getSurfaceMinLod() const { - return (TheStructure.Common.SurfaceMinLod); - } - inline void setCoherencyType(const COHERENCY_TYPE value) { - TheStructure.Common.CoherencyType = value; - } - inline COHERENCY_TYPE getCoherencyType() const { - return static_cast(TheStructure.Common.CoherencyType); - } - inline void setEwaDisableForCube(const bool value) { - TheStructure.Common.EwaDisableForCube = value; - } - inline bool getEwaDisableForCube() const { - return (TheStructure.Common.EwaDisableForCube); - } - typedef enum tagYOFFSET { - YOFFSET_BIT_SHIFT = 0x2, - YOFFSET_ALIGN_SIZE = 0x4, - } YOFFSET; - inline void setYOffset(const uint32_t value) { - TheStructure.Common.YOffset = value >> YOFFSET_BIT_SHIFT; - } - inline uint32_t getYOffset() const { - return (TheStructure.Common.YOffset << YOFFSET_BIT_SHIFT); - } - typedef enum tagXOFFSET { - XOFFSET_BIT_SHIFT = 0x2, - XOFFSET_ALIGN_SIZE = 0x4, - } XOFFSET; - inline void setXOffset(const uint32_t value) { - TheStructure.Common.XOffset = value >> XOFFSET_BIT_SHIFT; - } - inline uint32_t getXOffset() const { - return (TheStructure.Common.XOffset << XOFFSET_BIT_SHIFT); - } - inline void setResourceMinLod(const uint32_t value) { - TheStructure.Common.ResourceMinLod = value; - } - inline uint32_t getResourceMinLod() const { - return (TheStructure.Common.ResourceMinLod); - } - inline void setShaderChannelSelectAlpha(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectAlpha = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectAlpha() const { - return static_cast(TheStructure.Common.ShaderChannelSelectAlpha); - } - inline void setShaderChannelSelectBlue(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectBlue = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectBlue() const { - return static_cast(TheStructure.Common.ShaderChannelSelectBlue); - } - inline void setShaderChannelSelectGreen(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectGreen = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectGreen() const { - return static_cast(TheStructure.Common.ShaderChannelSelectGreen); - } - inline void setShaderChannelSelectRed(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectRed = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectRed() const { - return static_cast(TheStructure.Common.ShaderChannelSelectRed); - } - inline void setAlphaClearColor(const ALPHA_CLEAR_COLOR value) { - TheStructure.Common.AlphaClearColor = value; - } - inline ALPHA_CLEAR_COLOR getAlphaClearColor() const { - return static_cast(TheStructure.Common.AlphaClearColor); - } - inline void setBlueClearColor(const BLUE_CLEAR_COLOR value) { - TheStructure.Common.BlueClearColor = value; - } - inline BLUE_CLEAR_COLOR getBlueClearColor() const { - return static_cast(TheStructure.Common.BlueClearColor); - } - inline void setGreenClearColor(const GREEN_CLEAR_COLOR value) { - TheStructure.Common.GreenClearColor = value; - } - inline GREEN_CLEAR_COLOR getGreenClearColor() const { - return static_cast(TheStructure.Common.GreenClearColor); - } - inline void setRedClearColor(const RED_CLEAR_COLOR value) { - TheStructure.Common.RedClearColor = value; - } - inline RED_CLEAR_COLOR getRedClearColor() const { - return static_cast(TheStructure.Common.RedClearColor); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddress = value; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddress); - } - inline void setCubeFaceEnablePositiveZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ = value; - } - inline bool getCubeFaceEnablePositiveZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ); - } - inline void setCubeFaceEnableNegativeZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ = value; - } - inline bool getCubeFaceEnableNegativeZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ); - } - inline void setCubeFaceEnablePositiveY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY = value; - } - inline bool getCubeFaceEnablePositiveY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY); - } - inline void setCubeFaceEnableNegativeY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY = value; - } - inline bool getCubeFaceEnableNegativeY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY); - } - inline void setCubeFaceEnablePositiveX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX = value; - } - inline bool getCubeFaceEnablePositiveX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX); - } - inline void setCubeFaceEnableNegativeX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX = value; - } - inline bool getCubeFaceEnableNegativeX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX); - } - inline void setMultisamplePositionPaletteIndex(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex = value; - } - inline uint32_t getMultisamplePositionPaletteIndex() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex); - } - inline void setNumberOfMultisamples(const NUMBER_OF_MULTISAMPLES value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = value; - } - inline NUMBER_OF_MULTISAMPLES getNumberOfMultisamples() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples); - } - inline void setMultisampledSurfaceStorageFormat(const MULTISAMPLED_SURFACE_STORAGE_FORMAT value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = value; - } - inline MULTISAMPLED_SURFACE_STORAGE_FORMAT getMultisampledSurfaceStorageFormat() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat); - } - inline void setRenderTargetViewExtent(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent = value - 1; - } - inline uint32_t getRenderTargetViewExtent() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent + 1); - } - inline void setMinimumArrayElement(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement = value; - } - inline uint32_t getMinimumArrayElement() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement); - } - inline void setRenderTargetAndSampleUnormRotation(const RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = value; - } - inline RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION getRenderTargetAndSampleUnormRotation() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation); - } - inline void setYOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane = value; - } - inline uint32_t getYOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane); - } - inline void setXOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane = value; - } - inline uint32_t getXOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane); - } - inline void setSeparateUvPlaneEnable(const bool value) { - TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable = value; - } - inline bool getSeparateUvPlaneEnable() const { - return (TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable); - } - inline void setYOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane = value; - } - inline uint64_t getYOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane); - } - inline void setXOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane = value; - } - inline uint64_t getXOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane); - } - inline void setAuxiliarySurfaceMode(const AUXILIARY_SURFACE_MODE value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = value; - } - inline AUXILIARY_SURFACE_MODE getAuxiliarySurfaceMode() const { - return static_cast(TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode); - } - inline void setAuxiliarySurfacePitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch = value - 1; - } - inline uint32_t getAuxiliarySurfacePitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch + 1); - } - typedef enum tagAUXILIARYSURFACEQPITCH { - AUXILIARYSURFACEQPITCH_BIT_SHIFT = 0x2, - AUXILIARYSURFACEQPITCH_ALIGN_SIZE = 0x4, - } AUXILIARYSURFACEQPITCH; - inline void setAuxiliarySurfaceQpitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch = value >> AUXILIARYSURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getAuxiliarySurfaceQpitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch << AUXILIARYSURFACEQPITCH_BIT_SHIFT); - } - typedef enum tagAUXILIARYSURFACEBASEADDRESS { - AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT = 0xc, - AUXILIARYSURFACEBASEADDRESS_ALIGN_SIZE = 0x1000, - } AUXILIARYSURFACEBASEADDRESS; - inline void setAuxiliarySurfaceBaseAddress(const uint64_t value) { - TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress = value >> AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getAuxiliarySurfaceBaseAddress() const { - return (TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress << AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT); - } - inline void setAuxiliaryTableIndexForMediaCompressedSurface(const uint64_t value) { - TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface = value; - } - inline uint64_t getAuxiliaryTableIndexForMediaCompressedSurface() const { - return (TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface); - } -} RENDER_SURFACE_STATE; -STATIC_ASSERT(64 == sizeof(RENDER_SURFACE_STATE)); - -typedef struct tagSAMPLER_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t LodAlgorithm : BITFIELD_RANGE(0, 0); - uint32_t TextureLodBias : BITFIELD_RANGE(1, 13); - uint32_t MinModeFilter : BITFIELD_RANGE(14, 16); - uint32_t MagModeFilter : BITFIELD_RANGE(17, 19); - uint32_t MipModeFilter : BITFIELD_RANGE(20, 21); - uint32_t BaseMipLevel : BITFIELD_RANGE(22, 26); - uint32_t LodPreclampMode : BITFIELD_RANGE(27, 28); - uint32_t TextureBorderColorMode : BITFIELD_RANGE(29, 29); - uint32_t Reserved_30 : BITFIELD_RANGE(30, 30); - uint32_t SamplerDisable : BITFIELD_RANGE(31, 31); - uint32_t CubeSurfaceControlMode : BITFIELD_RANGE(0, 0); - uint32_t ShadowFunction : BITFIELD_RANGE(1, 3); - uint32_t ChromakeyMode : BITFIELD_RANGE(4, 4); - uint32_t ChromakeyIndex : BITFIELD_RANGE(5, 6); - uint32_t ChromakeyEnable : BITFIELD_RANGE(7, 7); - uint32_t MaxLod : BITFIELD_RANGE(8, 19); - uint32_t MinLod : BITFIELD_RANGE(20, 31); - uint32_t LodClampMagnificationMode : BITFIELD_RANGE(0, 0); - uint32_t Reserved_65 : BITFIELD_RANGE(1, 5); - uint32_t IndirectStatePointer : BITFIELD_RANGE(6, 23); - uint32_t Reserved_88 : BITFIELD_RANGE(24, 31); - uint32_t TczAddressControlMode : BITFIELD_RANGE(0, 2); - uint32_t TcyAddressControlMode : BITFIELD_RANGE(3, 5); - uint32_t TcxAddressControlMode : BITFIELD_RANGE(6, 8); - uint32_t Reserved_105 : BITFIELD_RANGE(9, 9); - uint32_t Non_NormalizedCoordinateEnable : BITFIELD_RANGE(10, 10); - uint32_t TrilinearFilterQuality : BITFIELD_RANGE(11, 12); - uint32_t RAddressMinFilterRoundingEnable : BITFIELD_RANGE(13, 13); - uint32_t RAddressMagFilterRoundingEnable : BITFIELD_RANGE(14, 14); - uint32_t VAddressMinFilterRoundingEnable : BITFIELD_RANGE(15, 15); - uint32_t VAddressMagFilterRoundingEnable : BITFIELD_RANGE(16, 16); - uint32_t UAddressMinFilterRoundingEnable : BITFIELD_RANGE(17, 17); - uint32_t UAddressMagFilterRoundingEnable : BITFIELD_RANGE(18, 18); - uint32_t MaximumAnisotropy : BITFIELD_RANGE(19, 21); - uint32_t Reserved_118 : BITFIELD_RANGE(22, 31); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagLOD_ALGORITHM { - LOD_ALGORITHM_LEGACY = 0x0, - LOD_ALGORITHM_EWA_APPROXIMATION = 0x1, - } LOD_ALGORITHM; - typedef enum tagMIN_MODE_FILTER { - MIN_MODE_FILTER_NEAREST = 0x0, - MIN_MODE_FILTER_LINEAR = 0x1, - MIN_MODE_FILTER_ANISOTROPIC = 0x2, - MIN_MODE_FILTER_MONO = 0x6, - } MIN_MODE_FILTER; - typedef enum tagMAG_MODE_FILTER { - MAG_MODE_FILTER_NEAREST = 0x0, - MAG_MODE_FILTER_LINEAR = 0x1, - MAG_MODE_FILTER_ANISOTROPIC = 0x2, - MAG_MODE_FILTER_MONO = 0x6, - } MAG_MODE_FILTER; - typedef enum tagMIP_MODE_FILTER { - MIP_MODE_FILTER_NONE = 0x0, - MIP_MODE_FILTER_NEAREST = 0x1, - MIP_MODE_FILTER_LINEAR = 0x3, - } MIP_MODE_FILTER; - typedef enum tagLOD_PRECLAMP_MODE { - LOD_PRECLAMP_MODE_NONE = 0x0, - LOD_PRECLAMP_MODE_OGL = 0x2, - } LOD_PRECLAMP_MODE; - typedef enum tagTEXTURE_BORDER_COLOR_MODE { - TEXTURE_BORDER_COLOR_MODE_DX10_OGL = 0x0, - TEXTURE_BORDER_COLOR_MODE_DX9 = 0x1, - } TEXTURE_BORDER_COLOR_MODE; - typedef enum tagCUBE_SURFACE_CONTROL_MODE { - CUBE_SURFACE_CONTROL_MODE_PROGRAMMED = 0x0, - CUBE_SURFACE_CONTROL_MODE_OVERRIDE = 0x1, - } CUBE_SURFACE_CONTROL_MODE; - typedef enum tagSHADOW_FUNCTION { - SHADOW_FUNCTION_PREFILTEROP_ALWAYS = 0x0, - SHADOW_FUNCTION_PREFILTEROP_NEVER = 0x1, - SHADOW_FUNCTION_PREFILTEROP_LESS = 0x2, - SHADOW_FUNCTION_PREFILTEROP_EQUAL = 0x3, - SHADOW_FUNCTION_PREFILTEROP_LEQUAL = 0x4, - SHADOW_FUNCTION_PREFILTEROP_GREATER = 0x5, - SHADOW_FUNCTION_PREFILTEROP_NOTEQUAL = 0x6, - SHADOW_FUNCTION_PREFILTEROP_GEQUAL = 0x7, - } SHADOW_FUNCTION; - typedef enum tagCHROMAKEY_MODE { - CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH = 0x0, - CHROMAKEY_MODE_KEYFILTER_REPLACE_BLACK = 0x1, - } CHROMAKEY_MODE; - typedef enum tagLOD_CLAMP_MAGNIFICATION_MODE { - LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE = 0x0, - LOD_CLAMP_MAGNIFICATION_MODE_MIPFILTER = 0x1, - } LOD_CLAMP_MAGNIFICATION_MODE; - typedef enum tagTEXTURE_COORDINATE_MODE { - TEXTURE_COORDINATE_MODE_WRAP = 0x0, - TEXTURE_COORDINATE_MODE_MIRROR = 0x1, - TEXTURE_COORDINATE_MODE_CLAMP = 0x2, - TEXTURE_COORDINATE_MODE_CUBE = 0x3, - TEXTURE_COORDINATE_MODE_CLAMP_BORDER = 0x4, - TEXTURE_COORDINATE_MODE_MIRROR_ONCE = 0x5, - TEXTURE_COORDINATE_MODE_HALF_BORDER = 0x6, - TEXTURE_COORDINATE_MODE_MIRROR_101 = 0x7, - } TEXTURE_COORDINATE_MODE; - typedef enum tagTRILINEAR_FILTER_QUALITY { - TRILINEAR_FILTER_QUALITY_FULL = 0x0, - TRILINEAR_FILTER_QUALITY_TRIQUAL_HIGH_MAG_CLAMP_MIPFILTER = 0x1, - TRILINEAR_FILTER_QUALITY_MED = 0x2, - TRILINEAR_FILTER_QUALITY_LOW = 0x3, - } TRILINEAR_FILTER_QUALITY; - typedef enum tagMAXIMUM_ANISOTROPY { - MAXIMUM_ANISOTROPY_RATIO_21 = 0x0, - MAXIMUM_ANISOTROPY_RATIO_41 = 0x1, - MAXIMUM_ANISOTROPY_RATIO_61 = 0x2, - MAXIMUM_ANISOTROPY_RATIO_81 = 0x3, - MAXIMUM_ANISOTROPY_RATIO_101 = 0x4, - MAXIMUM_ANISOTROPY_RATIO_121 = 0x5, - MAXIMUM_ANISOTROPY_RATIO_141 = 0x6, - MAXIMUM_ANISOTROPY_RATIO_161 = 0x7, - } MAXIMUM_ANISOTROPY; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.LodAlgorithm = LOD_ALGORITHM_LEGACY; - TheStructure.Common.MinModeFilter = MIN_MODE_FILTER_NEAREST; - TheStructure.Common.MagModeFilter = MAG_MODE_FILTER_NEAREST; - TheStructure.Common.MipModeFilter = MIP_MODE_FILTER_NONE; - TheStructure.Common.LodPreclampMode = LOD_PRECLAMP_MODE_NONE; - TheStructure.Common.TextureBorderColorMode = TEXTURE_BORDER_COLOR_MODE_DX10_OGL; - TheStructure.Common.CubeSurfaceControlMode = CUBE_SURFACE_CONTROL_MODE_PROGRAMMED; - TheStructure.Common.ShadowFunction = SHADOW_FUNCTION_PREFILTEROP_ALWAYS; - TheStructure.Common.ChromakeyMode = CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH; - TheStructure.Common.LodClampMagnificationMode = LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE; - TheStructure.Common.TczAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcyAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcxAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TrilinearFilterQuality = TRILINEAR_FILTER_QUALITY_FULL; - TheStructure.Common.MaximumAnisotropy = MAXIMUM_ANISOTROPY_RATIO_21; - } - static tagSAMPLER_STATE sInit() { - SAMPLER_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setLodAlgorithm(const LOD_ALGORITHM value) { - TheStructure.Common.LodAlgorithm = value; - } - inline LOD_ALGORITHM getLodAlgorithm() const { - return static_cast(TheStructure.Common.LodAlgorithm); - } - inline void setTextureLodBias(const uint32_t value) { - TheStructure.Common.TextureLodBias = value; - } - inline uint32_t getTextureLodBias() const { - return (TheStructure.Common.TextureLodBias); - } - inline void setMinModeFilter(const MIN_MODE_FILTER value) { - TheStructure.Common.MinModeFilter = value; - } - inline MIN_MODE_FILTER getMinModeFilter() const { - return static_cast(TheStructure.Common.MinModeFilter); - } - inline void setMagModeFilter(const MAG_MODE_FILTER value) { - TheStructure.Common.MagModeFilter = value; - } - inline MAG_MODE_FILTER getMagModeFilter() const { - return static_cast(TheStructure.Common.MagModeFilter); - } - inline void setMipModeFilter(const MIP_MODE_FILTER value) { - TheStructure.Common.MipModeFilter = value; - } - inline MIP_MODE_FILTER getMipModeFilter() const { - return static_cast(TheStructure.Common.MipModeFilter); - } - inline void setBaseMipLevel(const uint32_t value) { - TheStructure.Common.BaseMipLevel = value; - } - inline uint32_t getBaseMipLevel() const { - return (TheStructure.Common.BaseMipLevel); - } - inline void setLodPreclampMode(const LOD_PRECLAMP_MODE value) { - TheStructure.Common.LodPreclampMode = value; - } - inline LOD_PRECLAMP_MODE getLodPreclampMode() const { - return static_cast(TheStructure.Common.LodPreclampMode); - } - inline void setTextureBorderColorMode(const TEXTURE_BORDER_COLOR_MODE value) { - TheStructure.Common.TextureBorderColorMode = value; - } - inline TEXTURE_BORDER_COLOR_MODE getTextureBorderColorMode() const { - return static_cast(TheStructure.Common.TextureBorderColorMode); - } - inline void setSamplerDisable(const bool value) { - TheStructure.Common.SamplerDisable = value; - } - inline bool getSamplerDisable() const { - return (TheStructure.Common.SamplerDisable); - } - inline void setCubeSurfaceControlMode(const CUBE_SURFACE_CONTROL_MODE value) { - TheStructure.Common.CubeSurfaceControlMode = value; - } - inline CUBE_SURFACE_CONTROL_MODE getCubeSurfaceControlMode() const { - return static_cast(TheStructure.Common.CubeSurfaceControlMode); - } - inline void setShadowFunction(const SHADOW_FUNCTION value) { - TheStructure.Common.ShadowFunction = value; - } - inline SHADOW_FUNCTION getShadowFunction() const { - return static_cast(TheStructure.Common.ShadowFunction); - } - inline void setChromakeyMode(const CHROMAKEY_MODE value) { - TheStructure.Common.ChromakeyMode = value; - } - inline CHROMAKEY_MODE getChromakeyMode() const { - return static_cast(TheStructure.Common.ChromakeyMode); - } - inline void setChromakeyIndex(const uint32_t value) { - TheStructure.Common.ChromakeyIndex = value; - } - inline uint32_t getChromakeyIndex() const { - return (TheStructure.Common.ChromakeyIndex); - } - inline void setChromakeyEnable(const bool value) { - TheStructure.Common.ChromakeyEnable = value; - } - inline bool getChromakeyEnable() const { - return (TheStructure.Common.ChromakeyEnable); - } - inline void setMaxLod(const uint32_t value) { - TheStructure.Common.MaxLod = value; - } - inline uint32_t getMaxLod() const { - return (TheStructure.Common.MaxLod); - } - inline void setMinLod(const uint32_t value) { - TheStructure.Common.MinLod = value; - } - inline uint32_t getMinLod() const { - return (TheStructure.Common.MinLod); - } - inline void setLodClampMagnificationMode(const LOD_CLAMP_MAGNIFICATION_MODE value) { - TheStructure.Common.LodClampMagnificationMode = value; - } - inline LOD_CLAMP_MAGNIFICATION_MODE getLodClampMagnificationMode() const { - return static_cast(TheStructure.Common.LodClampMagnificationMode); - } - typedef enum tagINDIRECTSTATEPOINTER { - INDIRECTSTATEPOINTER_BIT_SHIFT = 0x6, - INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40, - } INDIRECTSTATEPOINTER; - inline uint32_t getIndirectStatePointer() const { - return (uint32_t)TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT; - } - inline void setIndirectStatePointer(const uint32_t indirectStatePointerValue) { - TheStructure.Common.IndirectStatePointer = indirectStatePointerValue >> INDIRECTSTATEPOINTER_BIT_SHIFT; - } - inline void setTczAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TczAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTczAddressControlMode() const { - return static_cast(TheStructure.Common.TczAddressControlMode); - } - inline void setTcyAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcyAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcyAddressControlMode() const { - return static_cast(TheStructure.Common.TcyAddressControlMode); - } - inline void setTcxAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcxAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcxAddressControlMode() const { - return static_cast(TheStructure.Common.TcxAddressControlMode); - } - inline void setNonNormalizedCoordinateEnable(const bool value) { - TheStructure.Common.Non_NormalizedCoordinateEnable = value; - } - inline bool getNonNormalizedCoordinateEnable() const { - return (TheStructure.Common.Non_NormalizedCoordinateEnable); - } - inline void setTrilinearFilterQuality(const TRILINEAR_FILTER_QUALITY value) { - TheStructure.Common.TrilinearFilterQuality = value; - } - inline TRILINEAR_FILTER_QUALITY getTrilinearFilterQuality() const { - return static_cast(TheStructure.Common.TrilinearFilterQuality); - } - inline void setRAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMinFilterRoundingEnable = value; - } - inline bool getRAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMinFilterRoundingEnable); - } - inline void setRAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMagFilterRoundingEnable = value; - } - inline bool getRAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMagFilterRoundingEnable); - } - inline void setVAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMinFilterRoundingEnable = value; - } - inline bool getVAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMinFilterRoundingEnable); - } - inline void setVAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMagFilterRoundingEnable = value; - } - inline bool getVAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMagFilterRoundingEnable); - } - inline void setUAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMinFilterRoundingEnable = value; - } - inline bool getUAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMinFilterRoundingEnable); - } - inline void setUAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMagFilterRoundingEnable = value; - } - inline bool getUAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMagFilterRoundingEnable); - } - inline void setMaximumAnisotropy(const MAXIMUM_ANISOTROPY value) { - TheStructure.Common.MaximumAnisotropy = value; - } - inline MAXIMUM_ANISOTROPY getMaximumAnisotropy() const { - return static_cast(TheStructure.Common.MaximumAnisotropy); - } -} SAMPLER_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_STATE)); - -typedef struct tagSTATE_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t GeneralStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t GeneralStateMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(4, 5); - uint64_t GeneralStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(6, 6); - uint64_t GeneralStateMemoryObjectControlState_TargetCache : BITFIELD_RANGE(7, 8); - uint64_t GeneralStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(9, 10); - uint64_t Reserved_43 : BITFIELD_RANGE(11, 11); - uint64_t GeneralStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 15); - uint32_t StatelessDataPortAccessMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(16, 17); - uint32_t StatelessDataPortAccessMemoryObjectControlState_Reserved : BITFIELD_RANGE(18, 18); - uint32_t StatelessDataPortAccessMemoryObjectControlState_TargetCache : BITFIELD_RANGE(19, 20); - uint32_t StatelessDataPortAccessMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(21, 22); - uint32_t Reserved_119 : BITFIELD_RANGE(23, 31); - uint64_t SurfaceStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_129 : BITFIELD_RANGE(1, 3); - uint64_t SurfaceStateMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(4, 5); - uint64_t SurfaceStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(6, 6); - uint64_t SurfaceStateMemoryObjectControlState_TargetCache : BITFIELD_RANGE(7, 8); - uint64_t SurfaceStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(9, 10); - uint64_t Reserved_139 : BITFIELD_RANGE(11, 11); - uint64_t SurfaceStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t DynamicStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_193 : BITFIELD_RANGE(1, 3); - uint64_t DynamicStateMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(4, 5); - uint64_t DynamicStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(6, 6); - uint64_t DynamicStateMemoryObjectControlState_TargetCache : BITFIELD_RANGE(7, 8); - uint64_t DynamicStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(9, 10); - uint64_t Reserved_203 : BITFIELD_RANGE(11, 11); - uint64_t DynamicStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t IndirectObjectBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_257 : BITFIELD_RANGE(1, 3); - uint64_t IndirectObjectMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(4, 5); - uint64_t IndirectObjectMemoryObjectControlState_Reserved : BITFIELD_RANGE(6, 6); - uint64_t IndirectObjectMemoryObjectControlState_TargetCache : BITFIELD_RANGE(7, 8); - uint64_t IndirectObjectMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(9, 10); - uint64_t Reserved_267 : BITFIELD_RANGE(11, 11); - uint64_t IndirectObjectBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t InstructionBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_321 : BITFIELD_RANGE(1, 3); - uint64_t InstructionMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(4, 5); - uint64_t InstructionMemoryObjectControlState_Reserved : BITFIELD_RANGE(6, 6); - uint64_t InstructionMemoryObjectControlState_TargetCache : BITFIELD_RANGE(7, 8); - uint64_t InstructionMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(9, 10); - uint64_t Reserved_331 : BITFIELD_RANGE(11, 11); - uint64_t InstructionBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t GeneralStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_385 : BITFIELD_RANGE(1, 11); - uint32_t GeneralStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t DynamicStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_417 : BITFIELD_RANGE(1, 11); - uint32_t DynamicStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t IndirectObjectBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_449 : BITFIELD_RANGE(1, 11); - uint32_t IndirectObjectBufferSize : BITFIELD_RANGE(12, 31); - uint32_t InstructionBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_481 : BITFIELD_RANGE(1, 11); - uint32_t InstructionBufferSize : BITFIELD_RANGE(12, 31); - } Common; - uint32_t RawData[16]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0xe, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS = 0x1, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GENERALSTATEBASEADDRESS_BYTEOFFSET = 0x4, - GENERALSTATEBASEADDRESS_INDEX = 0x1, - SURFACESTATEBASEADDRESS_BYTEOFFSET = 0x10, - SURFACESTATEBASEADDRESS_INDEX = 0x4, - DYNAMICSTATEBASEADDRESS_BYTEOFFSET = 0x18, - DYNAMICSTATEBASEADDRESS_INDEX = 0x6, - INDIRECTOBJECTBASEADDRESS_BYTEOFFSET = 0x20, - INDIRECTOBJECTBASEADDRESS_INDEX = 0x8, - INSTRUCTIONBASEADDRESS_BYTEOFFSET = 0x28, - INSTRUCTIONBASEADDRESS_INDEX = 0xa, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_BASE_ADDRESS sInit() { - STATE_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 16); - return TheStructure.RawData[index]; - } - inline void setGeneralStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBaseAddressModifyEnable = value; - } - inline bool getGeneralStateBaseAddressModifyEnable() const { - return (TheStructure.Common.GeneralStateBaseAddressModifyEnable); - } - inline void setGeneralStateMemoryObjectControlStateAgeForQuadlru(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_AgeForQuadlru); - } - inline void setGeneralStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); - } - inline void setGeneralStateMemoryObjectControlStateTargetCache(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_TargetCache = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_TargetCache); - } - inline void setGeneralStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - typedef enum tagGENERALSTATEBASEADDRESS { - GENERALSTATEBASEADDRESS_BIT_SHIFT = 0xc, - GENERALSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } GENERALSTATEBASEADDRESS; - inline void setGeneralStateBaseAddress(const uint64_t value) { - TheStructure.Common.GeneralStateBaseAddress = value >> GENERALSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getGeneralStateBaseAddress() const { - return (TheStructure.Common.GeneralStateBaseAddress << GENERALSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateAgeForQuadlru(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_AgeForQuadlru); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateTargetCache(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_TargetCache = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_TargetCache); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_AgeForQuadlru = value; - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = (value >> 2); - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_TargetCache = (value >> 3); - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = (value >> 5); - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlState() const { - int32_t mocs = TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_AgeForQuadlru; - mocs |= (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved << 2); - mocs |= (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_TargetCache << 3); - mocs |= (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl << 5); - return (mocs); - } - inline void setSurfaceStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.SurfaceStateBaseAddressModifyEnable = value; - } - inline bool getSurfaceStateBaseAddressModifyEnable() const { - return (TheStructure.Common.SurfaceStateBaseAddressModifyEnable); - } - inline void setSurfaceStateMemoryObjectControlStateAgeForQuadlru(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_AgeForQuadlru); - } - inline void setSurfaceStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); - } - inline void setSurfaceStateMemoryObjectControlStateTargetCache(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_TargetCache = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_TargetCache); - } - inline void setSurfaceStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - typedef enum tagSURFACESTATEBASEADDRESS { - SURFACESTATEBASEADDRESS_BIT_SHIFT = 0xc, - SURFACESTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } SURFACESTATEBASEADDRESS; - inline void setSurfaceStateBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceStateBaseAddress = value >> SURFACESTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getSurfaceStateBaseAddress() const { - return (TheStructure.Common.SurfaceStateBaseAddress << SURFACESTATEBASEADDRESS_BIT_SHIFT); - } - inline void setDynamicStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBaseAddressModifyEnable = value; - } - inline bool getDynamicStateBaseAddressModifyEnable() const { - return (TheStructure.Common.DynamicStateBaseAddressModifyEnable); - } - inline void setDynamicStateMemoryObjectControlStateAgeForQuadlru(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_AgeForQuadlru); - } - inline void setDynamicStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); - } - inline void setDynamicStateMemoryObjectControlStateTargetCache(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_TargetCache = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_TargetCache); - } - inline void setDynamicStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - typedef enum tagDYNAMICSTATEBASEADDRESS { - DYNAMICSTATEBASEADDRESS_BIT_SHIFT = 0xc, - DYNAMICSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } DYNAMICSTATEBASEADDRESS; - inline void setDynamicStateBaseAddress(const uint64_t value) { - TheStructure.Common.DynamicStateBaseAddress = value >> DYNAMICSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getDynamicStateBaseAddress() const { - return (TheStructure.Common.DynamicStateBaseAddress << DYNAMICSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setIndirectObjectBaseAddressModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBaseAddressModifyEnable = value; - } - inline bool getIndirectObjectBaseAddressModifyEnable() const { - return (TheStructure.Common.IndirectObjectBaseAddressModifyEnable); - } - inline void setIndirectObjectMemoryObjectControlStateAgeForQuadlru(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_AgeForQuadlru); - } - inline void setIndirectObjectMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); - } - inline void setIndirectObjectMemoryObjectControlStateTargetCache(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_TargetCache = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_TargetCache); - } - inline void setIndirectObjectMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - typedef enum tagINDIRECTOBJECTBASEADDRESS { - INDIRECTOBJECTBASEADDRESS_BIT_SHIFT = 0xc, - INDIRECTOBJECTBASEADDRESS_ALIGN_SIZE = 0x1000, - } INDIRECTOBJECTBASEADDRESS; - inline void setIndirectObjectBaseAddress(const uint64_t value) { - TheStructure.Common.IndirectObjectBaseAddress = value >> INDIRECTOBJECTBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getIndirectObjectBaseAddress() const { - return (TheStructure.Common.IndirectObjectBaseAddress << INDIRECTOBJECTBASEADDRESS_BIT_SHIFT); - } - inline void setInstructionBaseAddressModifyEnable(const bool value) { - TheStructure.Common.InstructionBaseAddressModifyEnable = value; - } - inline bool getInstructionBaseAddressModifyEnable() const { - return (TheStructure.Common.InstructionBaseAddressModifyEnable); - } - inline void setInstructionMemoryObjectControlStateAgeForQuadlru(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint64_t getInstructionMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru); - } - inline void setInstructionMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = value; - } - inline uint64_t getInstructionMemoryObjectControlStateReserved() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); - } - inline void setInstructionMemoryObjectControlStateTargetCache(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_TargetCache = value; - } - inline uint64_t getInstructionMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_TargetCache); - } - inline void setInstructionMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint64_t getInstructionMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - typedef enum tagINSTRUCTIONBASEADDRESS { - INSTRUCTIONBASEADDRESS_BIT_SHIFT = 0xc, - INSTRUCTIONBASEADDRESS_ALIGN_SIZE = 0x1000, - } INSTRUCTIONBASEADDRESS; - inline void setInstructionBaseAddress(const uint64_t value) { - TheStructure.Common.InstructionBaseAddress = value >> INSTRUCTIONBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getInstructionBaseAddress() const { - return (TheStructure.Common.InstructionBaseAddress << INSTRUCTIONBASEADDRESS_BIT_SHIFT); - } - inline void setGeneralStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBufferSizeModifyEnable = value; - } - inline bool getGeneralStateBufferSizeModifyEnable() const { - return (TheStructure.Common.GeneralStateBufferSizeModifyEnable); - } - inline void setGeneralStateBufferSize(const uint32_t value) { - TheStructure.Common.GeneralStateBufferSize = value; - } - inline uint32_t getGeneralStateBufferSize() const { - return (TheStructure.Common.GeneralStateBufferSize); - } - inline void setDynamicStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBufferSizeModifyEnable = value; - } - inline bool getDynamicStateBufferSizeModifyEnable() const { - return (TheStructure.Common.DynamicStateBufferSizeModifyEnable); - } - inline void setDynamicStateBufferSize(const uint32_t value) { - TheStructure.Common.DynamicStateBufferSize = value; - } - inline uint32_t getDynamicStateBufferSize() const { - return (TheStructure.Common.DynamicStateBufferSize); - } - inline void setIndirectObjectBufferSizeModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBufferSizeModifyEnable = value; - } - inline bool getIndirectObjectBufferSizeModifyEnable() const { - return (TheStructure.Common.IndirectObjectBufferSizeModifyEnable); - } - inline void setIndirectObjectBufferSize(const uint32_t value) { - TheStructure.Common.IndirectObjectBufferSize = value; - } - inline uint32_t getIndirectObjectBufferSize() const { - return (TheStructure.Common.IndirectObjectBufferSize); - } - inline void setInstructionBufferSizeModifyEnable(const bool value) { - TheStructure.Common.InstructionBufferSizeModifyEnable = value; - } - inline bool getInstructionBufferSizeModifyEnable() const { - return (TheStructure.Common.InstructionBufferSizeModifyEnable); - } - inline void setInstructionBufferSize(const uint32_t value) { - TheStructure.Common.InstructionBufferSize = value; - } - inline uint32_t getInstructionBufferSize() const { - return (TheStructure.Common.InstructionBufferSize); - } - inline void setInstructionMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru = value; - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = (value >> 2); - TheStructure.Common.InstructionMemoryObjectControlState_TargetCache = (value >> 3); - TheStructure.Common.InstructionMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = (value >> 5); - } - inline uint32_t getInstructionMemoryObjectControlState() const { - int32_t mocs = TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru; - mocs |= (TheStructure.Common.InstructionMemoryObjectControlState_Reserved << 2); - mocs |= (TheStructure.Common.InstructionMemoryObjectControlState_TargetCache << 3); - mocs |= (TheStructure.Common.InstructionMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl << 5); - return (mocs); - } -} STATE_BASE_ADDRESS; -STATIC_ASSERT(64 == sizeof(STATE_BASE_ADDRESS)); - -typedef struct tagMI_REPORT_PERF_COUNT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t UseGlobalGtt : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t CoreModeEnable : BITFIELD_RANGE(4, 4); - uint64_t Reserved_37 : BITFIELD_RANGE(5, 5); - uint64_t MemoryAddress : BITFIELD_RANGE(6, 63); - uint32_t ReportId; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT = 0x28, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_REPORT_PERF_COUNT sInit() { - MI_REPORT_PERF_COUNT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - inline void setCoreModeEnable(const uint64_t value) { - TheStructure.Common.CoreModeEnable = value; - } - inline uint64_t getCoreModeEnable() const { - return (TheStructure.Common.CoreModeEnable); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x6, - MEMORYADDRESS_ALIGN_SIZE = 0x40, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setReportId(const uint32_t value) { - TheStructure.Common.ReportId = value; - } - inline uint32_t getReportId() const { - return (TheStructure.Common.ReportId); - } -} MI_REPORT_PERF_COUNT; -STATIC_ASSERT(16 == sizeof(MI_REPORT_PERF_COUNT)); - -struct MI_USER_INTERRUPT { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MICommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - enum MI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_USER_INTERRUPT = 2, - }; - enum COMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0, - }; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MICommandOpcode = MI_COMMAND_OPCODE_MI_USER_INTERRUPT; - } - static MI_USER_INTERRUPT sInit() { - MI_USER_INTERRUPT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - return TheStructure.RawData[index]; - } -}; -STATIC_ASSERT(4 == sizeof(MI_USER_INTERRUPT)); - -typedef struct tagMI_FLUSH_DW { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 16); - uint32_t Reserved_17 : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t Reserved_19 : BITFIELD_RANGE(19, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_22 : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - // DWORD 1-2 - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t DestinationAddressType : BITFIELD_RANGE(2, 2); - uint64_t DestinationAddress : BITFIELD_RANGE(3, 47); - uint64_t Reserved_80 : BITFIELD_RANGE(48, 63); - // DWORD 3-4 - uint64_t ImmediateData; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x3, - } DWORD_LENGTH; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD = 0x1, - POST_SYNC_OPERATION_WRITE_TIMESTAMP_REGISTER = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_FLUSH_DW = 0x26, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_FLUSH_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagMI_FLUSH_DW sInit() { - MI_FLUSH_DW state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return TheStructure.Common.NotifyEnable; - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setTlbInvalidate(const bool value) { - TheStructure.Common.TlbInvalidate = value; - } - inline bool getTlbInvalidate() const { - return TheStructure.Common.TlbInvalidate; - } - inline void setStoreDataIndex(const bool value) { - TheStructure.Common.StoreDataIndex = value; - } - inline bool getStoreDataIndex() const { - return TheStructure.Common.StoreDataIndex; - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - typedef enum tagDESTINATIONADDRESS { - DESTINATIONADDRESS_BIT_SHIFT = 0x3, - DESTINATIONADDRESS_ALIGN_SIZE = 0x8, - } DESTINATIONADDRESS; - inline void setDestinationAddress(const uint64_t value) { - UNRECOVERABLE_IF(value > 0xfffffffffff8L); - TheStructure.Common.DestinationAddress = value >> DESTINATIONADDRESS_BIT_SHIFT; - } - inline uint64_t getDestinationAddress() const { - return TheStructure.Common.DestinationAddress << DESTINATIONADDRESS_BIT_SHIFT; - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return TheStructure.Common.ImmediateData; - } -} MI_FLUSH_DW; -STATIC_ASSERT(20 == sizeof(MI_FLUSH_DW)); - -typedef struct tagXY_SRC_COPY_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 14); - uint32_t SrcTilingEnable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4-5 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SourceX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t SourceY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 7 - uint32_t SourcePitch : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - // DWORD 8-9 - uint64_t SourceBaseAddress; - } Common; - uint32_t RawData[10]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tagSRC_TILING_ENABLE { - SRC_TILING_ENABLE_TILING_DISABLED_LINEAR = 0x0, - SRC_TILING_ENABLE_TILING_ENABLED = 0x1, - } SRC_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x53, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x8, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.SrcTilingEnable = SRC_TILING_ENABLE_TILING_DISABLED_LINEAR; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xCC; - } - static tagXY_SRC_COPY_BLT sInit() { - XY_SRC_COPY_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void setSrcTilingEnable(const SRC_TILING_ENABLE value) { - TheStructure.Common.SrcTilingEnable = value; - } - inline SRC_TILING_ENABLE getSrcTilingEnable() const { - return static_cast(TheStructure.Common.SrcTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setSourceX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourceX1Coordinate_Left = value; - } - inline uint32_t getSourceX1CoordinateLeft() const { - return TheStructure.Common.SourceX1Coordinate_Left; - } - inline void setSourceY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.SourceY1Coordinate_Top = value; - } - inline uint32_t getSourceY1CoordinateTop() const { - return TheStructure.Common.SourceY1Coordinate_Top; - } - inline void setSourcePitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourcePitch = value; - } - inline uint32_t getSourcePitch() const { - return TheStructure.Common.SourcePitch; - } - inline void setSourceBaseAddress(const uint64_t value) { - TheStructure.Common.SourceBaseAddress = value; - } - inline uint64_t getSourceBaseAddress() const { - return TheStructure.Common.SourceBaseAddress; - } -} XY_SRC_COPY_BLT; -STATIC_ASSERT(40 == sizeof(XY_SRC_COPY_BLT)); - -typedef struct tagXY_COLOR_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4-5 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SolidPaternColor; - } Common; - uint32_t RawData[7]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - _32BPP_BYTE_MASK_WRITE_RGBA_CHANNEL = 0x3 - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x50, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x5, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xF0; - } - static tagXY_COLOR_BLT sInit() { - XY_COLOR_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setFillColor(const uint32_t *value) { - TheStructure.Common.SolidPaternColor = *value; - } -} XY_COLOR_BLT; -STATIC_ASSERT(28 == sizeof(XY_COLOR_BLT)); - -typedef struct tagGRF { - union tagTheStructure { - float fRegs[8]; - uint32_t dwRegs[8]; - uint16_t wRegs[16]; - uint32_t RawData[8]; - } TheStructure; -} GRF; -STATIC_ASSERT(32 == sizeof(GRF)); - -typedef struct tagMEDIA_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0; - uint32_t Cr_VCb_UPixelOffsetVDirection : BITFIELD_RANGE(0, 1); - uint32_t PictureStructure : BITFIELD_RANGE(2, 3); - uint32_t Width : BITFIELD_RANGE(4, 17); - uint32_t Height : BITFIELD_RANGE(18, 31); - uint32_t TileMode : BITFIELD_RANGE(0, 1); - uint32_t HalfPitchForChroma : BITFIELD_RANGE(2, 2); - uint32_t SurfacePitch : BITFIELD_RANGE(3, 20); - uint32_t AddressControl : BITFIELD_RANGE(21, 21); - uint32_t Reserved_86 : BITFIELD_RANGE(22, 25); - uint32_t InterleaveChroma : BITFIELD_RANGE(26, 26); - uint32_t SurfaceFormat : BITFIELD_RANGE(27, 31); - uint32_t YOffsetForU_Cb : BITFIELD_RANGE(0, 13); - uint32_t Reserved_110 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForU_Cb : BITFIELD_RANGE(16, 29); - uint32_t Reserved_126 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_128; - uint32_t SurfaceMemoryObjectControlState_AgeForQuadlru : BITFIELD_RANGE(0, 1); - uint32_t SurfaceMemoryObjectControlState_Reserved : BITFIELD_RANGE(2, 2); - uint32_t SurfaceMemoryObjectControlState_TargetCache : BITFIELD_RANGE(3, 4); - uint32_t SurfaceMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl : BITFIELD_RANGE(5, 6); - uint32_t Reserved_167 : BITFIELD_RANGE(7, 29); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(30, 30); - uint32_t VerticalLineStride : BITFIELD_RANGE(31, 31); - uint32_t SurfaceBaseAddressLow; - uint32_t SurfaceBaseAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - } Common; - struct tag_SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t YOffsetForV_Cr : BITFIELD_RANGE(0, 14); - uint32_t Reserved_143 : BITFIELD_RANGE(15, 15); - uint32_t XOffsetForV_Cr : BITFIELD_RANGE(16, 29); - uint32_t Reserved_158 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } _SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagPICTURE_STRUCTURE { - PICTURE_STRUCTURE_FRAME_PICTURE = 0x0, - PICTURE_STRUCTURE_TOP_FIELD_PICTURE = 0x1, - PICTURE_STRUCTURE_BOTTOM_FIELD_PICTURE = 0x2, - PICTURE_STRUCTURE_INVALID_NOT_ALLOWED = 0x3, - } PICTURE_STRUCTURE; - typedef enum tagTILE_MODE { - TILE_MODE_TILEMODE_LINEAR = 0x0, - TILE_MODE_TILEMODE_XMAJOR = 0x2, - TILE_MODE_TILEMODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagADDRESS_CONTROL { - ADDRESS_CONTROL_CLAMP = 0x0, - ADDRESS_CONTROL_MIRROR = 0x1, - } ADDRESS_CONTROL; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_YCRCB_NORMAL = 0x0, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x1, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x2, - SURFACE_FORMAT_YCRCB_SWAPY = 0x3, - SURFACE_FORMAT_PLANAR_420_8 = 0x4, - SURFACE_FORMAT_Y8_UNORM_VA = 0x5, - SURFACE_FORMAT_Y16_SNORM = 0x6, - SURFACE_FORMAT_Y16_UNORM_VA = 0x7, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0x8, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0x9, - SURFACE_FORMAT_R8B8_UNORM_CRCB = 0xa, - SURFACE_FORMAT_R8_UNORM_CR_CB = 0xb, - SURFACE_FORMAT_Y8_UNORM = 0xc, - SURFACE_FORMAT_A8Y8U8V8_UNORM = 0xd, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xe, - SURFACE_FORMAT_R16G16B16A16 = 0xf, - SURFACE_FORMAT_Y1_UNORM = 0x10, - SURFACE_FORMAT_Y32_UNORM = 0x11, - } SURFACE_FORMAT; - typedef enum tagSURFACE_MEMORY_OBJECT_CONTROL_STATE { - SURFACE_MEMORY_OBJECT_CONTROL_STATE_DEFAULTVAUEDESC = 0x0, - } SURFACE_MEMORY_OBJECT_CONTROL_STATE; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x18, - SURFACEBASEADDRESS_INDEX = 0x6, - SURFACEBASEADDRESSHIGH_BYTEOFFSET = 0x1c, - SURFACEBASEADDRESSHIGH_INDEX = 0x7, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.PictureStructure = PICTURE_STRUCTURE_FRAME_PICTURE; - TheStructure.Common.TileMode = TILE_MODE_TILEMODE_LINEAR; - TheStructure.Common.AddressControl = ADDRESS_CONTROL_CLAMP; - TheStructure.Common.SurfaceFormat = SURFACE_FORMAT_YCRCB_NORMAL; - } - static tagMEDIA_SURFACE_STATE sInit() { - MEDIA_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - inline void setCrVCbUPixelOffsetVDirection(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetVDirection = value; - } - inline uint32_t getCrVCbUPixelOffsetVDirection() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirection); - } - inline void setPictureStructure(const PICTURE_STRUCTURE value) { - TheStructure.Common.PictureStructure = value; - } - inline PICTURE_STRUCTURE getPictureStructure() const { - return static_cast(TheStructure.Common.PictureStructure); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setHalfPitchForChroma(const bool value) { - TheStructure.Common.HalfPitchForChroma = value; - } - inline bool getHalfPitchForChroma() const { - return (TheStructure.Common.HalfPitchForChroma); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setAddressControl(const ADDRESS_CONTROL value) { - TheStructure.Common.AddressControl = value; - } - inline ADDRESS_CONTROL getAddressControl() const { - return static_cast(TheStructure.Common.AddressControl); - } - inline void setInterleaveChroma(const bool value) { - TheStructure.Common.InterleaveChroma = value; - } - inline bool getInterleaveChroma() const { - return (TheStructure.Common.InterleaveChroma); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setYOffsetForUCb(const uint32_t value) { - TheStructure.Common.YOffsetForU_Cb = value; - } - inline uint32_t getYOffsetForUCb() const { - return (TheStructure.Common.YOffsetForU_Cb); - } - inline void setXOffsetForUCb(const uint32_t value) { - TheStructure.Common.XOffsetForU_Cb = value; - } - inline uint32_t getXOffsetForUCb() const { - return (TheStructure.Common.XOffsetForU_Cb); - } - inline void setSurfaceMemoryObjectControlStateAgeForQuadlru(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_AgeForQuadlru = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateAgeForQuadlru() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_AgeForQuadlru); - } - inline void setSurfaceMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_Reserved = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); - } - inline void setSurfaceMemoryObjectControlStateTargetCache(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_TargetCache = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateTargetCache() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_TargetCache); - } - inline void setSurfaceMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateMemoryTypeLlcEllcCacheabilityControl() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_MemoryTypeLlcEllcCacheabilityControl); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddressLow = static_cast(value); - TheStructure.Common.SurfaceBaseAddressHigh = value >> 32; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddressLow | - static_cast(TheStructure.Common.SurfaceBaseAddressHigh) << 32); - } - inline void setSurfaceBaseAddressHigh(const uint32_t value) { - TheStructure.Common.SurfaceBaseAddressHigh = value; - } - inline uint32_t getSurfaceBaseAddressHigh() const { - return (TheStructure.Common.SurfaceBaseAddressHigh); - } - inline void setYOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr = value; - } - inline uint32_t getYOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr); - } - inline void setXOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr = value; - } - inline uint32_t getXOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr); - } -} MEDIA_SURFACE_STATE; -STATIC_ASSERT(32 == sizeof(MEDIA_SURFACE_STATE)); - -typedef struct tagMI_MATH { - union _DW0 { - struct _BitField { - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved : BITFIELD_RANGE(6, 22); - uint32_t InstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t InstructionType : BITFIELD_RANGE(29, 31); - } BitField; - uint32_t Value; - } DW0; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_MATH = 0x1A, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; -} MI_MATH; -typedef struct tagMI_MATH_ALU_INST_INLINE { - union _DW0 { - struct _BitField { - uint32_t Operand2 : BITFIELD_RANGE(0, 9); - uint32_t Operand1 : BITFIELD_RANGE(10, 19); - uint32_t ALUOpcode : BITFIELD_RANGE(20, 31); - } BitField; - uint32_t Value; - } DW0; -} MI_MATH_ALU_INST_INLINE; -typedef struct tagMI_SEMAPHORE_WAIT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 11); - uint32_t CompareOperation : BITFIELD_RANGE(12, 14); - uint32_t WaitMode : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t SemaphoreDataDword; - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t SemaphoreAddress_Graphicsaddress : BITFIELD_RANGE(2, 47); - uint64_t SemaphoreAddress_Reserved : BITFIELD_RANGE(48, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagCOMPARE_OPERATION { - COMPARE_OPERATION_SAD_GREATER_THAN_SDD = 0x0, - COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD = 0x1, - COMPARE_OPERATION_SAD_LESS_THAN_SDD = 0x2, - COMPARE_OPERATION_SAD_LESS_THAN_OR_EQUAL_SDD = 0x3, - COMPARE_OPERATION_SAD_EQUAL_SDD = 0x4, - COMPARE_OPERATION_SAD_NOT_EQUAL_SDD = 0x5, - } COMPARE_OPERATION; - typedef enum tagWAIT_MODE { - WAIT_MODE_SIGNAL_MODE = 0x0, - WAIT_MODE_POLLING_MODE = 0x1, - } WAIT_MODE; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT = 0x1c, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.CompareOperation = COMPARE_OPERATION_SAD_GREATER_THAN_SDD; - TheStructure.Common.WaitMode = WAIT_MODE_SIGNAL_MODE; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_SEMAPHORE_WAIT sInit() { - MI_SEMAPHORE_WAIT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setCompareOperation(const COMPARE_OPERATION value) { - TheStructure.Common.CompareOperation = value; - } - inline COMPARE_OPERATION getCompareOperation() const { - return static_cast(TheStructure.Common.CompareOperation); - } - inline void setWaitMode(const WAIT_MODE value) { - TheStructure.Common.WaitMode = value; - } - inline WAIT_MODE getWaitMode() const { - return static_cast(TheStructure.Common.WaitMode); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - inline void setSemaphoreDataDword(const uint32_t value) { - TheStructure.Common.SemaphoreDataDword = value; - } - inline uint32_t getSemaphoreDataDword() const { - return (TheStructure.Common.SemaphoreDataDword); - } - typedef enum tagSEMAPHOREADDRESS_GRAPHICSADDRESS { - SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_GRAPHICSADDRESS_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_GRAPHICSADDRESS; - inline void setSemaphoreGraphicsAddress(const uint64_t value) { - TheStructure.Common.SemaphoreAddress_Graphicsaddress = value >> SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT; - } - inline uint64_t getSemaphoreGraphicsAddress() const { - return (TheStructure.Common.SemaphoreAddress_Graphicsaddress << SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT); - } - typedef enum tagSEMAPHOREADDRESS_RESERVED { - SEMAPHOREADDRESS_RESERVED_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_RESERVED; - inline void setSemaphoreAddressReserved(const uint64_t value) { - TheStructure.Common.SemaphoreAddress_Reserved = value >> SEMAPHOREADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getSemaphoreAddressReserved() const { - return (TheStructure.Common.SemaphoreAddress_Reserved << SEMAPHOREADDRESS_RESERVED_BIT_SHIFT); - } -} MI_SEMAPHORE_WAIT; -STATIC_ASSERT(16 == sizeof(MI_SEMAPHORE_WAIT)); - -typedef struct tagMI_STORE_DATA_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 20); - uint32_t StoreQword : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t Address : BITFIELD_RANGE(2, 31); - uint32_t AddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t DataDword0; - uint32_t DataDword1; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x0, - DWORD_LENGTH_STORE_DWORD = 0x2, - DWORD_LENGTH_STORE_QWORD = 0x3, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_DATA_IMM = 0x20, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - ADDRESS_BYTEOFFSET = 0x4, - ADDRESS_INDEX = 0x1, - ADDRESSHIGH_BYTEOFFSET = 0x8, - ADDRESSHIGH_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_STORE_DWORD; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_DATA_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_DATA_IMM sInit() { - MI_STORE_DATA_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setStoreQword(const bool value) { - TheStructure.Common.StoreQword = value; - } - inline bool getStoreQword() const { - return TheStructure.Common.StoreQword; - } - inline void setUseGlobalGtt(const uint32_t value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline uint32_t getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagADDRESS { - ADDRESS_BIT_SHIFT = 0x2, - ADDRESS_ALIGN_SIZE = 0x4, - } ADDRESS; - inline void setAddress(const uint64_t value) { - setAddressLow(static_cast(value & 0x0000FFFFFFFFULL)); - setAddressHigh(static_cast(value >> 32)); - } - inline uint64_t getAddress() const { - return (static_cast(getAddressHigh()) << 32) | static_cast(getAddressLow()); - } - inline void setAddressLow(const uint32_t value) { - TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT; - } - inline uint32_t getAddressLow() const { - return (TheStructure.Common.Address << ADDRESS_BIT_SHIFT); - } - inline void setAddressHigh(const uint32_t value) { - TheStructure.Common.AddressHigh = value; - } - inline uint32_t getAddressHigh() const { - return (TheStructure.Common.AddressHigh); - } - inline void setDataDword0(const uint32_t value) { - TheStructure.Common.DataDword0 = value; - } - inline uint32_t getDataDword0() const { - return (TheStructure.Common.DataDword0); - } - inline void setDataDword1(const uint32_t value) { - TheStructure.Common.DataDword1 = value; - } - inline uint32_t getDataDword1() const { - return (TheStructure.Common.DataDword1); - } -} MI_STORE_DATA_IMM; -STATIC_ASSERT(20 == sizeof(MI_STORE_DATA_IMM)); - -typedef struct tagSTATE_SIP { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 3); - uint64_t SystemInstructionPointer : BITFIELD_RANGE(4, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_SIP = 0x2, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - SYSTEMINSTRUCTIONPOINTER_BYTEOFFSET = 0x4, - SYSTEMINSTRUCTIONPOINTER_INDEX = 0x1, - } PATCH_CONSTANTS; - void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_SIP; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_SIP sInit() { - STATE_SIP state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagSYSTEMINSTRUCTIONPOINTER { - SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT = 0x4, - SYSTEMINSTRUCTIONPOINTER_ALIGN_SIZE = 0x10, - } SYSTEMINSTRUCTIONPOINTER; - inline uint64_t getSystemInstructionPointer() const { - return (uint64_t)TheStructure.Common.SystemInstructionPointer << SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } - inline void setSystemInstructionPointer(uint64_t value) { - TheStructure.Common.SystemInstructionPointer = value >> SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } -} STATE_SIP; -STATIC_ASSERT(12 == sizeof(STATE_SIP)); - -typedef struct tagGPGPU_CSR_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 11); - uint64_t GpgpuCsrBaseAddress : BITFIELD_RANGE(12, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_UNNAMED_1 = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GPGPUCSRBASEADDRESS_BYTEOFFSET = 0x4, - GPGPUCSRBASEADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_UNNAMED_1; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagGPGPU_CSR_BASE_ADDRESS sInit() { - GPGPU_CSR_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagGPGPUCSRBASEADDRESS { - GPGPUCSRBASEADDRESS_BIT_SHIFT = 0xC, - GPGPUCSRBASEADDRESS_ALIGN_SIZE = 0x1000, - } GPGPUCSRBASEADDRESS; - inline uint64_t getGpgpuCsrBaseAddress() const { - return (uint64_t)TheStructure.Common.GpgpuCsrBaseAddress << GPGPUCSRBASEADDRESS_BIT_SHIFT; - } - inline void setGpgpuCsrBaseAddress(uint64_t value) { - TheStructure.Common.GpgpuCsrBaseAddress = value >> GPGPUCSRBASEADDRESS_BIT_SHIFT; - } -} GPGPU_CSR_BASE_ADDRESS; -STATIC_ASSERT(12 == sizeof(GPGPU_CSR_BASE_ADDRESS)); - -typedef struct tagSAMPLER_BORDER_COLOR_STATE { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - float BorderColorRed; - // DWORD 1 - float BorderColorGreen; - // DWORD 2 - float BorderColorBlue; - // DWORD 3 - float BorderColorAlpha; - } Common; - uint32_t RawData[4]; - } TheStructure; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.BorderColorRed = 0.0; - TheStructure.Common.BorderColorGreen = 0.0; - TheStructure.Common.BorderColorBlue = 0.0; - TheStructure.Common.BorderColorAlpha = 0.0; - } - static tagSAMPLER_BORDER_COLOR_STATE sInit() { - SAMPLER_BORDER_COLOR_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setBorderColorRed(const float value) { - TheStructure.Common.BorderColorRed = value; - } - inline float getBorderColorRed() const { - return TheStructure.Common.BorderColorRed; - } - inline void setBorderColorGreen(const float value) { - TheStructure.Common.BorderColorGreen = value; - } - inline float getBorderColorGreen() const { - return TheStructure.Common.BorderColorGreen; - } - inline void setBorderColorBlue(const float value) { - TheStructure.Common.BorderColorBlue = value; - } - inline float getBorderColorBlue() const { - return TheStructure.Common.BorderColorBlue; - } - inline void setBorderColorAlpha(const float value) { - TheStructure.Common.BorderColorAlpha = value; - } - inline float getBorderColorAlpha() const { - return TheStructure.Common.BorderColorAlpha; - } -} SAMPLER_BORDER_COLOR_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_BORDER_COLOR_STATE)); - -#pragma pack() diff --git a/shared/source/generated/gen9/hw_cmds_generated_gen9.inl b/shared/source/generated/gen9/hw_cmds_generated_gen9.inl deleted file mode 100644 index 2efc8eb635..0000000000 --- a/shared/source/generated/gen9/hw_cmds_generated_gen9.inl +++ /dev/null @@ -1,5089 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma pack(1) -typedef struct tagBINDING_TABLE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t SurfaceStatePointer : BITFIELD_RANGE(6, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPATCH_CONSTANTS { - SURFACESTATEPOINTER_BYTEOFFSET = 0x0, - SURFACESTATEPOINTER_INDEX = 0x0, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - } - static tagBINDING_TABLE_STATE sInit() { - BINDING_TABLE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline const uint32_t &getRawData(const uint32_t index) const { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - typedef enum tagSURFACESTATEPOINTER { - SURFACESTATEPOINTER_BIT_SHIFT = 0x6, - SURFACESTATEPOINTER_ALIGN_SIZE = 0x40, - } SURFACESTATEPOINTER; - inline void setSurfaceStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SurfaceStatePointer = (uint32_t)value >> SURFACESTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSurfaceStatePointer() const { - return (TheStructure.Common.SurfaceStatePointer << SURFACESTATEPOINTER_BIT_SHIFT); - } -} BINDING_TABLE_STATE; -STATIC_ASSERT(4 == sizeof(BINDING_TABLE_STATE)); - -typedef struct tagINTERFACE_DESCRIPTOR_DATA { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t KernelStartPointer : BITFIELD_RANGE(6, 31); - uint32_t KernelStartPointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_48 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 6); - uint32_t SoftwareExceptionEnable : BITFIELD_RANGE(7, 7); - uint32_t Reserved_72 : BITFIELD_RANGE(8, 10); - uint32_t MaskStackExceptionEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_76 : BITFIELD_RANGE(12, 12); - uint32_t IllegalOpcodeExceptionEnable : BITFIELD_RANGE(13, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t FloatingPointMode : BITFIELD_RANGE(16, 16); - uint32_t ThreadPriority : BITFIELD_RANGE(17, 17); - uint32_t SingleProgramFlow : BITFIELD_RANGE(18, 18); - uint32_t DenormMode : BITFIELD_RANGE(19, 19); - uint32_t Reserved_84 : BITFIELD_RANGE(20, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 1); - uint32_t SamplerCount : BITFIELD_RANGE(2, 4); - uint32_t SamplerStatePointer : BITFIELD_RANGE(5, 31); - uint32_t BindingTableEntryCount : BITFIELD_RANGE(0, 4); - uint32_t BindingTablePointer : BITFIELD_RANGE(5, 15); - uint32_t Reserved_144 : BITFIELD_RANGE(16, 31); - uint32_t ConstantUrbEntryReadOffset : BITFIELD_RANGE(0, 15); - uint32_t ConstantIndirectUrbEntryReadLength : BITFIELD_RANGE(16, 31); - uint32_t NumberOfThreadsInGpgpuThreadGroup : BITFIELD_RANGE(0, 9); - uint32_t Reserved_202 : BITFIELD_RANGE(10, 14); - uint32_t GlobalBarrierEnable : BITFIELD_RANGE(15, 15); - uint32_t SharedLocalMemorySize : BITFIELD_RANGE(16, 20); - uint32_t BarrierEnable : BITFIELD_RANGE(21, 21); - uint32_t RoundingMode : BITFIELD_RANGE(22, 23); - uint32_t Reserved_216 : BITFIELD_RANGE(24, 31); - uint32_t Cross_ThreadConstantDataReadLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_232 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagFLOATING_POINT_MODE { - FLOATING_POINT_MODE_IEEE_754 = 0x0, - FLOATING_POINT_MODE_ALTERNATE = 0x1, - } FLOATING_POINT_MODE; - typedef enum tagTHREAD_PRIORITY { - THREAD_PRIORITY_NORMAL_PRIORITY = 0x0, - THREAD_PRIORITY_HIGH_PRIORITY = 0x1, - } THREAD_PRIORITY; - typedef enum tagSINGLE_PROGRAM_FLOW { - SINGLE_PROGRAM_FLOW_MULTIPLE = 0x0, - SINGLE_PROGRAM_FLOW_SINGLE = 0x1, - } SINGLE_PROGRAM_FLOW; - typedef enum tagDENORM_MODE { - DENORM_MODE_FTZ = 0x0, - DENORM_MODE_SETBYKERNEL = 0x1, - } DENORM_MODE; - typedef enum tagSAMPLER_COUNT { - SAMPLER_COUNT_NO_SAMPLERS_USED = 0x0, - SAMPLER_COUNT_BETWEEN_1_AND_4_SAMPLERS_USED = 0x1, - SAMPLER_COUNT_BETWEEN_5_AND_8_SAMPLERS_USED = 0x2, - SAMPLER_COUNT_BETWEEN_9_AND_12_SAMPLERS_USED = 0x3, - SAMPLER_COUNT_BETWEEN_13_AND_16_SAMPLERS_USED = 0x4, - } SAMPLER_COUNT; - typedef enum tagSHARED_LOCAL_MEMORY_SIZE { - SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K = 0x0, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_1K = 0x1, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_2K = 0x2, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_4K = 0x3, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_8K = 0x4, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_16K = 0x5, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_32K = 0x6, - SHARED_LOCAL_MEMORY_SIZE_ENCODES_64K = 0x7, - } SHARED_LOCAL_MEMORY_SIZE; - typedef enum tagROUNDING_MODE { - ROUNDING_MODE_RTNE = 0x0, - ROUNDING_MODE_RU = 0x1, - ROUNDING_MODE_RD = 0x2, - ROUNDING_MODE_RTZ = 0x3, - } ROUNDING_MODE; - typedef enum tagPATCH_CONSTANTS { - KERNELSTARTPOINTER_BYTEOFFSET = 0x0, - KERNELSTARTPOINTER_INDEX = 0x0, - KERNELSTARTPOINTERHIGH_BYTEOFFSET = 0x4, - KERNELSTARTPOINTERHIGH_INDEX = 0x1, - SAMPLERSTATEPOINTER_BYTEOFFSET = 0xc, - SAMPLERSTATEPOINTER_INDEX = 0x3, - BINDINGTABLEPOINTER_BYTEOFFSET = 0x10, - BINDINGTABLEPOINTER_INDEX = 0x4, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.FloatingPointMode = FLOATING_POINT_MODE_IEEE_754; - TheStructure.Common.ThreadPriority = THREAD_PRIORITY_NORMAL_PRIORITY; - TheStructure.Common.SingleProgramFlow = SINGLE_PROGRAM_FLOW_MULTIPLE; - TheStructure.Common.DenormMode = DENORM_MODE_FTZ; - TheStructure.Common.SamplerCount = SAMPLER_COUNT_NO_SAMPLERS_USED; - TheStructure.Common.SharedLocalMemorySize = SHARED_LOCAL_MEMORY_SIZE_ENCODES_0K; - TheStructure.Common.RoundingMode = ROUNDING_MODE_RTNE; - } - static tagINTERFACE_DESCRIPTOR_DATA sInit() { - INTERFACE_DESCRIPTOR_DATA state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - typedef enum tagKERNELSTARTPOINTER { - KERNELSTARTPOINTER_BIT_SHIFT = 0x6, - KERNELSTARTPOINTER_ALIGN_SIZE = 0x40, - } KERNELSTARTPOINTER; - inline void setKernelStartPointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.KernelStartPointer = (uint32_t)value >> KERNELSTARTPOINTER_BIT_SHIFT; - } - inline uint32_t getKernelStartPointer() const { - return (TheStructure.Common.KernelStartPointer << KERNELSTARTPOINTER_BIT_SHIFT); - } - inline void setKernelStartPointerHigh(const uint32_t value) { - TheStructure.Common.KernelStartPointerHigh = value; - } - inline uint32_t getKernelStartPointerHigh() const { - return (TheStructure.Common.KernelStartPointerHigh); - } - inline void setSoftwareExceptionEnable(const bool value) { - TheStructure.Common.SoftwareExceptionEnable = value; - } - inline bool getSoftwareExceptionEnable() const { - return (TheStructure.Common.SoftwareExceptionEnable); - } - inline void setMaskStackExceptionEnable(const bool value) { - TheStructure.Common.MaskStackExceptionEnable = value; - } - inline bool getMaskStackExceptionEnable() const { - return (TheStructure.Common.MaskStackExceptionEnable); - } - inline void setIllegalOpcodeExceptionEnable(const bool value) { - TheStructure.Common.IllegalOpcodeExceptionEnable = value; - } - inline bool getIllegalOpcodeExceptionEnable() const { - return (TheStructure.Common.IllegalOpcodeExceptionEnable); - } - inline void setFloatingPointMode(const FLOATING_POINT_MODE value) { - TheStructure.Common.FloatingPointMode = value; - } - inline FLOATING_POINT_MODE getFloatingPointMode() const { - return static_cast(TheStructure.Common.FloatingPointMode); - } - inline void setThreadPriority(const THREAD_PRIORITY value) { - TheStructure.Common.ThreadPriority = value; - } - inline THREAD_PRIORITY getThreadPriority() const { - return static_cast(TheStructure.Common.ThreadPriority); - } - inline void setSingleProgramFlow(const SINGLE_PROGRAM_FLOW value) { - TheStructure.Common.SingleProgramFlow = value; - } - inline SINGLE_PROGRAM_FLOW getSingleProgramFlow() const { - return static_cast(TheStructure.Common.SingleProgramFlow); - } - inline void setDenormMode(const DENORM_MODE value) { - TheStructure.Common.DenormMode = value; - } - inline DENORM_MODE getDenormMode() const { - return static_cast(TheStructure.Common.DenormMode); - } - inline void setSamplerCount(const SAMPLER_COUNT value) { - TheStructure.Common.SamplerCount = value; - } - inline SAMPLER_COUNT getSamplerCount() const { - return static_cast(TheStructure.Common.SamplerCount); - } - typedef enum tagSAMPLERSTATEPOINTER { - SAMPLERSTATEPOINTER_BIT_SHIFT = 0x5, - SAMPLERSTATEPOINTER_ALIGN_SIZE = 0x20, - } SAMPLERSTATEPOINTER; - inline void setSamplerStatePointer(const uint64_t value) { - DEBUG_BREAK_IF(value >= 0x100000000); - TheStructure.Common.SamplerStatePointer = (uint32_t)value >> SAMPLERSTATEPOINTER_BIT_SHIFT; - } - inline uint32_t getSamplerStatePointer() const { - return (TheStructure.Common.SamplerStatePointer << SAMPLERSTATEPOINTER_BIT_SHIFT); - } - inline void setBindingTableEntryCount(const uint32_t value) { - TheStructure.Common.BindingTableEntryCount = value; - } - inline uint32_t getBindingTableEntryCount() const { - return (TheStructure.Common.BindingTableEntryCount); - } - typedef enum tagBINDINGTABLEPOINTER { - BINDINGTABLEPOINTER_BIT_SHIFT = 0x5, - BINDINGTABLEPOINTER_ALIGN_SIZE = 0x20, - } BINDINGTABLEPOINTER; - inline void setBindingTablePointer(const uint64_t value) { - DEBUG_BREAK_IF(value > 0xFFE0); - TheStructure.Common.BindingTablePointer = (uint32_t)value >> BINDINGTABLEPOINTER_BIT_SHIFT; - } - inline uint32_t getBindingTablePointer() const { - return (TheStructure.Common.BindingTablePointer << BINDINGTABLEPOINTER_BIT_SHIFT); - } - inline void setConstantUrbEntryReadOffset(const uint32_t value) { - TheStructure.Common.ConstantUrbEntryReadOffset = value; - } - inline uint32_t getConstantUrbEntryReadOffset() const { - return (TheStructure.Common.ConstantUrbEntryReadOffset); - } - inline void setConstantIndirectUrbEntryReadLength(const uint32_t value) { - TheStructure.Common.ConstantIndirectUrbEntryReadLength = value; - } - inline uint32_t getConstantIndirectUrbEntryReadLength() const { - return (TheStructure.Common.ConstantIndirectUrbEntryReadLength); - } - inline void setNumberOfThreadsInGpgpuThreadGroup(const uint32_t value) { - TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup = value; - } - inline uint32_t getNumberOfThreadsInGpgpuThreadGroup() const { - return (TheStructure.Common.NumberOfThreadsInGpgpuThreadGroup); - } - inline void setGlobalBarrierEnable(const bool value) { - TheStructure.Common.GlobalBarrierEnable = value; - } - inline bool getGlobalBarrierEnable() const { - return (TheStructure.Common.GlobalBarrierEnable); - } - inline void setSharedLocalMemorySize(const uint32_t value) { // patched - TheStructure.Common.SharedLocalMemorySize = value; - } - inline uint32_t getSharedLocalMemorySize() const { // patched - return static_cast(TheStructure.Common.SharedLocalMemorySize); - } - inline void setBarrierEnable(const uint32_t value) { - TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u; - } - inline bool getBarrierEnable() const { - return (TheStructure.Common.BarrierEnable); - } - inline void setRoundingMode(const ROUNDING_MODE value) { - TheStructure.Common.RoundingMode = value; - } - inline ROUNDING_MODE getRoundingMode() const { - return static_cast(TheStructure.Common.RoundingMode); - } - inline void setCrossThreadConstantDataReadLength(const uint32_t value) { - TheStructure.Common.Cross_ThreadConstantDataReadLength = value; - } - inline uint32_t getCrossThreadConstantDataReadLength() const { - return (TheStructure.Common.Cross_ThreadConstantDataReadLength); - } -} INTERFACE_DESCRIPTOR_DATA; -STATIC_ASSERT(32 == sizeof(INTERFACE_DESCRIPTOR_DATA)); - -typedef struct tagGPGPU_WALKER { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t PredicateEnable : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t IndirectParameterEnable : BITFIELD_RANGE(10, 10); - uint32_t Reserved_11 : BITFIELD_RANGE(11, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t Reserved_38 : BITFIELD_RANGE(6, 31); - uint32_t IndirectDataLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 5); - uint32_t IndirectDataStartAddress : BITFIELD_RANGE(6, 31); - uint32_t ThreadWidthCounterMaximum : BITFIELD_RANGE(0, 5); - uint32_t Reserved_134 : BITFIELD_RANGE(6, 7); - uint32_t ThreadHeightCounterMaximum : BITFIELD_RANGE(8, 13); - uint32_t Reserved_142 : BITFIELD_RANGE(14, 15); - uint32_t ThreadDepthCounterMaximum : BITFIELD_RANGE(16, 21); - uint32_t Reserved_150 : BITFIELD_RANGE(22, 29); - uint32_t SimdSize : BITFIELD_RANGE(30, 31); - uint32_t ThreadGroupIdStartingX; - uint32_t Reserved_192; - uint32_t ThreadGroupIdXDimension; - uint32_t ThreadGroupIdStartingY; - uint32_t Reserved_288; - uint32_t ThreadGroupIdYDimension; - uint32_t ThreadGroupIdStartingResumeZ; - uint32_t ThreadGroupIdZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; - } Common; - uint32_t RawData[15]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0xd, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_GPGPU_WALKER_SUBOP = 0x5, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_GPGPU_WALKER = 0x1, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagSIMD_SIZE { - SIMD_SIZE_SIMD8 = 0x0, - SIMD_SIZE_SIMD16 = 0x1, - SIMD_SIZE_SIMD32 = 0x2, - } SIMD_SIZE; - typedef enum tagPATCH_CONSTANTS { - INDIRECTDATASTARTADDRESS_BYTEOFFSET = 0xc, - INDIRECTDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_GPGPU_WALKER_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_GPGPU_WALKER; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.SimdSize = SIMD_SIZE_SIMD8; - } - static tagGPGPU_WALKER sInit() { - GPGPU_WALKER state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 15); - return TheStructure.RawData[index]; - } - inline void setPredicateEnable(const bool value) { - TheStructure.Common.PredicateEnable = value; - } - inline bool getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setIndirectParameterEnable(const bool value) { - TheStructure.Common.IndirectParameterEnable = value; - } - inline bool getIndirectParameterEnable() const { - return (TheStructure.Common.IndirectParameterEnable); - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setIndirectDataLength(const uint32_t value) { - TheStructure.Common.IndirectDataLength = value; - } - inline uint32_t getIndirectDataLength() const { - return (TheStructure.Common.IndirectDataLength); - } - typedef enum tagINDIRECTDATASTARTADDRESS { - INDIRECTDATASTARTADDRESS_BIT_SHIFT = 0x6, - INDIRECTDATASTARTADDRESS_ALIGN_SIZE = 0x40, - } INDIRECTDATASTARTADDRESS; - inline void setIndirectDataStartAddress(const uint32_t value) { - TheStructure.Common.IndirectDataStartAddress = value >> INDIRECTDATASTARTADDRESS_BIT_SHIFT; - } - inline uint32_t getIndirectDataStartAddress() const { - return (TheStructure.Common.IndirectDataStartAddress << INDIRECTDATASTARTADDRESS_BIT_SHIFT); - } - inline void setThreadWidthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadWidthCounterMaximum = value - 1; - } - inline uint32_t getThreadWidthCounterMaximum() const { - return (TheStructure.Common.ThreadWidthCounterMaximum + 1); - } - inline void setThreadHeightCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadHeightCounterMaximum = value - 1; - } - inline uint32_t getThreadHeightCounterMaximum() const { - return (TheStructure.Common.ThreadHeightCounterMaximum + 1); - } - inline void setThreadDepthCounterMaximum(const uint32_t value) { - TheStructure.Common.ThreadDepthCounterMaximum = value; - } - inline uint32_t getThreadDepthCounterMaximum() const { - return (TheStructure.Common.ThreadDepthCounterMaximum); - } - inline void setSimdSize(const SIMD_SIZE value) { - TheStructure.Common.SimdSize = value; - } - inline SIMD_SIZE getSimdSize() const { - return static_cast(TheStructure.Common.SimdSize); - } - inline void setThreadGroupIdStartingX(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingX = value; - } - inline uint32_t getThreadGroupIdStartingX() const { - return (TheStructure.Common.ThreadGroupIdStartingX); - } - inline void setThreadGroupIdXDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdXDimension = value; - } - inline uint32_t getThreadGroupIdXDimension() const { - return (TheStructure.Common.ThreadGroupIdXDimension); - } - inline void setThreadGroupIdStartingY(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingY = value; - } - inline uint32_t getThreadGroupIdStartingY() const { - return (TheStructure.Common.ThreadGroupIdStartingY); - } - inline void setThreadGroupIdYDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdYDimension = value; - } - inline uint32_t getThreadGroupIdYDimension() const { - return (TheStructure.Common.ThreadGroupIdYDimension); - } - inline void setThreadGroupIdStartingResumeZ(const uint32_t value) { - TheStructure.Common.ThreadGroupIdStartingResumeZ = value; - } - inline uint32_t getThreadGroupIdStartingResumeZ() const { - return (TheStructure.Common.ThreadGroupIdStartingResumeZ); - } - inline void setThreadGroupIdZDimension(const uint32_t value) { - TheStructure.Common.ThreadGroupIdZDimension = value; - } - inline uint32_t getThreadGroupIdZDimension() const { - return (TheStructure.Common.ThreadGroupIdZDimension); - } - inline void setRightExecutionMask(const uint32_t value) { - TheStructure.Common.RightExecutionMask = value; - } - inline uint32_t getRightExecutionMask() const { - return (TheStructure.Common.RightExecutionMask); - } - inline void setBottomExecutionMask(const uint32_t value) { - TheStructure.Common.BottomExecutionMask = value; - } - inline uint32_t getBottomExecutionMask() const { - return (TheStructure.Common.BottomExecutionMask); - } - static constexpr uint32_t getInlineDataSize() { // patched - return 0u; - } - using InterfaceDescriptorType = INTERFACE_DESCRIPTOR_DATA; // patched -} GPGPU_WALKER; -STATIC_ASSERT(60 == sizeof(GPGPU_WALKER)); - -typedef struct tagMEDIA_INTERFACE_DESCRIPTOR_LOAD { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32; - uint32_t InterfaceDescriptorTotalLength : BITFIELD_RANGE(0, 16); - uint32_t Reserved_81 : BITFIELD_RANGE(17, 31); - uint32_t InterfaceDescriptorDataStartAddress; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x2, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP = 0x2, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - INTERFACEDESCRIPTORDATASTARTADDRESS_BYTEOFFSET = 0xc, - INTERFACEDESCRIPTORDATASTARTADDRESS_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_INTERFACE_DESCRIPTOR_LOAD; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_INTERFACE_DESCRIPTOR_LOAD sInit() { - MEDIA_INTERFACE_DESCRIPTOR_LOAD state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorTotalLength(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorTotalLength = value; - } - inline uint32_t getInterfaceDescriptorTotalLength() const { - return (TheStructure.Common.InterfaceDescriptorTotalLength); - } - inline void setInterfaceDescriptorDataStartAddress(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorDataStartAddress = value; - } - inline uint32_t getInterfaceDescriptorDataStartAddress() const { - return (TheStructure.Common.InterfaceDescriptorDataStartAddress); - } -} MEDIA_INTERFACE_DESCRIPTOR_LOAD; -STATIC_ASSERT(16 == sizeof(MEDIA_INTERFACE_DESCRIPTOR_LOAD)); - -typedef struct tagMEDIA_STATE_FLUSH { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t InterfaceDescriptorOffset : BITFIELD_RANGE(0, 5); - uint32_t WatermarkRequired : BITFIELD_RANGE(6, 6); - uint32_t FlushToGo : BITFIELD_RANGE(7, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 31); - } Common; - uint32_t RawData[2]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x0, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP = 0x4, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_STATE_FLUSH_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_STATE_FLUSH; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagMEDIA_STATE_FLUSH sInit() { - MEDIA_STATE_FLUSH state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 2); - return TheStructure.RawData[index]; - } - inline void setInterfaceDescriptorOffset(const uint32_t value) { - TheStructure.Common.InterfaceDescriptorOffset = value; - } - inline uint32_t getInterfaceDescriptorOffset() const { - return (TheStructure.Common.InterfaceDescriptorOffset); - } - inline void setWatermarkRequired(const uint32_t value) { - TheStructure.Common.WatermarkRequired = value; - } - inline uint32_t getWatermarkRequired() const { - return (TheStructure.Common.WatermarkRequired); - } - inline void setFlushToGo(const bool value) { - TheStructure.Common.FlushToGo = value; - } - inline bool getFlushToGo() const { - return (TheStructure.Common.FlushToGo); - } -} MEDIA_STATE_FLUSH; -STATIC_ASSERT(8 == sizeof(MEDIA_STATE_FLUSH)); - -typedef struct tagMEDIA_VFE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 15); - uint32_t Subopcode : BITFIELD_RANGE(16, 23); - uint32_t MediaCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t Pipeline : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t PerThreadScratchSpace : BITFIELD_RANGE(0, 3); - uint32_t StackSize : BITFIELD_RANGE(4, 7); - uint32_t Reserved_40 : BITFIELD_RANGE(8, 9); - uint32_t ScratchSpaceBasePointer : BITFIELD_RANGE(10, 31); - uint32_t ScratchSpaceBasePointerHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 6); - uint32_t ResetGatewayTimer : BITFIELD_RANGE(7, 7); - uint32_t NumberOfUrbEntries : BITFIELD_RANGE(8, 15); - uint32_t MaximumNumberOfThreads : BITFIELD_RANGE(16, 31); - uint32_t SliceDisable : BITFIELD_RANGE(0, 1); - uint32_t Reserved_130 : BITFIELD_RANGE(2, 31); - uint32_t CurbeAllocationSize : BITFIELD_RANGE(0, 15); - uint32_t UrbEntryAllocationSize : BITFIELD_RANGE(16, 31); - uint32_t ScoreboardMask : BITFIELD_RANGE(0, 7); - uint32_t Reserved_200 : BITFIELD_RANGE(8, 29); - uint32_t ScoreboardType : BITFIELD_RANGE(30, 30); - uint32_t ScoreboardEnable : BITFIELD_RANGE(31, 31); - uint32_t Scoreboard0DeltaX : BITFIELD_RANGE(0, 3); - uint32_t Scoreboard0DeltaY : BITFIELD_RANGE(4, 7); - uint32_t Scoreboard1DeltaX : BITFIELD_RANGE(8, 11); - uint32_t Scoreboard1DeltaY : BITFIELD_RANGE(12, 15); - uint32_t Scoreboard2DeltaX : BITFIELD_RANGE(16, 19); - uint32_t Scoreboard2DeltaY : BITFIELD_RANGE(20, 23); - uint32_t Scoreboard3DeltaX : BITFIELD_RANGE(24, 27); - uint32_t Scoreboard3DeltaY : BITFIELD_RANGE(28, 31); - uint32_t Scoreboard4DeltaX : BITFIELD_RANGE(0, 3); - uint32_t Scoreboard4DeltaY : BITFIELD_RANGE(4, 7); - uint32_t Scoreboard5DeltaX : BITFIELD_RANGE(8, 11); - uint32_t Scoreboard5DeltaY : BITFIELD_RANGE(12, 15); - uint32_t Scoreboard6DeltaX : BITFIELD_RANGE(16, 19); - uint32_t Scoreboard6DeltaY : BITFIELD_RANGE(20, 23); - uint32_t Scoreboard7DeltaX : BITFIELD_RANGE(24, 27); - uint32_t Scoreboard7DeltaY : BITFIELD_RANGE(28, 31); - } Common; - uint32_t RawData[9]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x7, - } DWORD_LENGTH; - typedef enum tagSUBOPCODE { - SUBOPCODE_MEDIA_VFE_STATE_SUBOP = 0x0, - } SUBOPCODE; - typedef enum tagMEDIA_COMMAND_OPCODE { - MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE = 0x0, - } MEDIA_COMMAND_OPCODE; - typedef enum tagPIPELINE { - PIPELINE_MEDIA = 0x2, - } PIPELINE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagRESET_GATEWAY_TIMER { - RESET_GATEWAY_TIMER_MAINTAINING_THE_EXISTING_TIMESTAMP_STATE = 0x0, - RESET_GATEWAY_TIMER_RESETTING_RELATIVE_TIMER_AND_LATCHING_THE_GLOBAL_TIMESTAMP = 0x1, - } RESET_GATEWAY_TIMER; - typedef enum tagSLICE_DISABLE { - SLICE_DISABLE_ALL_SUBSLICES_ENABLED = 0x0, - SLICE_DISABLE_ONLY_SLICE_0_ENABLED = 0x1, - SLICE_DISABLE_ONLY_SLICE_0_SUBSLICE_0_ENABLED = 0x3, - } SLICE_DISABLE; - typedef enum tagSCOREBOARD_TYPE { - SCOREBOARD_TYPE_STALLING_SCOREBOARD = 0x0, - SCOREBOARD_TYPE_NON_STALLING_SCOREBOARD = 0x1, - } SCOREBOARD_TYPE; - typedef enum tagPATCH_CONSTANTS { - SCRATCHSPACEBASEPOINTER_BYTEOFFSET = 0x4, - SCRATCHSPACEBASEPOINTER_INDEX = 0x1, - SCRATCHSPACEBASEPOINTERHIGH_BYTEOFFSET = 0x8, - SCRATCHSPACEBASEPOINTERHIGH_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common.Subopcode = SUBOPCODE_MEDIA_VFE_STATE_SUBOP; - TheStructure.Common.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIA_VFE_STATE; - TheStructure.Common.Pipeline = PIPELINE_MEDIA; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.ResetGatewayTimer = RESET_GATEWAY_TIMER_MAINTAINING_THE_EXISTING_TIMESTAMP_STATE; - TheStructure.Common.SliceDisable = SLICE_DISABLE_ALL_SUBSLICES_ENABLED; - TheStructure.Common.ScoreboardType = SCOREBOARD_TYPE_STALLING_SCOREBOARD; - } - static tagMEDIA_VFE_STATE sInit() { - MEDIA_VFE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 9); - return TheStructure.RawData[index]; - } - inline void setPerThreadScratchSpace(const uint32_t value) { - TheStructure.Common.PerThreadScratchSpace = value; - } - inline uint32_t getPerThreadScratchSpace() const { - return (TheStructure.Common.PerThreadScratchSpace); - } - inline void setStackSize(const uint32_t value) { - TheStructure.Common.StackSize = value; - } - inline uint32_t getStackSize() const { - return (TheStructure.Common.StackSize); - } - typedef enum tagSCRATCHSPACEBASEPOINTER { - SCRATCHSPACEBASEPOINTER_BIT_SHIFT = 0xa, - SCRATCHSPACEBASEPOINTER_ALIGN_SIZE = 0x400, - } SCRATCHSPACEBASEPOINTER; - inline void setScratchSpaceBasePointer(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointer = value >> SCRATCHSPACEBASEPOINTER_BIT_SHIFT; - } - inline uint32_t getScratchSpaceBasePointer() const { - return (TheStructure.Common.ScratchSpaceBasePointer << SCRATCHSPACEBASEPOINTER_BIT_SHIFT); - } - inline void setScratchSpaceBasePointerHigh(const uint32_t value) { - TheStructure.Common.ScratchSpaceBasePointerHigh = value; - } - inline uint32_t getScratchSpaceBasePointerHigh() const { - return (TheStructure.Common.ScratchSpaceBasePointerHigh); - } - inline void setResetGatewayTimer(const RESET_GATEWAY_TIMER value) { - TheStructure.Common.ResetGatewayTimer = value; - } - inline RESET_GATEWAY_TIMER getResetGatewayTimer() const { - return static_cast(TheStructure.Common.ResetGatewayTimer); - } - inline void setNumberOfUrbEntries(const uint32_t value) { - TheStructure.Common.NumberOfUrbEntries = value; - } - inline uint32_t getNumberOfUrbEntries() const { - return (TheStructure.Common.NumberOfUrbEntries); - } - inline void setMaximumNumberOfThreads(const uint32_t value) { - TheStructure.Common.MaximumNumberOfThreads = value - 1; - } - inline uint32_t getMaximumNumberOfThreads() const { - return (TheStructure.Common.MaximumNumberOfThreads + 1); - } - inline void setSliceDisable(const SLICE_DISABLE value) { - TheStructure.Common.SliceDisable = value; - } - inline SLICE_DISABLE getSliceDisable() const { - return static_cast(TheStructure.Common.SliceDisable); - } - inline void setCurbeAllocationSize(const uint32_t value) { - TheStructure.Common.CurbeAllocationSize = value; - } - inline uint32_t getCurbeAllocationSize() const { - return (TheStructure.Common.CurbeAllocationSize); - } - inline void setUrbEntryAllocationSize(const uint32_t value) { - TheStructure.Common.UrbEntryAllocationSize = value; - } - inline uint32_t getUrbEntryAllocationSize() const { - return (TheStructure.Common.UrbEntryAllocationSize); - } - inline void setScoreboardMask(const uint32_t value) { - TheStructure.Common.ScoreboardMask = value; - } - inline uint32_t getScoreboardMask() const { - return (TheStructure.Common.ScoreboardMask); - } - inline void setScoreboardType(const SCOREBOARD_TYPE value) { - TheStructure.Common.ScoreboardType = value; - } - inline SCOREBOARD_TYPE getScoreboardType() const { - return static_cast(TheStructure.Common.ScoreboardType); - } - inline void setScoreboardEnable(const bool value) { - TheStructure.Common.ScoreboardEnable = value; - } - inline bool getScoreboardEnable() const { - return (TheStructure.Common.ScoreboardEnable); - } - inline void setScoreboard0DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard0DeltaX = value; - } - inline uint32_t getScoreboard0DeltaX() const { - return (TheStructure.Common.Scoreboard0DeltaX); - } - inline void setScoreboard0DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard0DeltaY = value; - } - inline uint32_t getScoreboard0DeltaY() const { - return (TheStructure.Common.Scoreboard0DeltaY); - } - inline void setScoreboard1DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard1DeltaX = value; - } - inline uint32_t getScoreboard1DeltaX() const { - return (TheStructure.Common.Scoreboard1DeltaX); - } - inline void setScoreboard1DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard1DeltaY = value; - } - inline uint32_t getScoreboard1DeltaY() const { - return (TheStructure.Common.Scoreboard1DeltaY); - } - inline void setScoreboard2DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard2DeltaX = value; - } - inline uint32_t getScoreboard2DeltaX() const { - return (TheStructure.Common.Scoreboard2DeltaX); - } - inline void setScoreboard2DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard2DeltaY = value; - } - inline uint32_t getScoreboard2DeltaY() const { - return (TheStructure.Common.Scoreboard2DeltaY); - } - inline void setScoreboard3DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard3DeltaX = value; - } - inline uint32_t getScoreboard3DeltaX() const { - return (TheStructure.Common.Scoreboard3DeltaX); - } - inline void setScoreboard3DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard3DeltaY = value; - } - inline uint32_t getScoreboard3DeltaY() const { - return (TheStructure.Common.Scoreboard3DeltaY); - } - inline void setScoreboard4DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard4DeltaX = value; - } - inline uint32_t getScoreboard4DeltaX() const { - return (TheStructure.Common.Scoreboard4DeltaX); - } - inline void setScoreboard4DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard4DeltaY = value; - } - inline uint32_t getScoreboard4DeltaY() const { - return (TheStructure.Common.Scoreboard4DeltaY); - } - inline void setScoreboard5DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard5DeltaX = value; - } - inline uint32_t getScoreboard5DeltaX() const { - return (TheStructure.Common.Scoreboard5DeltaX); - } - inline void setScoreboard5DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard5DeltaY = value; - } - inline uint32_t getScoreboard5DeltaY() const { - return (TheStructure.Common.Scoreboard5DeltaY); - } - inline void setScoreboard6DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard6DeltaX = value; - } - inline uint32_t getScoreboard6DeltaX() const { - return (TheStructure.Common.Scoreboard6DeltaX); - } - inline void setScoreboard6DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard6DeltaY = value; - } - inline uint32_t getScoreboard6DeltaY() const { - return (TheStructure.Common.Scoreboard6DeltaY); - } - inline void setScoreboard7DeltaX(const uint32_t value) { - TheStructure.Common.Scoreboard7DeltaX = value; - } - inline uint32_t getScoreboard7DeltaX() const { - return (TheStructure.Common.Scoreboard7DeltaX); - } - inline void setScoreboard7DeltaY(const uint32_t value) { - TheStructure.Common.Scoreboard7DeltaY = value; - } - inline uint32_t getScoreboard7DeltaY() const { - return (TheStructure.Common.Scoreboard7DeltaY); - } -} MEDIA_VFE_STATE; -STATIC_ASSERT(36 == sizeof(MEDIA_VFE_STATE)); - -typedef struct tagMI_ARB_CHECK { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MiInstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t MiInstructionType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_INSTRUCTION_OPCODE { - MI_INSTRUCTION_OPCODE_MI_ARB_CHECK = 0x5, - } MI_INSTRUCTION_OPCODE; - typedef enum tagMI_INSTRUCTION_TYPE { - MI_INSTRUCTION_TYPE_MI_INSTRUCTION = 0x0, - } MI_INSTRUCTION_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiInstructionOpcode = MI_INSTRUCTION_OPCODE_MI_ARB_CHECK; - TheStructure.Common.MiInstructionType = MI_INSTRUCTION_TYPE_MI_INSTRUCTION; - } - static tagMI_ARB_CHECK sInit() { - MI_ARB_CHECK state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setMiInstructionOpcode(const MI_INSTRUCTION_OPCODE value) { - TheStructure.Common.MiInstructionOpcode = value; - } - inline MI_INSTRUCTION_OPCODE getMiInstructionOpcode() const { - return static_cast(TheStructure.Common.MiInstructionOpcode); - } - inline void setMiInstructionType(const MI_INSTRUCTION_TYPE value) { - TheStructure.Common.MiInstructionType = value; - } - inline MI_INSTRUCTION_TYPE getMiInstructionType() const { - return static_cast(TheStructure.Common.MiInstructionType); - } -} MI_ARB_CHECK; -STATIC_ASSERT(4 == sizeof(MI_ARB_CHECK)); - -typedef struct tagMI_ATOMIC { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AtomicOpcode : BITFIELD_RANGE(8, 15); - uint32_t ReturnDataControl : BITFIELD_RANGE(16, 16); - uint32_t CsStall : BITFIELD_RANGE(17, 17); - uint32_t InlineData : BITFIELD_RANGE(18, 18); - uint32_t DataSize : BITFIELD_RANGE(19, 20); - uint32_t Post_SyncOperation : BITFIELD_RANGE(21, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t MemoryAddress : BITFIELD_RANGE(2, 31); - uint32_t MemoryAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_80 : BITFIELD_RANGE(16, 31); - uint32_t Operand1DataDword0; - uint32_t Operand2DataDword0; - uint32_t Operand1DataDword1; - uint32_t Operand2DataDword1; - uint32_t Operand1DataDword2; - uint32_t Operand2DataDword2; - uint32_t Operand1DataDword3; - uint32_t Operand2DataDword3; - } Common; - uint32_t RawData[11]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_INLINE_DATA_0 = 0x1, - DWORD_LENGTH_INLINE_DATA_1 = 0x9, - } DWORD_LENGTH; - typedef enum tagDATA_SIZE { - DATA_SIZE_DWORD = 0x0, - DATA_SIZE_QWORD = 0x1, - DATA_SIZE_OCTWORD = 0x2, - } DATA_SIZE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION = 0x0, - POST_SYNC_OPERATION_POST_SYNC_OPERATION = 0x1, - } POST_SYNC_OPERATION; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_ATOMIC = 0x2f, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - typedef enum tagATOMIC_OPCODES { - ATOMIC_4B_MOVE = 0x4, - ATOMIC_4B_INCREMENT = 0x5, - ATOMIC_4B_DECREMENT = 0x6, - ATOMIC_8B_MOVE = 0x24, - ATOMIC_8B_INCREMENT = 0x25, - ATOMIC_8B_DECREMENT = 0x26, - ATOMIC_8B_ADD = 0x27, - ATOMIC_8B_CMP_WR = 0x2E, - } ATOMIC_OPCODES; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_INLINE_DATA_0; - TheStructure.Common.DataSize = DATA_SIZE_DWORD; - TheStructure.Common.Post_SyncOperation = POST_SYNC_OPERATION_NO_POST_SYNC_OPERATION; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_ATOMIC; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_ATOMIC sInit() { - MI_ATOMIC state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 11); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setAtomicOpcode(const uint32_t value) { - TheStructure.Common.AtomicOpcode = value; - } - inline uint32_t getAtomicOpcode() const { - return (TheStructure.Common.AtomicOpcode); - } - inline void setReturnDataControl(const uint32_t value) { - TheStructure.Common.ReturnDataControl = value; - } - inline uint32_t getReturnDataControl() const { - return (TheStructure.Common.ReturnDataControl); - } - inline void setCsStall(const uint32_t value) { - TheStructure.Common.CsStall = value; - } - inline uint32_t getCsStall() const { - return (TheStructure.Common.CsStall); - } - inline void setInlineData(const uint32_t value) { - TheStructure.Common.InlineData = value; - } - inline uint32_t getInlineData() const { - return (TheStructure.Common.InlineData); - } - inline void setDataSize(const DATA_SIZE value) { - TheStructure.Common.DataSize = value; - } - inline DATA_SIZE getDataSize() const { - return static_cast(TheStructure.Common.DataSize); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.Post_SyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.Post_SyncOperation); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint32_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint32_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setMemoryAddressHigh(const uint32_t value) { - TheStructure.Common.MemoryAddressHigh = value; - } - inline uint32_t getMemoryAddressHigh() const { - return (TheStructure.Common.MemoryAddressHigh); - } - inline void setOperand1DataDword0(const uint32_t value) { - TheStructure.Common.Operand1DataDword0 = value; - } - inline uint32_t getOperand1DataDword0() const { - return (TheStructure.Common.Operand1DataDword0); - } - inline void setOperand2DataDword0(const uint32_t value) { - TheStructure.Common.Operand2DataDword0 = value; - } - inline uint32_t getOperand2DataDword0() const { - return (TheStructure.Common.Operand2DataDword0); - } - inline void setOperand1DataDword1(const uint32_t value) { - TheStructure.Common.Operand1DataDword1 = value; - } - inline uint32_t getOperand1DataDword1() const { - return (TheStructure.Common.Operand1DataDword1); - } - inline void setOperand2DataDword1(const uint32_t value) { - TheStructure.Common.Operand2DataDword1 = value; - } - inline uint32_t getOperand2DataDword1() const { - return (TheStructure.Common.Operand2DataDword1); - } - inline void setOperand1DataDword2(const uint32_t value) { - TheStructure.Common.Operand1DataDword2 = value; - } - inline uint32_t getOperand1DataDword2() const { - return (TheStructure.Common.Operand1DataDword2); - } - inline void setOperand2DataDword2(const uint32_t value) { - TheStructure.Common.Operand2DataDword2 = value; - } - inline uint32_t getOperand2DataDword2() const { - return (TheStructure.Common.Operand2DataDword2); - } - inline void setOperand1DataDword3(const uint32_t value) { - TheStructure.Common.Operand1DataDword3 = value; - } - inline uint32_t getOperand1DataDword3() const { - return (TheStructure.Common.Operand1DataDword3); - } - inline void setOperand2DataDword3(const uint32_t value) { - TheStructure.Common.Operand2DataDword3 = value; - } - inline uint32_t getOperand2DataDword3() const { - return (TheStructure.Common.Operand2DataDword3); - } -} MI_ATOMIC; -STATIC_ASSERT(44 == sizeof(MI_ATOMIC)); - -typedef struct tagMI_BATCH_BUFFER_END { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END = 0xa, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_END; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_END sInit() { - MI_BATCH_BUFFER_END state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } -} MI_BATCH_BUFFER_END; -STATIC_ASSERT(4 == sizeof(MI_BATCH_BUFFER_END)); - -typedef struct tagMI_BATCH_BUFFER_START { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t AddressSpaceIndicator : BITFIELD_RANGE(8, 8); - uint32_t Reserved_9 : BITFIELD_RANGE(9, 9); - uint32_t ResourceStreamerEnable : BITFIELD_RANGE(10, 10); - uint32_t Reserved_11 : BITFIELD_RANGE(11, 14); - uint32_t PredicationEnable : BITFIELD_RANGE(15, 15); - uint32_t AddOffsetEnable : BITFIELD_RANGE(16, 16); - uint32_t Reserved_17 : BITFIELD_RANGE(17, 21); - uint32_t SecondLevelBatchBuffer : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t BatchBufferStartAddress_Graphicsaddress47_2 : BITFIELD_RANGE(2, 47); - uint64_t BatchBufferStartAddress_Reserved : BITFIELD_RANGE(48, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagADDRESS_SPACE_INDICATOR { - ADDRESS_SPACE_INDICATOR_GGTT = 0x0, - ADDRESS_SPACE_INDICATOR_PPGTT = 0x1, - } ADDRESS_SPACE_INDICATOR; - typedef enum tagSECOND_LEVEL_BATCH_BUFFER { - SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH = 0x0, - SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH = 0x1, - } SECOND_LEVEL_BATCH_BUFFER; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START = 0x31, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.AddressSpaceIndicator = ADDRESS_SPACE_INDICATOR_GGTT; - TheStructure.Common.SecondLevelBatchBuffer = SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_BATCH_BUFFER_START; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_BATCH_BUFFER_START sInit() { - MI_BATCH_BUFFER_START state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setAddressSpaceIndicator(const ADDRESS_SPACE_INDICATOR value) { - TheStructure.Common.AddressSpaceIndicator = value; - } - inline ADDRESS_SPACE_INDICATOR getAddressSpaceIndicator() const { - return static_cast(TheStructure.Common.AddressSpaceIndicator); - } - inline void setResourceStreamerEnable(const bool value) { - TheStructure.Common.ResourceStreamerEnable = value; - } - inline bool getResourceStreamerEnable() const { - return (TheStructure.Common.ResourceStreamerEnable); - } - inline void setPredicationEnable(const uint32_t value) { - TheStructure.Common.PredicationEnable = value; - } - inline uint32_t getPredicationEnable() const { - return (TheStructure.Common.PredicationEnable); - } - inline void setAddOffsetEnable(const bool value) { - TheStructure.Common.AddOffsetEnable = value; - } - inline bool getAddOffsetEnable() const { - return (TheStructure.Common.AddOffsetEnable); - } - inline void setSecondLevelBatchBuffer(const SECOND_LEVEL_BATCH_BUFFER value) { - TheStructure.Common.SecondLevelBatchBuffer = value; - } - inline SECOND_LEVEL_BATCH_BUFFER getSecondLevelBatchBuffer() const { - return static_cast(TheStructure.Common.SecondLevelBatchBuffer); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2 { - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2; - inline void setBatchBufferStartAddress(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Graphicsaddress47_2 = value >> BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddress() const { - return (TheStructure.Common.BatchBufferStartAddress_Graphicsaddress47_2 << BATCHBUFFERSTARTADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT); - } - typedef enum tagBATCHBUFFERSTARTADDRESS_RESERVED { - BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT = 0x2, - BATCHBUFFERSTARTADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } BATCHBUFFERSTARTADDRESS_RESERVED; - inline void setBatchBufferStartAddressReserved(const uint64_t value) { - TheStructure.Common.BatchBufferStartAddress_Reserved = value >> BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getBatchBufferStartAddressReserved() const { - return (TheStructure.Common.BatchBufferStartAddress_Reserved << BATCHBUFFERSTARTADDRESS_RESERVED_BIT_SHIFT); - } -} MI_BATCH_BUFFER_START; -STATIC_ASSERT(12 == sizeof(MI_BATCH_BUFFER_START)); - -typedef struct tagMI_LOAD_REGISTER_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t ByteWriteDisables : BITFIELD_RANGE(8, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterOffset : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t DataDword; - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM = 0x22, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_IMM sInit() { - MI_LOAD_REGISTER_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - inline void setByteWriteDisables(const uint32_t value) { - TheStructure.Common.ByteWriteDisables = value; - } - inline uint32_t getByteWriteDisables() const { - return (TheStructure.Common.ByteWriteDisables); - } - typedef enum tagREGISTEROFFSET { - REGISTEROFFSET_BIT_SHIFT = 0x2, - REGISTEROFFSET_ALIGN_SIZE = 0x4, - } REGISTEROFFSET; - inline void setRegisterOffset(const uint32_t value) { - TheStructure.Common.RegisterOffset = value >> REGISTEROFFSET_BIT_SHIFT; - } - inline uint32_t getRegisterOffset() const { - return (TheStructure.Common.RegisterOffset << REGISTEROFFSET_BIT_SHIFT); - } - inline void setDataDword(const uint32_t value) { - TheStructure.Common.DataDword = value; - } - inline uint32_t getDataDword() const { - return (TheStructure.Common.DataDword); - } -} MI_LOAD_REGISTER_IMM; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_IMM)); - -typedef struct tagMI_LOAD_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 20); - uint32_t AsyncModeEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM = 0x29, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_MEM sInit() { - MI_LOAD_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setAsyncModeEnable(const bool value) { - TheStructure.Common.AsyncModeEnable = value; - } - inline bool getAsyncModeEnable() const { - return (TheStructure.Common.AsyncModeEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_LOAD_REGISTER_MEM)); - -typedef struct tagMI_LOAD_REGISTER_REG { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t SourceRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t DestinationRegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_87 : BITFIELD_RANGE(23, 31); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x1, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG = 0x2a, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_LOAD_REGISTER_REG; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_LOAD_REGISTER_REG sInit() { - MI_LOAD_REGISTER_REG state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagSOURCEREGISTERADDRESS { - SOURCEREGISTERADDRESS_BIT_SHIFT = 0x2, - SOURCEREGISTERADDRESS_ALIGN_SIZE = 0x4, - } SOURCEREGISTERADDRESS; - inline void setSourceRegisterAddress(const uint32_t value) { - TheStructure.Common.SourceRegisterAddress = value >> SOURCEREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getSourceRegisterAddress() const { - return (TheStructure.Common.SourceRegisterAddress << SOURCEREGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagDESTINATIONREGISTERADDRESS { - DESTINATIONREGISTERADDRESS_BIT_SHIFT = 0x2, - DESTINATIONREGISTERADDRESS_ALIGN_SIZE = 0x4, - } DESTINATIONREGISTERADDRESS; - inline void setDestinationRegisterAddress(const uint32_t value) { - TheStructure.Common.DestinationRegisterAddress = value >> DESTINATIONREGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getDestinationRegisterAddress() const { - return (TheStructure.Common.DestinationRegisterAddress << DESTINATIONREGISTERADDRESS_BIT_SHIFT); - } -} MI_LOAD_REGISTER_REG; -STATIC_ASSERT(12 == sizeof(MI_LOAD_REGISTER_REG)); - -typedef struct tagMI_NOOP { - union tagTheStructure { - struct tagCommon { - uint32_t IdentificationNumber : BITFIELD_RANGE(0, 21); - uint32_t IdentificationNumberRegisterWriteEnable : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_NOOP = 0x0, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_NOOP; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_NOOP sInit() { - MI_NOOP state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setIdentificationNumber(const uint32_t value) { - TheStructure.Common.IdentificationNumber = value; - } - inline uint32_t getIdentificationNumber() const { - return (TheStructure.Common.IdentificationNumber); - } - inline void setIdentificationNumberRegisterWriteEnable(const bool value) { - TheStructure.Common.IdentificationNumberRegisterWriteEnable = value; - } - inline bool getIdentificationNumberRegisterWriteEnable() const { - return (TheStructure.Common.IdentificationNumberRegisterWriteEnable); - } -} MI_NOOP; -STATIC_ASSERT(4 == sizeof(MI_NOOP)); - -typedef struct tagMI_STORE_REGISTER_MEM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 20); - uint32_t PredicateEnable : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint32_t RegisterAddress : BITFIELD_RANGE(2, 22); - uint32_t Reserved_55 : BITFIELD_RANGE(23, 31); - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t MemoryAddress : BITFIELD_RANGE(2, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM = 0x24, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x8, - MEMORYADDRESS_INDEX = 0x2, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_REGISTER_MEM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_REGISTER_MEM sInit() { - MI_STORE_REGISTER_MEM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setPredicateEnable(const uint32_t value) { - TheStructure.Common.PredicateEnable = value; - } - inline uint32_t getPredicateEnable() const { - return (TheStructure.Common.PredicateEnable); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - typedef enum tagREGISTERADDRESS { - REGISTERADDRESS_BIT_SHIFT = 0x2, - REGISTERADDRESS_ALIGN_SIZE = 0x4, - } REGISTERADDRESS; - inline void setRegisterAddress(const uint32_t value) { - TheStructure.Common.RegisterAddress = value >> REGISTERADDRESS_BIT_SHIFT; - } - inline uint32_t getRegisterAddress() const { - return (TheStructure.Common.RegisterAddress << REGISTERADDRESS_BIT_SHIFT); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x2, - MEMORYADDRESS_ALIGN_SIZE = 0x4, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } -} MI_STORE_REGISTER_MEM; -STATIC_ASSERT(16 == sizeof(MI_STORE_REGISTER_MEM)); - -typedef struct tagPIPELINE_SELECT { - union tagTheStructure { - struct tagCommon { - uint32_t PipelineSelection : BITFIELD_RANGE(0, 1); - uint32_t RenderSliceCommonPowerGateEnable : BITFIELD_RANGE(2, 2); - uint32_t RenderSamplerPowerGateEnable : BITFIELD_RANGE(3, 3); - uint32_t MediaSamplerDopClockGateEnable : BITFIELD_RANGE(4, 4); - uint32_t ForceMediaAwake : BITFIELD_RANGE(5, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 7); - uint32_t MaskBits : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - typedef enum tagPIPELINE_SELECTION { - PIPELINE_SELECTION_3D = 0x0, - PIPELINE_SELECTION_MEDIA = 0x1, - PIPELINE_SELECTION_GPGPU = 0x2, - } PIPELINE_SELECTION; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW = 0x1, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.PipelineSelection = PIPELINE_SELECTION_3D; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPELINE_SELECT; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_SINGLE_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagPIPELINE_SELECT sInit() { - PIPELINE_SELECT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 1); - return TheStructure.RawData[index]; - } - inline void setPipelineSelection(const PIPELINE_SELECTION value) { - TheStructure.Common.PipelineSelection = value; - } - inline PIPELINE_SELECTION getPipelineSelection() const { - return static_cast(TheStructure.Common.PipelineSelection); - } - inline void setRenderSliceCommonPowerGateEnable(const bool value) { - TheStructure.Common.RenderSliceCommonPowerGateEnable = value; - } - inline bool getRenderSliceCommonPowerGateEnable() const { - return (TheStructure.Common.RenderSliceCommonPowerGateEnable); - } - inline void setRenderSamplerPowerGateEnable(const bool value) { - TheStructure.Common.RenderSamplerPowerGateEnable = value; - } - inline bool getRenderSamplerPowerGateEnable() const { - return (TheStructure.Common.RenderSamplerPowerGateEnable); - } - inline void setMediaSamplerDopClockGateEnable(const bool value) { - TheStructure.Common.MediaSamplerDopClockGateEnable = value; - } - inline bool getMediaSamplerDopClockGateEnable() const { - return (TheStructure.Common.MediaSamplerDopClockGateEnable); - } - inline void setForceMediaAwake(const bool value) { - TheStructure.Common.ForceMediaAwake = value; - } - inline bool getForceMediaAwake() const { - return (TheStructure.Common.ForceMediaAwake); - } - inline void setMaskBits(const uint32_t value) { - TheStructure.Common.MaskBits = value; - } - inline uint32_t getMaskBits() const { - return (TheStructure.Common.MaskBits); - } -} PIPELINE_SELECT; -STATIC_ASSERT(4 == sizeof(PIPELINE_SELECT)); - -typedef struct tagPIPE_CONTROL { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t DepthCacheFlushEnable : BITFIELD_RANGE(0, 0); - uint32_t StallAtPixelScoreboard : BITFIELD_RANGE(1, 1); - uint32_t StateCacheInvalidationEnable : BITFIELD_RANGE(2, 2); - uint32_t ConstantCacheInvalidationEnable : BITFIELD_RANGE(3, 3); - uint32_t VfCacheInvalidationEnable : BITFIELD_RANGE(4, 4); - uint32_t DcFlushEnable : BITFIELD_RANGE(5, 5); - uint32_t ProtectedMemoryApplicationId : BITFIELD_RANGE(6, 6); - uint32_t PipeControlFlushEnable : BITFIELD_RANGE(7, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t IndirectStatePointersDisable : BITFIELD_RANGE(9, 9); - uint32_t TextureCacheInvalidationEnable : BITFIELD_RANGE(10, 10); - uint32_t InstructionCacheInvalidateEnable : BITFIELD_RANGE(11, 11); - uint32_t RenderTargetCacheFlushEnable : BITFIELD_RANGE(12, 12); - uint32_t DepthStallEnable : BITFIELD_RANGE(13, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t GenericMediaStateClear : BITFIELD_RANGE(16, 16); - uint32_t Reserved_49 : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t GlobalSnapshotCountReset : BITFIELD_RANGE(19, 19); - uint32_t CommandStreamerStallEnable : BITFIELD_RANGE(20, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_54 : BITFIELD_RANGE(22, 22); - uint32_t LriPostSyncOperation : BITFIELD_RANGE(23, 23); - uint32_t DestinationAddressType : BITFIELD_RANGE(24, 24); - uint32_t Reserved_57 : BITFIELD_RANGE(25, 25); - uint32_t FlushLlc : BITFIELD_RANGE(26, 26); - uint32_t ProtectedMemoryDisable : BITFIELD_RANGE(27, 27); - uint32_t Reserved_60 : BITFIELD_RANGE(28, 31); - uint32_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint32_t Address : BITFIELD_RANGE(2, 31); - uint32_t AddressHigh; - uint64_t ImmediateData; - } Common; - uint32_t RawData[6]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x4, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL = 0x0, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_PIPE_CONTROL = 0x2, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_3D = 0x3, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA = 0x1, - POST_SYNC_OPERATION_WRITE_PS_DEPTH_COUNT = 0x2, - POST_SYNC_OPERATION_WRITE_TIMESTAMP = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagGLOBAL_SNAPSHOT_COUNT_RESET { - GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET = 0x0, - GLOBAL_SNAPSHOT_COUNT_RESET_RESET = 0x1, - } GLOBAL_SNAPSHOT_COUNT_RESET; - typedef enum tagLRI_POST_SYNC_OPERATION { - LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION = 0x0, - LRI_POST_SYNC_OPERATION_MMIO_WRITE_IMMEDIATE_DATA = 0x1, - } LRI_POST_SYNC_OPERATION; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - typedef enum tagPATCH_CONSTANTS { - ADDRESS_BYTEOFFSET = 0x8, - ADDRESS_INDEX = 0x2, - ADDRESSHIGH_BYTEOFFSET = 0xc, - ADDRESSHIGH_INDEX = 0x3, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_PIPE_CONTROL; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_PIPE_CONTROL; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_3D; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.GlobalSnapshotCountReset = GLOBAL_SNAPSHOT_COUNT_RESET_DON_T_RESET; - TheStructure.Common.LriPostSyncOperation = LRI_POST_SYNC_OPERATION_NO_LRI_OPERATION; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagPIPE_CONTROL sInit() { - PIPE_CONTROL state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 6); - return TheStructure.RawData[index]; - } - inline void setDepthCacheFlushEnable(const bool value) { - TheStructure.Common.DepthCacheFlushEnable = value; - } - inline bool getDepthCacheFlushEnable() const { - return (TheStructure.Common.DepthCacheFlushEnable); - } - inline void setStallAtPixelScoreboard(const bool value) { - TheStructure.Common.StallAtPixelScoreboard = value; - } - inline bool getStallAtPixelScoreboard() const { - return (TheStructure.Common.StallAtPixelScoreboard); - } - inline void setStateCacheInvalidationEnable(const bool value) { - TheStructure.Common.StateCacheInvalidationEnable = value; - } - inline bool getStateCacheInvalidationEnable() const { - return (TheStructure.Common.StateCacheInvalidationEnable); - } - inline void setConstantCacheInvalidationEnable(const bool value) { - TheStructure.Common.ConstantCacheInvalidationEnable = value; - } - inline bool getConstantCacheInvalidationEnable() const { - return (TheStructure.Common.ConstantCacheInvalidationEnable); - } - inline void setVfCacheInvalidationEnable(const bool value) { - TheStructure.Common.VfCacheInvalidationEnable = value; - } - inline bool getVfCacheInvalidationEnable() const { - return (TheStructure.Common.VfCacheInvalidationEnable); - } - inline void setDcFlushEnable(const bool value) { - TheStructure.Common.DcFlushEnable = value; - } - inline bool getDcFlushEnable() const { - return (TheStructure.Common.DcFlushEnable); - } - inline void setProtectedMemoryApplicationId(const uint32_t value) { - TheStructure.Common.ProtectedMemoryApplicationId = value; - } - inline uint32_t getProtectedMemoryApplicationId() const { - return (TheStructure.Common.ProtectedMemoryApplicationId); - } - inline void setPipeControlFlushEnable(const bool value) { - TheStructure.Common.PipeControlFlushEnable = value; - } - inline bool getPipeControlFlushEnable() const { - return (TheStructure.Common.PipeControlFlushEnable); - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return (TheStructure.Common.NotifyEnable); - } - inline void setIndirectStatePointersDisable(const bool value) { - TheStructure.Common.IndirectStatePointersDisable = value; - } - inline bool getIndirectStatePointersDisable() const { - return (TheStructure.Common.IndirectStatePointersDisable); - } - inline void setTextureCacheInvalidationEnable(const bool value) { - TheStructure.Common.TextureCacheInvalidationEnable = value; - } - inline bool getTextureCacheInvalidationEnable() const { - return (TheStructure.Common.TextureCacheInvalidationEnable); - } - inline void setInstructionCacheInvalidateEnable(const bool value) { - TheStructure.Common.InstructionCacheInvalidateEnable = value; - } - inline bool getInstructionCacheInvalidateEnable() const { - return (TheStructure.Common.InstructionCacheInvalidateEnable); - } - inline void setRenderTargetCacheFlushEnable(const bool value) { - TheStructure.Common.RenderTargetCacheFlushEnable = value; - } - inline bool getRenderTargetCacheFlushEnable() const { - return (TheStructure.Common.RenderTargetCacheFlushEnable); - } - inline void setDepthStallEnable(const bool value) { - TheStructure.Common.DepthStallEnable = value; - } - inline bool getDepthStallEnable() const { - return (TheStructure.Common.DepthStallEnable); - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setGenericMediaStateClear(const bool value) { - TheStructure.Common.GenericMediaStateClear = value; - } - inline bool getGenericMediaStateClear() const { - return (TheStructure.Common.GenericMediaStateClear); - } - inline void setTlbInvalidate(const uint32_t value) { - TheStructure.Common.TlbInvalidate = value; - } - inline uint32_t getTlbInvalidate() const { - return (TheStructure.Common.TlbInvalidate); - } - inline void setGlobalSnapshotCountReset(const GLOBAL_SNAPSHOT_COUNT_RESET value) { - TheStructure.Common.GlobalSnapshotCountReset = value; - } - inline GLOBAL_SNAPSHOT_COUNT_RESET getGlobalSnapshotCountReset() const { - return static_cast(TheStructure.Common.GlobalSnapshotCountReset); - } - inline void setCommandStreamerStallEnable(const uint32_t value) { - TheStructure.Common.CommandStreamerStallEnable = value; - } - inline uint32_t getCommandStreamerStallEnable() const { - return (TheStructure.Common.CommandStreamerStallEnable); - } - inline void setStoreDataIndex(const uint32_t value) { - TheStructure.Common.StoreDataIndex = value; - } - inline uint32_t getStoreDataIndex() const { - return (TheStructure.Common.StoreDataIndex); - } - inline void setLriPostSyncOperation(const LRI_POST_SYNC_OPERATION value) { - TheStructure.Common.LriPostSyncOperation = value; - } - inline LRI_POST_SYNC_OPERATION getLriPostSyncOperation() const { - return static_cast(TheStructure.Common.LriPostSyncOperation); - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - inline void setFlushLlc(const bool value) { - TheStructure.Common.FlushLlc = value; - } - inline bool getFlushLlc() const { - return (TheStructure.Common.FlushLlc); - } - inline void setProtectedMemoryDisable(const uint32_t value) { - TheStructure.Common.ProtectedMemoryDisable = value; - } - inline uint32_t getProtectedMemoryDisable() const { - return (TheStructure.Common.ProtectedMemoryDisable); - } - typedef enum tagADDRESS { - ADDRESS_BIT_SHIFT = 0x2, - ADDRESS_ALIGN_SIZE = 0x4, - } ADDRESS; - inline void setAddress(const uint32_t value) { - TheStructure.Common.Address = value >> ADDRESS_BIT_SHIFT; - } - inline uint32_t getAddress() const { - return (TheStructure.Common.Address << ADDRESS_BIT_SHIFT); - } - inline void setAddressHigh(const uint32_t value) { - TheStructure.Common.AddressHigh = value; - } - inline uint32_t getAddressHigh() const { - return (TheStructure.Common.AddressHigh); - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return (TheStructure.Common.ImmediateData); - } -} PIPE_CONTROL; -STATIC_ASSERT(24 == sizeof(PIPE_CONTROL)); - -typedef struct tagRENDER_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 5); - uint32_t MediaBoundaryPixelMode : BITFIELD_RANGE(6, 7); - uint32_t RenderCacheReadWriteMode : BITFIELD_RANGE(8, 8); - uint32_t SamplerL2OutOfOrderModeDisable : BITFIELD_RANGE(9, 9); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(10, 10); - uint32_t VerticalLineStride : BITFIELD_RANGE(11, 11); - uint32_t TileMode : BITFIELD_RANGE(12, 13); - uint32_t SurfaceHorizontalAlignment : BITFIELD_RANGE(14, 15); - uint32_t SurfaceVerticalAlignment : BITFIELD_RANGE(16, 17); - uint32_t SurfaceFormat : BITFIELD_RANGE(18, 26); - uint32_t Astc_Enable : BITFIELD_RANGE(27, 27); - uint32_t SurfaceArray : BITFIELD_RANGE(28, 28); - uint32_t SurfaceType : BITFIELD_RANGE(29, 31); - uint32_t SurfaceQpitch : BITFIELD_RANGE(0, 14); - uint32_t Reserved_47 : BITFIELD_RANGE(15, 18); - uint32_t BaseMipLevel : BITFIELD_RANGE(19, 23); - uint32_t MemoryObjectControlState_Reserved : BITFIELD_RANGE(24, 24); - uint32_t MemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(25, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - uint32_t Width : BITFIELD_RANGE(0, 13); - uint32_t Reserved_78 : BITFIELD_RANGE(14, 15); - uint32_t Height : BITFIELD_RANGE(16, 29); - uint32_t Reserved_94 : BITFIELD_RANGE(30, 31); - uint32_t SurfacePitch : BITFIELD_RANGE(0, 17); - uint32_t Reserved_114 : BITFIELD_RANGE(18, 20); - uint32_t Depth : BITFIELD_RANGE(21, 31); - uint32_t Reserved_128; - uint32_t MipCountLod : BITFIELD_RANGE(0, 3); - uint32_t SurfaceMinLod : BITFIELD_RANGE(4, 7); - uint32_t MipTailStartLod : BITFIELD_RANGE(8, 11); - uint32_t Reserved_172 : BITFIELD_RANGE(12, 13); - uint32_t CoherencyType : BITFIELD_RANGE(14, 14); - uint32_t Reserved_175 : BITFIELD_RANGE(15, 17); - uint32_t TiledResourceMode : BITFIELD_RANGE(18, 19); - uint32_t EwaDisableForCube : BITFIELD_RANGE(20, 20); - uint32_t YOffset : BITFIELD_RANGE(21, 23); - uint32_t Reserved_184 : BITFIELD_RANGE(24, 24); - uint32_t XOffset : BITFIELD_RANGE(25, 31); - uint32_t Reserved_192; - uint32_t ResourceMinLod : BITFIELD_RANGE(0, 11); - uint32_t Reserved_236 : BITFIELD_RANGE(12, 15); - uint32_t ShaderChannelSelectAlpha : BITFIELD_RANGE(16, 18); - uint32_t ShaderChannelSelectBlue : BITFIELD_RANGE(19, 21); - uint32_t ShaderChannelSelectGreen : BITFIELD_RANGE(22, 24); - uint32_t ShaderChannelSelectRed : BITFIELD_RANGE(25, 27); - uint32_t Reserved_252 : BITFIELD_RANGE(28, 29); - uint32_t MemoryCompressionEnable : BITFIELD_RANGE(30, 30); - uint32_t MemoryCompressionMode : BITFIELD_RANGE(31, 31); - uint64_t SurfaceBaseAddress; - uint64_t QuiltWidth : BITFIELD_RANGE(0, 4); - uint64_t QuiltHeight : BITFIELD_RANGE(5, 9); - uint64_t Reserved_330 : BITFIELD_RANGE(10, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } Common; - struct tagSurfaceTypeIsnotSurftype_Cube { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Cube; - struct tagSurfaceTypeIsSurftype_Cube { - uint32_t CubeFaceEnable_PositiveZ : BITFIELD_RANGE(0, 0); - uint32_t CubeFaceEnable_NegativeZ : BITFIELD_RANGE(1, 1); - uint32_t CubeFaceEnable_PositiveY : BITFIELD_RANGE(2, 2); - uint32_t CubeFaceEnable_NegativeY : BITFIELD_RANGE(3, 3); - uint32_t CubeFaceEnable_PositiveX : BITFIELD_RANGE(4, 4); - uint32_t CubeFaceEnable_NegativeX : BITFIELD_RANGE(5, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 31); - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Cube; - struct tagSurfaceTypeIsnotSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t MultisamplePositionPaletteIndex : BITFIELD_RANGE(0, 2); - uint32_t NumberOfMultisamples : BITFIELD_RANGE(3, 5); - uint32_t MultisampledSurfaceStorageFormat : BITFIELD_RANGE(6, 6); - uint32_t RenderTargetViewExtent : BITFIELD_RANGE(7, 17); - uint32_t MinimumArrayElement : BITFIELD_RANGE(18, 28); - uint32_t RenderTargetAndSampleUnormRotation : BITFIELD_RANGE(29, 30); - uint32_t Reserved_159 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsnotSurftype_Strbuf; - struct tagSurfaceTypeIsSurftype_Strbuf { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } SurfaceTypeIsSurftype_Strbuf; - struct tag_SurfaceFormatIsnotPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t AuxiliarySurfaceMode : BITFIELD_RANGE(0, 2); - uint32_t AuxiliarySurfacePitch : BITFIELD_RANGE(3, 11); - uint32_t Reserved_204 : BITFIELD_RANGE(12, 15); - uint32_t AuxiliarySurfaceQpitch : BITFIELD_RANGE(16, 30); - uint32_t Reserved_223 : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanar; - struct tag_SurfaceFormatIsPlanar { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t YOffsetForUOrUvPlane : BITFIELD_RANGE(0, 13); - uint32_t Reserved_206 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForUOrUvPlane : BITFIELD_RANGE(16, 29); - uint32_t Reserved_222 : BITFIELD_RANGE(30, 30); - uint32_t SeparateUvPlaneEnable : BITFIELD_RANGE(31, 31); - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 31); - uint64_t YOffsetForVPlane : BITFIELD_RANGE(32, 45); - uint64_t Reserved_366 : BITFIELD_RANGE(46, 47); - uint64_t XOffsetForVPlane : BITFIELD_RANGE(48, 61); - uint64_t Reserved_382 : BITFIELD_RANGE(62, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsPlanar; - struct tag_SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 11); - uint64_t AuxiliarySurfaceBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0; - struct tagMemoryCompressionEnableIs1 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320 : BITFIELD_RANGE(0, 20); - uint64_t AuxiliaryTableIndexForMediaCompressedSurface : BITFIELD_RANGE(21, 31); - uint64_t Reserved_352 : BITFIELD_RANGE(32, 63); - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } MemoryCompressionEnableIs1; - struct tagAuxiliarySurfaceModeIsAux_Hiz { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - float HierarchicalDepthClearValue; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } AuxiliarySurfaceModeIsAux_Hiz; - struct tagAuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t RedClearColor; - uint32_t GreenClearColor; - uint32_t BlueClearColor; - uint32_t AlphaClearColor; - } AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E; - struct tag_AuxiliarySurfaceModeIsnotAux_Ccs_DAnd_AuxiliarySurfaceModeIsnotAux_Ccs_EAnd_AuxiliarySurfaceModeIsnotAux_Hiz { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - uint64_t Reserved_256; - uint64_t Reserved_320; - uint32_t Reserved_384; - uint32_t Reserved_416; - uint32_t Reserved_448; - uint32_t Reserved_480; - } _AuxiliarySurfaceModeIsnotAux_Ccs_DAnd_AuxiliarySurfaceModeIsnotAux_Ccs_EAnd_AuxiliarySurfaceModeIsnotAux_Hiz; - uint32_t RawData[16]; - } TheStructure; - typedef enum tagMEDIA_BOUNDARY_PIXEL_MODE { - MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE = 0x0, - MEDIA_BOUNDARY_PIXEL_MODE_PROGRESSIVE_FRAME = 0x2, - MEDIA_BOUNDARY_PIXEL_MODE_INTERLACED_FRAME = 0x3, - } MEDIA_BOUNDARY_PIXEL_MODE; - typedef enum tagRENDER_CACHE_READ_WRITE_MODE { - RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE = 0x0, - RENDER_CACHE_READ_WRITE_MODE_READ_WRITE_CACHE = 0x1, - } RENDER_CACHE_READ_WRITE_MODE; - typedef enum tagTILE_MODE { - TILE_MODE_LINEAR = 0x0, - TILE_MODE_WMAJOR = 0x1, - TILE_MODE_XMAJOR = 0x2, - TILE_MODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT { - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4 = 0x1, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_8 = 0x2, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x3, - SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_DEFAULT = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4, - } SURFACE_HORIZONTAL_ALIGNMENT; - typedef enum tagSURFACE_VERTICAL_ALIGNMENT { - SURFACE_VERTICAL_ALIGNMENT_VALIGN_4 = 0x1, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_8 = 0x2, - SURFACE_VERTICAL_ALIGNMENT_VALIGN_16 = 0x3, - } SURFACE_VERTICAL_ALIGNMENT; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_R32G32B32A32_FLOAT = 0x0, - SURFACE_FORMAT_R32G32B32A32_SINT = 0x1, - SURFACE_FORMAT_R32G32B32A32_UINT = 0x2, - SURFACE_FORMAT_R32G32B32A32_UNORM = 0x3, - SURFACE_FORMAT_R32G32B32A32_SNORM = 0x4, - SURFACE_FORMAT_R64G64_FLOAT = 0x5, - SURFACE_FORMAT_R32G32B32X32_FLOAT = 0x6, - SURFACE_FORMAT_R32G32B32A32_SSCALED = 0x7, - SURFACE_FORMAT_R32G32B32A32_USCALED = 0x8, - SURFACE_FORMAT_R32G32B32A32_SFIXED = 0x20, - SURFACE_FORMAT_R64G64_PASSTHRU = 0x21, - SURFACE_FORMAT_R32G32B32_FLOAT = 0x40, - SURFACE_FORMAT_R32G32B32_SINT = 0x41, - SURFACE_FORMAT_R32G32B32_UINT = 0x42, - SURFACE_FORMAT_R32G32B32_UNORM = 0x43, - SURFACE_FORMAT_R32G32B32_SNORM = 0x44, - SURFACE_FORMAT_R32G32B32_SSCALED = 0x45, - SURFACE_FORMAT_R32G32B32_USCALED = 0x46, - SURFACE_FORMAT_R32G32B32_SFIXED = 0x50, - SURFACE_FORMAT_R16G16B16A16_UNORM = 0x80, - SURFACE_FORMAT_R16G16B16A16_SNORM = 0x81, - SURFACE_FORMAT_R16G16B16A16_SINT = 0x82, - SURFACE_FORMAT_R16G16B16A16_UINT = 0x83, - SURFACE_FORMAT_R16G16B16A16_FLOAT = 0x84, - SURFACE_FORMAT_R32G32_FLOAT = 0x85, - SURFACE_FORMAT_R32G32_SINT = 0x86, - SURFACE_FORMAT_R32G32_UINT = 0x87, - SURFACE_FORMAT_R32_FLOAT_X8X24_TYPELESS = 0x88, - SURFACE_FORMAT_X32_TYPELESS_G8X24_UINT = 0x89, - SURFACE_FORMAT_L32A32_FLOAT = 0x8a, - SURFACE_FORMAT_R32G32_UNORM = 0x8b, - SURFACE_FORMAT_R32G32_SNORM = 0x8c, - SURFACE_FORMAT_R64_FLOAT = 0x8d, - SURFACE_FORMAT_R16G16B16X16_UNORM = 0x8e, - SURFACE_FORMAT_R16G16B16X16_FLOAT = 0x8f, - SURFACE_FORMAT_A32X32_FLOAT = 0x90, - SURFACE_FORMAT_L32X32_FLOAT = 0x91, - SURFACE_FORMAT_I32X32_FLOAT = 0x92, - SURFACE_FORMAT_R16G16B16A16_SSCALED = 0x93, - SURFACE_FORMAT_R16G16B16A16_USCALED = 0x94, - SURFACE_FORMAT_R32G32_SSCALED = 0x95, - SURFACE_FORMAT_R32G32_USCALED = 0x96, - SURFACE_FORMAT_R32G32_SFIXED = 0xa0, - SURFACE_FORMAT_R64_PASSTHRU = 0xa1, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xc0, - SURFACE_FORMAT_B8G8R8A8_UNORM_SRGB = 0xc1, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0xc2, - SURFACE_FORMAT_R10G10B10A2_UNORM_SRGB = 0xc3, - SURFACE_FORMAT_R10G10B10A2_UINT = 0xc4, - SURFACE_FORMAT_R10G10B10_SNORM_A2_UNORM = 0xc5, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0xc7, - SURFACE_FORMAT_R8G8B8A8_UNORM_SRGB = 0xc8, - SURFACE_FORMAT_R8G8B8A8_SNORM = 0xc9, - SURFACE_FORMAT_R8G8B8A8_SINT = 0xca, - SURFACE_FORMAT_R8G8B8A8_UINT = 0xcb, - SURFACE_FORMAT_R16G16_UNORM = 0xcc, - SURFACE_FORMAT_R16G16_SNORM = 0xcd, - SURFACE_FORMAT_R16G16_SINT = 0xce, - SURFACE_FORMAT_R16G16_UINT = 0xcf, - SURFACE_FORMAT_R16G16_FLOAT = 0xd0, - SURFACE_FORMAT_B10G10R10A2_UNORM = 0xd1, - SURFACE_FORMAT_B10G10R10A2_UNORM_SRGB = 0xd2, - SURFACE_FORMAT_R11G11B10_FLOAT = 0xd3, - SURFACE_FORMAT_R32_SINT = 0xd6, - SURFACE_FORMAT_R32_UINT = 0xd7, - SURFACE_FORMAT_R32_FLOAT = 0xd8, - SURFACE_FORMAT_R24_UNORM_X8_TYPELESS = 0xd9, - SURFACE_FORMAT_X24_TYPELESS_G8_UINT = 0xda, - SURFACE_FORMAT_L32_UNORM = 0xdd, - SURFACE_FORMAT_A32_UNORM = 0xde, - SURFACE_FORMAT_L16A16_UNORM = 0xdf, - SURFACE_FORMAT_I24X8_UNORM = 0xe0, - SURFACE_FORMAT_L24X8_UNORM = 0xe1, - SURFACE_FORMAT_A24X8_UNORM = 0xe2, - SURFACE_FORMAT_I32_FLOAT = 0xe3, - SURFACE_FORMAT_L32_FLOAT = 0xe4, - SURFACE_FORMAT_A32_FLOAT = 0xe5, - SURFACE_FORMAT_X8B8_UNORM_G8R8_SNORM = 0xe6, - SURFACE_FORMAT_A8X8_UNORM_G8R8_SNORM = 0xe7, - SURFACE_FORMAT_B8X8_UNORM_G8R8_SNORM = 0xe8, - SURFACE_FORMAT_B8G8R8X8_UNORM = 0xe9, - SURFACE_FORMAT_B8G8R8X8_UNORM_SRGB = 0xea, - SURFACE_FORMAT_R8G8B8X8_UNORM = 0xeb, - SURFACE_FORMAT_R8G8B8X8_UNORM_SRGB = 0xec, - SURFACE_FORMAT_R9G9B9E5_SHAREDEXP = 0xed, - SURFACE_FORMAT_B10G10R10X2_UNORM = 0xee, - SURFACE_FORMAT_L16A16_FLOAT = 0xf0, - SURFACE_FORMAT_R32_UNORM = 0xf1, - SURFACE_FORMAT_R32_SNORM = 0xf2, - SURFACE_FORMAT_R10G10B10X2_USCALED = 0xf3, - SURFACE_FORMAT_R8G8B8A8_SSCALED = 0xf4, - SURFACE_FORMAT_R8G8B8A8_USCALED = 0xf5, - SURFACE_FORMAT_R16G16_SSCALED = 0xf6, - SURFACE_FORMAT_R16G16_USCALED = 0xf7, - SURFACE_FORMAT_R32_SSCALED = 0xf8, - SURFACE_FORMAT_R32_USCALED = 0xf9, - SURFACE_FORMAT_B5G6R5_UNORM = 0x100, - SURFACE_FORMAT_B5G6R5_UNORM_SRGB = 0x101, - SURFACE_FORMAT_B5G5R5A1_UNORM = 0x102, - SURFACE_FORMAT_B5G5R5A1_UNORM_SRGB = 0x103, - SURFACE_FORMAT_B4G4R4A4_UNORM = 0x104, - SURFACE_FORMAT_B4G4R4A4_UNORM_SRGB = 0x105, - SURFACE_FORMAT_R8G8_UNORM = 0x106, - SURFACE_FORMAT_R8G8_SNORM = 0x107, - SURFACE_FORMAT_R8G8_SINT = 0x108, - SURFACE_FORMAT_R8G8_UINT = 0x109, - SURFACE_FORMAT_R16_UNORM = 0x10a, - SURFACE_FORMAT_R16_SNORM = 0x10b, - SURFACE_FORMAT_R16_SINT = 0x10c, - SURFACE_FORMAT_R16_UINT = 0x10d, - SURFACE_FORMAT_R16_FLOAT = 0x10e, - SURFACE_FORMAT_A8P8_UNORM_PALETTE0 = 0x10f, - SURFACE_FORMAT_A8P8_UNORM_PALETTE1 = 0x110, - SURFACE_FORMAT_I16_UNORM = 0x111, - SURFACE_FORMAT_L16_UNORM = 0x112, - SURFACE_FORMAT_A16_UNORM = 0x113, - SURFACE_FORMAT_L8A8_UNORM = 0x114, - SURFACE_FORMAT_I16_FLOAT = 0x115, - SURFACE_FORMAT_L16_FLOAT = 0x116, - SURFACE_FORMAT_A16_FLOAT = 0x117, - SURFACE_FORMAT_L8A8_UNORM_SRGB = 0x118, - SURFACE_FORMAT_R5G5_SNORM_B6_UNORM = 0x119, - SURFACE_FORMAT_B5G5R5X1_UNORM = 0x11a, - SURFACE_FORMAT_B5G5R5X1_UNORM_SRGB = 0x11b, - SURFACE_FORMAT_R8G8_SSCALED = 0x11c, - SURFACE_FORMAT_R8G8_USCALED = 0x11d, - SURFACE_FORMAT_R16_SSCALED = 0x11e, - SURFACE_FORMAT_R16_USCALED = 0x11f, - SURFACE_FORMAT_P8A8_UNORM_PALETTE0 = 0x122, - SURFACE_FORMAT_P8A8_UNORM_PALETTE1 = 0x123, - SURFACE_FORMAT_A1B5G5R5_UNORM = 0x124, - SURFACE_FORMAT_A4B4G4R4_UNORM = 0x125, - SURFACE_FORMAT_L8A8_UINT = 0x126, - SURFACE_FORMAT_L8A8_SINT = 0x127, - SURFACE_FORMAT_R8_UNORM = 0x140, - SURFACE_FORMAT_R8_SNORM = 0x141, - SURFACE_FORMAT_R8_SINT = 0x142, - SURFACE_FORMAT_R8_UINT = 0x143, - SURFACE_FORMAT_A8_UNORM = 0x144, - SURFACE_FORMAT_I8_UNORM = 0x145, - SURFACE_FORMAT_L8_UNORM = 0x146, - SURFACE_FORMAT_P4A4_UNORM_PALETTE0 = 0x147, - SURFACE_FORMAT_A4P4_UNORM_PALETTE0 = 0x148, - SURFACE_FORMAT_R8_SSCALED = 0x149, - SURFACE_FORMAT_R8_USCALED = 0x14a, - SURFACE_FORMAT_P8_UNORM_PALETTE0 = 0x14b, - SURFACE_FORMAT_L8_UNORM_SRGB = 0x14c, - SURFACE_FORMAT_P8_UNORM_PALETTE1 = 0x14d, - SURFACE_FORMAT_P4A4_UNORM_PALETTE1 = 0x14e, - SURFACE_FORMAT_A4P4_UNORM_PALETTE1 = 0x14f, - SURFACE_FORMAT_Y8_UNORM = 0x150, - SURFACE_FORMAT_L8_UINT = 0x152, - SURFACE_FORMAT_L8_SINT = 0x153, - SURFACE_FORMAT_I8_UINT = 0x154, - SURFACE_FORMAT_I8_SINT = 0x155, - SURFACE_FORMAT_DXT1_RGB_SRGB = 0x180, - SURFACE_FORMAT_R1_UNORM = 0x181, - SURFACE_FORMAT_YCRCB_NORMAL = 0x182, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x183, - SURFACE_FORMAT_P2_UNORM_PALETTE0 = 0x184, - SURFACE_FORMAT_P2_UNORM_PALETTE1 = 0x185, - SURFACE_FORMAT_BC1_UNORM = 0x186, - SURFACE_FORMAT_BC2_UNORM = 0x187, - SURFACE_FORMAT_BC3_UNORM = 0x188, - SURFACE_FORMAT_BC4_UNORM = 0x189, - SURFACE_FORMAT_BC5_UNORM = 0x18a, - SURFACE_FORMAT_BC1_UNORM_SRGB = 0x18b, - SURFACE_FORMAT_BC2_UNORM_SRGB = 0x18c, - SURFACE_FORMAT_BC3_UNORM_SRGB = 0x18d, - SURFACE_FORMAT_MONO8 = 0x18e, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x18f, - SURFACE_FORMAT_YCRCB_SWAPY = 0x190, - SURFACE_FORMAT_DXT1_RGB = 0x191, - SURFACE_FORMAT_FXT1 = 0x192, - SURFACE_FORMAT_R8G8B8_UNORM = 0x193, - SURFACE_FORMAT_R8G8B8_SNORM = 0x194, - SURFACE_FORMAT_R8G8B8_SSCALED = 0x195, - SURFACE_FORMAT_R8G8B8_USCALED = 0x196, - SURFACE_FORMAT_R64G64B64A64_FLOAT = 0x197, - SURFACE_FORMAT_R64G64B64_FLOAT = 0x198, - SURFACE_FORMAT_BC4_SNORM = 0x199, - SURFACE_FORMAT_BC5_SNORM = 0x19a, - SURFACE_FORMAT_R16G16B16_FLOAT = 0x19b, - SURFACE_FORMAT_R16G16B16_UNORM = 0x19c, - SURFACE_FORMAT_R16G16B16_SNORM = 0x19d, - SURFACE_FORMAT_R16G16B16_SSCALED = 0x19e, - SURFACE_FORMAT_R16G16B16_USCALED = 0x19f, - SURFACE_FORMAT_BC6H_SF16 = 0x1a1, - SURFACE_FORMAT_BC7_UNORM = 0x1a2, - SURFACE_FORMAT_BC7_UNORM_SRGB = 0x1a3, - SURFACE_FORMAT_BC6H_UF16 = 0x1a4, - SURFACE_FORMAT_PLANAR_420_8 = 0x1a5, - SURFACE_FORMAT_PLANAR_420_16 = 0x1a6, - SURFACE_FORMAT_R8G8B8_UNORM_SRGB = 0x1a8, - SURFACE_FORMAT_ETC1_RGB8 = 0x1a9, - SURFACE_FORMAT_ETC2_RGB8 = 0x1aa, - SURFACE_FORMAT_EAC_R11 = 0x1ab, - SURFACE_FORMAT_EAC_RG11 = 0x1ac, - SURFACE_FORMAT_EAC_SIGNED_R11 = 0x1ad, - SURFACE_FORMAT_EAC_SIGNED_RG11 = 0x1ae, - SURFACE_FORMAT_ETC2_SRGB8 = 0x1af, - SURFACE_FORMAT_R16G16B16_UINT = 0x1b0, - SURFACE_FORMAT_R16G16B16_SINT = 0x1b1, - SURFACE_FORMAT_R32_SFIXED = 0x1b2, - SURFACE_FORMAT_R10G10B10A2_SNORM = 0x1b3, - SURFACE_FORMAT_R10G10B10A2_USCALED = 0x1b4, - SURFACE_FORMAT_R10G10B10A2_SSCALED = 0x1b5, - SURFACE_FORMAT_R10G10B10A2_SINT = 0x1b6, - SURFACE_FORMAT_B10G10R10A2_SNORM = 0x1b7, - SURFACE_FORMAT_B10G10R10A2_USCALED = 0x1b8, - SURFACE_FORMAT_B10G10R10A2_SSCALED = 0x1b9, - SURFACE_FORMAT_B10G10R10A2_UINT = 0x1ba, - SURFACE_FORMAT_B10G10R10A2_SINT = 0x1bb, - SURFACE_FORMAT_R64G64B64A64_PASSTHRU = 0x1bc, - SURFACE_FORMAT_R64G64B64_PASSTHRU = 0x1bd, - SURFACE_FORMAT_ETC2_RGB8_PTA = 0x1c0, - SURFACE_FORMAT_ETC2_SRGB8_PTA = 0x1c1, - SURFACE_FORMAT_ETC2_EAC_RGBA8 = 0x1c2, - SURFACE_FORMAT_ETC2_EAC_SRGB8_A8 = 0x1c3, - SURFACE_FORMAT_R8G8B8_UINT = 0x1c8, - SURFACE_FORMAT_R8G8B8_SINT = 0x1c9, - SURFACE_FORMAT_RAW = 0x1ff, - } SURFACE_FORMAT; - typedef enum tagSURFACE_TYPE { - SURFACE_TYPE_SURFTYPE_1D = 0x0, - SURFACE_TYPE_SURFTYPE_2D = 0x1, - SURFACE_TYPE_SURFTYPE_3D = 0x2, - SURFACE_TYPE_SURFTYPE_CUBE = 0x3, - SURFACE_TYPE_SURFTYPE_BUFFER = 0x4, - SURFACE_TYPE_SURFTYPE_STRBUF = 0x5, - SURFACE_TYPE_SURFTYPE_NULL = 0x7, - } SURFACE_TYPE; - typedef enum tagNUMBER_OF_MULTISAMPLES { - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1 = 0x0, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_2 = 0x1, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_4 = 0x2, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_8 = 0x3, - NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_16 = 0x4, - } NUMBER_OF_MULTISAMPLES; - typedef enum tagMULTISAMPLED_SURFACE_STORAGE_FORMAT { - MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS = 0x0, - MULTISAMPLED_SURFACE_STORAGE_FORMAT_DEPTH_STENCIL = 0x1, - } MULTISAMPLED_SURFACE_STORAGE_FORMAT; - typedef enum tagRENDER_TARGET_AND_SAMPLE_UNORM_ROTATION { - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG = 0x0, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_90DEG = 0x1, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_180DEG = 0x2, - RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_270DEG = 0x3, - } RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION; - typedef enum tagCOHERENCY_TYPE { - COHERENCY_TYPE_GPU_COHERENT = 0x0, - COHERENCY_TYPE_IA_COHERENT = 0x1, - } COHERENCY_TYPE; - typedef enum tagTILED_RESOURCE_MODE { - TILED_RESOURCE_MODE_NONE = 0x0, - TILED_RESOURCE_MODE_4KB = 0x1, - TILED_RESOURCE_MODE_TILEYF = 0x1, - TILED_RESOURCE_MODE_64KB = 0x2, - TILED_RESOURCE_MODE_TILEYS = 0x2, - } TILED_RESOURCE_MODE; - typedef enum tagAUXILIARY_SURFACE_MODE { - AUXILIARY_SURFACE_MODE_AUX_NONE = 0x0, - AUXILIARY_SURFACE_MODE_AUX_CCS_D = 0x1, - AUXILIARY_SURFACE_MODE_AUX_APPEND = 0x2, - AUXILIARY_SURFACE_MODE_AUX_HIZ = 0x3, - AUXILIARY_SURFACE_MODE_AUX_CCS_E = 0x5, - } AUXILIARY_SURFACE_MODE; - typedef enum tagSHADER_CHANNEL_SELECT { - SHADER_CHANNEL_SELECT_ZERO = 0x0, - SHADER_CHANNEL_SELECT_ONE = 0x1, - SHADER_CHANNEL_SELECT_RED = 0x4, - SHADER_CHANNEL_SELECT_GREEN = 0x5, - SHADER_CHANNEL_SELECT_BLUE = 0x6, - SHADER_CHANNEL_SELECT_ALPHA = 0x7, - } SHADER_CHANNEL_SELECT; - typedef enum tagMEMORY_COMPRESSION_MODE { - MEMORY_COMPRESSION_MODE_HORIZONTAL = 0x0, - MEMORY_COMPRESSION_MODE_VERTICAL = 0x1, - } MEMORY_COMPRESSION_MODE; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x20, - SURFACEBASEADDRESS_INDEX = 0x8, - AUXILIARYSURFACEBASEADDRESS_BYTEOFFSET = 0x28, - AUXILIARYSURFACEBASEADDRESS_INDEX = 0xa, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MediaBoundaryPixelMode = MEDIA_BOUNDARY_PIXEL_MODE_NORMAL_MODE; - TheStructure.Common.RenderCacheReadWriteMode = RENDER_CACHE_READ_WRITE_MODE_WRITE_ONLY_CACHE; - TheStructure.Common.TileMode = TILE_MODE_LINEAR; - TheStructure.Common.SurfaceHorizontalAlignment = SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4; - TheStructure.Common.SurfaceVerticalAlignment = SURFACE_VERTICAL_ALIGNMENT_VALIGN_4; - TheStructure.Common.SurfaceType = SURFACE_TYPE_SURFTYPE_1D; - TheStructure.Common.CoherencyType = COHERENCY_TYPE_GPU_COHERENT; - TheStructure.Common.TiledResourceMode = TILED_RESOURCE_MODE_NONE; - TheStructure.Common.ShaderChannelSelectAlpha = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectBlue = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectGreen = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.ShaderChannelSelectRed = SHADER_CHANNEL_SELECT_ZERO; - TheStructure.Common.MemoryCompressionMode = MEMORY_COMPRESSION_MODE_HORIZONTAL; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = NUMBER_OF_MULTISAMPLES_MULTISAMPLECOUNT_1; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = MULTISAMPLED_SURFACE_STORAGE_FORMAT_MSS; - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION_0DEG; - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = AUXILIARY_SURFACE_MODE_AUX_NONE; - } - static tagRENDER_SURFACE_STATE sInit() { - RENDER_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 16); - return TheStructure.RawData[index]; - } - inline void setMediaBoundaryPixelMode(const MEDIA_BOUNDARY_PIXEL_MODE value) { - TheStructure.Common.MediaBoundaryPixelMode = value; - } - inline MEDIA_BOUNDARY_PIXEL_MODE getMediaBoundaryPixelMode() const { - return static_cast(TheStructure.Common.MediaBoundaryPixelMode); - } - inline void setRenderCacheReadWriteMode(const RENDER_CACHE_READ_WRITE_MODE value) { - TheStructure.Common.RenderCacheReadWriteMode = value; - } - inline RENDER_CACHE_READ_WRITE_MODE getRenderCacheReadWriteMode() const { - return static_cast(TheStructure.Common.RenderCacheReadWriteMode); - } - inline void setSamplerL2OutOfOrderModeDisable(const bool value) { - TheStructure.Common.SamplerL2OutOfOrderModeDisable = value; - } - inline bool getSamplerL2OutOfOrderModeDisable() const { - return (TheStructure.Common.SamplerL2OutOfOrderModeDisable); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setSurfaceHorizontalAlignment(const SURFACE_HORIZONTAL_ALIGNMENT value) { - TheStructure.Common.SurfaceHorizontalAlignment = value; - } - inline SURFACE_HORIZONTAL_ALIGNMENT getSurfaceHorizontalAlignment() const { - return static_cast(TheStructure.Common.SurfaceHorizontalAlignment); - } - inline void setSurfaceVerticalAlignment(const SURFACE_VERTICAL_ALIGNMENT value) { - TheStructure.Common.SurfaceVerticalAlignment = value; - } - inline SURFACE_VERTICAL_ALIGNMENT getSurfaceVerticalAlignment() const { - return static_cast(TheStructure.Common.SurfaceVerticalAlignment); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setAstcEnable(const bool value) { - TheStructure.Common.Astc_Enable = value; - } - inline bool getAstcEnable() const { - return (TheStructure.Common.Astc_Enable); - } - inline void setSurfaceArray(const bool value) { - TheStructure.Common.SurfaceArray = value; - } - inline bool getSurfaceArray() const { - return (TheStructure.Common.SurfaceArray); - } - inline void setSurfaceType(const SURFACE_TYPE value) { - TheStructure.Common.SurfaceType = value; - } - inline SURFACE_TYPE getSurfaceType() const { - return static_cast(TheStructure.Common.SurfaceType); - } - typedef enum tagSURFACEQPITCH { - SURFACEQPITCH_BIT_SHIFT = 0x2, - SURFACEQPITCH_ALIGN_SIZE = 0x4, - } SURFACEQPITCH; - inline void setSurfaceQpitch(const uint32_t value) { - TheStructure.Common.SurfaceQpitch = value >> SURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getSurfaceQpitch() const { - return (TheStructure.Common.SurfaceQpitch << SURFACEQPITCH_BIT_SHIFT); - } - inline void setBaseMipLevel(const uint32_t value) { - TheStructure.Common.BaseMipLevel = value; - } - inline uint32_t getBaseMipLevel() const { - return (TheStructure.Common.BaseMipLevel); - } - inline void setMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_Reserved = value; - } - inline uint32_t getMemoryObjectControlStateReserved() const { - return (TheStructure.Common.MemoryObjectControlState_Reserved); - } - inline void setMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_Reserved = value; - TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); - } - inline uint32_t getMemoryObjectControlState() const { - uint32_t mocs = TheStructure.Common.MemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.MemoryObjectControlState_IndexToMocsTables << 1); - return (mocs); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setDepth(const uint32_t value) { - TheStructure.Common.Depth = value - 1; - } - inline uint32_t getDepth() const { - return (TheStructure.Common.Depth + 1); - } - inline void setMipCountLod(const uint32_t value) { - TheStructure.Common.MipCountLod = value; - } - inline uint32_t getMipCountLod() const { - return (TheStructure.Common.MipCountLod); - } - inline void setSurfaceMinLod(const uint32_t value) { - TheStructure.Common.SurfaceMinLod = value; - } - inline uint32_t getSurfaceMinLod() const { - return (TheStructure.Common.SurfaceMinLod); - } - inline void setMipTailStartLod(const uint32_t value) { - TheStructure.Common.MipTailStartLod = value; - } - inline uint32_t getMipTailStartLod() const { - return (TheStructure.Common.MipTailStartLod); - } - inline void setCoherencyType(const COHERENCY_TYPE value) { - TheStructure.Common.CoherencyType = value; - } - inline COHERENCY_TYPE getCoherencyType() const { - return static_cast(TheStructure.Common.CoherencyType); - } - inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { - TheStructure.Common.TiledResourceMode = value; - } - inline TILED_RESOURCE_MODE getTiledResourceMode() const { - return static_cast(TheStructure.Common.TiledResourceMode); - } - inline void setEwaDisableForCube(const bool value) { - TheStructure.Common.EwaDisableForCube = value; - } - inline bool getEwaDisableForCube() const { - return (TheStructure.Common.EwaDisableForCube); - } - typedef enum tagYOFFSET { - YOFFSET_BIT_SHIFT = 0x2, - YOFFSET_ALIGN_SIZE = 0x4, - } YOFFSET; - inline void setYOffset(const uint32_t value) { - TheStructure.Common.YOffset = value >> YOFFSET_BIT_SHIFT; - } - inline uint32_t getYOffset() const { - return (TheStructure.Common.YOffset << YOFFSET_BIT_SHIFT); - } - typedef enum tagXOFFSET { - XOFFSET_BIT_SHIFT = 0x2, - XOFFSET_ALIGN_SIZE = 0x4, - } XOFFSET; - inline void setXOffset(const uint32_t value) { - TheStructure.Common.XOffset = value >> XOFFSET_BIT_SHIFT; - } - inline uint32_t getXOffset() const { - return (TheStructure.Common.XOffset << XOFFSET_BIT_SHIFT); - } - inline void setResourceMinLod(const uint32_t value) { - TheStructure.Common.ResourceMinLod = value; - } - inline uint32_t getResourceMinLod() const { - return (TheStructure.Common.ResourceMinLod); - } - inline void setShaderChannelSelectAlpha(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectAlpha = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectAlpha() const { - return static_cast(TheStructure.Common.ShaderChannelSelectAlpha); - } - inline void setShaderChannelSelectBlue(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectBlue = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectBlue() const { - return static_cast(TheStructure.Common.ShaderChannelSelectBlue); - } - inline void setShaderChannelSelectGreen(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectGreen = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectGreen() const { - return static_cast(TheStructure.Common.ShaderChannelSelectGreen); - } - inline void setShaderChannelSelectRed(const SHADER_CHANNEL_SELECT value) { - TheStructure.Common.ShaderChannelSelectRed = value; - } - inline SHADER_CHANNEL_SELECT getShaderChannelSelectRed() const { - return static_cast(TheStructure.Common.ShaderChannelSelectRed); - } - inline void setMemoryCompressionEnable(const bool value) { - TheStructure.Common.MemoryCompressionEnable = value; - } - inline bool getMemoryCompressionEnable() const { - return (TheStructure.Common.MemoryCompressionEnable); - } - inline void setMemoryCompressionMode(const MEMORY_COMPRESSION_MODE value) { - TheStructure.Common.MemoryCompressionMode = value; - } - inline MEMORY_COMPRESSION_MODE getMemoryCompressionMode() const { - return static_cast(TheStructure.Common.MemoryCompressionMode); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddress = value; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddress); - } - inline void setQuiltWidth(const uint64_t value) { - TheStructure.Common.QuiltWidth = value; - } - inline uint64_t getQuiltWidth() const { - return (TheStructure.Common.QuiltWidth); - } - inline void setQuiltHeight(const uint64_t value) { - TheStructure.Common.QuiltHeight = value; - } - inline uint64_t getQuiltHeight() const { - return (TheStructure.Common.QuiltHeight); - } - inline void setCubeFaceEnablePositiveZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ = value; - } - inline bool getCubeFaceEnablePositiveZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveZ); - } - inline void setCubeFaceEnableNegativeZ(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ = value; - } - inline bool getCubeFaceEnableNegativeZ() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeZ); - } - inline void setCubeFaceEnablePositiveY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY = value; - } - inline bool getCubeFaceEnablePositiveY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveY); - } - inline void setCubeFaceEnableNegativeY(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY = value; - } - inline bool getCubeFaceEnableNegativeY() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeY); - } - inline void setCubeFaceEnablePositiveX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX = value; - } - inline bool getCubeFaceEnablePositiveX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_PositiveX); - } - inline void setCubeFaceEnableNegativeX(const bool value) { - TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX = value; - } - inline bool getCubeFaceEnableNegativeX() const { - return (TheStructure.SurfaceTypeIsSurftype_Cube.CubeFaceEnable_NegativeX); - } - inline void setMultisamplePositionPaletteIndex(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex = value; - } - inline uint32_t getMultisamplePositionPaletteIndex() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisamplePositionPaletteIndex); - } - inline void setNumberOfMultisamples(const NUMBER_OF_MULTISAMPLES value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples = value; - } - inline NUMBER_OF_MULTISAMPLES getNumberOfMultisamples() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.NumberOfMultisamples); - } - inline void setMultisampledSurfaceStorageFormat(const MULTISAMPLED_SURFACE_STORAGE_FORMAT value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat = value; - } - inline MULTISAMPLED_SURFACE_STORAGE_FORMAT getMultisampledSurfaceStorageFormat() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MultisampledSurfaceStorageFormat); - } - inline void setRenderTargetViewExtent(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent = value - 1; - } - inline uint32_t getRenderTargetViewExtent() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetViewExtent + 1); - } - inline void setMinimumArrayElement(const uint32_t value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement = value; - } - inline uint32_t getMinimumArrayElement() const { - return (TheStructure.SurfaceTypeIsnotSurftype_Strbuf.MinimumArrayElement); - } - inline void setRenderTargetAndSampleUnormRotation(const RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION value) { - TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation = value; - } - inline RENDER_TARGET_AND_SAMPLE_UNORM_ROTATION getRenderTargetAndSampleUnormRotation() const { - return static_cast(TheStructure.SurfaceTypeIsnotSurftype_Strbuf.RenderTargetAndSampleUnormRotation); - } - inline void setAuxiliarySurfaceMode(const AUXILIARY_SURFACE_MODE value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = value; - } - inline AUXILIARY_SURFACE_MODE getAuxiliarySurfaceMode() const { - return static_cast(TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode); - } - inline void setAuxiliarySurfacePitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch = value - 1; - } - inline uint32_t getAuxiliarySurfacePitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfacePitch + 1); - } - typedef enum tagAUXILIARYSURFACEQPITCH { - AUXILIARYSURFACEQPITCH_BIT_SHIFT = 0x2, - AUXILIARYSURFACEQPITCH_ALIGN_SIZE = 0x4, - } AUXILIARYSURFACEQPITCH; - inline void setAuxiliarySurfaceQpitch(const uint32_t value) { - TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch = value >> AUXILIARYSURFACEQPITCH_BIT_SHIFT; - } - inline uint32_t getAuxiliarySurfaceQpitch() const { - return (TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceQpitch << AUXILIARYSURFACEQPITCH_BIT_SHIFT); - } - inline void setYOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane = value; - } - inline uint32_t getYOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForUOrUvPlane); - } - inline void setXOffsetForUOrUvPlane(const uint32_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane = value; - } - inline uint32_t getXOffsetForUOrUvPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForUOrUvPlane); - } - inline void setSeparateUvPlaneEnable(const bool value) { - TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable = value; - } - inline bool getSeparateUvPlaneEnable() const { - return (TheStructure._SurfaceFormatIsPlanar.SeparateUvPlaneEnable); - } - inline void setYOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane = value; - } - inline uint64_t getYOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.YOffsetForVPlane); - } - inline void setXOffsetForVPlane(const uint64_t value) { - TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane = value; - } - inline uint64_t getXOffsetForVPlane() const { - return (TheStructure._SurfaceFormatIsPlanar.XOffsetForVPlane); - } - typedef enum tagAUXILIARYSURFACEBASEADDRESS { - AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT = 0xc, - AUXILIARYSURFACEBASEADDRESS_ALIGN_SIZE = 0x1000, - } AUXILIARYSURFACEBASEADDRESS; - inline void setAuxiliarySurfaceBaseAddress(const uint64_t value) { - TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress = value >> AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getAuxiliarySurfaceBaseAddress() const { - return (TheStructure._SurfaceFormatIsnotPlanarAndMemoryCompressionEnableIs0.AuxiliarySurfaceBaseAddress << AUXILIARYSURFACEBASEADDRESS_BIT_SHIFT); - } - inline void setAuxiliaryTableIndexForMediaCompressedSurface(const uint64_t value) { - TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface = value; - } - inline uint64_t getAuxiliaryTableIndexForMediaCompressedSurface() const { - return (TheStructure.MemoryCompressionEnableIs1.AuxiliaryTableIndexForMediaCompressedSurface); - } - inline void setHierarchicalDepthClearValue(const float value) { - TheStructure.AuxiliarySurfaceModeIsAux_Hiz.HierarchicalDepthClearValue = value; - } - inline float getHierarchicalDepthClearValue() const { - return (TheStructure.AuxiliarySurfaceModeIsAux_Hiz.HierarchicalDepthClearValue); - } - inline void setRedClearColor(const uint32_t value) { - TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.RedClearColor = value; - } - inline uint32_t getRedClearColor() const { - return (TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.RedClearColor); - } - inline void setGreenClearColor(const uint32_t value) { - TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.GreenClearColor = value; - } - inline uint32_t getGreenClearColor() const { - return (TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.GreenClearColor); - } - inline void setBlueClearColor(const uint32_t value) { - TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.BlueClearColor = value; - } - inline uint32_t getBlueClearColor() const { - return (TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.BlueClearColor); - } - inline void setAlphaClearColor(const uint32_t value) { - TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.AlphaClearColor = value; - } - inline uint32_t getAlphaClearColor() const { - return (TheStructure.AuxiliarySurfaceModeIsAux_Ccs_DOrAuxiliarySurfaceModeIsAux_Ccs_E.AlphaClearColor); - } -} RENDER_SURFACE_STATE; -STATIC_ASSERT(64 == sizeof(RENDER_SURFACE_STATE)); - -typedef struct tagSAMPLER_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t LodAlgorithm : BITFIELD_RANGE(0, 0); - uint32_t TextureLodBias : BITFIELD_RANGE(1, 13); - uint32_t MinModeFilter : BITFIELD_RANGE(14, 16); - uint32_t MagModeFilter : BITFIELD_RANGE(17, 19); - uint32_t MipModeFilter : BITFIELD_RANGE(20, 21); - uint32_t CoarseLodQualityMode : BITFIELD_RANGE(22, 26); - uint32_t LodPreclampMode : BITFIELD_RANGE(27, 28); - uint32_t TextureBorderColorMode : BITFIELD_RANGE(29, 29); - uint32_t Reserved_30 : BITFIELD_RANGE(30, 30); - uint32_t SamplerDisable : BITFIELD_RANGE(31, 31); - uint32_t CubeSurfaceControlMode : BITFIELD_RANGE(0, 0); - uint32_t ShadowFunction : BITFIELD_RANGE(1, 3); - uint32_t ChromakeyMode : BITFIELD_RANGE(4, 4); - uint32_t ChromakeyIndex : BITFIELD_RANGE(5, 6); - uint32_t ChromakeyEnable : BITFIELD_RANGE(7, 7); - uint32_t MaxLod : BITFIELD_RANGE(8, 19); - uint32_t MinLod : BITFIELD_RANGE(20, 31); - uint32_t LodClampMagnificationMode : BITFIELD_RANGE(0, 0); - uint32_t Reserved_65 : BITFIELD_RANGE(1, 5); - uint32_t IndirectStatePointer : BITFIELD_RANGE(6, 23); - uint32_t Reserved_88 : BITFIELD_RANGE(24, 31); - uint32_t TczAddressControlMode : BITFIELD_RANGE(0, 2); - uint32_t TcyAddressControlMode : BITFIELD_RANGE(3, 5); - uint32_t TcxAddressControlMode : BITFIELD_RANGE(6, 8); - uint32_t ReductionTypeEnable : BITFIELD_RANGE(9, 9); - uint32_t Non_NormalizedCoordinateEnable : BITFIELD_RANGE(10, 10); - uint32_t TrilinearFilterQuality : BITFIELD_RANGE(11, 12); - uint32_t RAddressMinFilterRoundingEnable : BITFIELD_RANGE(13, 13); - uint32_t RAddressMagFilterRoundingEnable : BITFIELD_RANGE(14, 14); - uint32_t VAddressMinFilterRoundingEnable : BITFIELD_RANGE(15, 15); - uint32_t VAddressMagFilterRoundingEnable : BITFIELD_RANGE(16, 16); - uint32_t UAddressMinFilterRoundingEnable : BITFIELD_RANGE(17, 17); - uint32_t UAddressMagFilterRoundingEnable : BITFIELD_RANGE(18, 18); - uint32_t MaximumAnisotropy : BITFIELD_RANGE(19, 21); - uint32_t ReductionType : BITFIELD_RANGE(22, 23); - uint32_t Reserved_120 : BITFIELD_RANGE(24, 31); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagLOD_ALGORITHM { - LOD_ALGORITHM_LEGACY = 0x0, - LOD_ALGORITHM_EWA_APPROXIMATION = 0x1, - } LOD_ALGORITHM; - typedef enum tagMIN_MODE_FILTER { - MIN_MODE_FILTER_NEAREST = 0x0, - MIN_MODE_FILTER_LINEAR = 0x1, - MIN_MODE_FILTER_ANISOTROPIC = 0x2, - MIN_MODE_FILTER_MONO = 0x6, - } MIN_MODE_FILTER; - typedef enum tagMAG_MODE_FILTER { - MAG_MODE_FILTER_NEAREST = 0x0, - MAG_MODE_FILTER_LINEAR = 0x1, - MAG_MODE_FILTER_ANISOTROPIC = 0x2, - MAG_MODE_FILTER_MONO = 0x6, - } MAG_MODE_FILTER; - typedef enum tagMIP_MODE_FILTER { - MIP_MODE_FILTER_NONE = 0x0, - MIP_MODE_FILTER_NEAREST = 0x1, - MIP_MODE_FILTER_LINEAR = 0x3, - } MIP_MODE_FILTER; - typedef enum tagCOARSE_LOD_QUALITY_MODE { - COARSE_LOD_QUALITY_MODE_DISABLED = 0x0, - } COARSE_LOD_QUALITY_MODE; - typedef enum tagLOD_PRECLAMP_MODE { - LOD_PRECLAMP_MODE_NONE = 0x0, - LOD_PRECLAMP_MODE_OGL = 0x2, - } LOD_PRECLAMP_MODE; - typedef enum tagTEXTURE_BORDER_COLOR_MODE { - TEXTURE_BORDER_COLOR_MODE_DX10_OGL = 0x0, - TEXTURE_BORDER_COLOR_MODE_DX9 = 0x1, - } TEXTURE_BORDER_COLOR_MODE; - typedef enum tagCUBE_SURFACE_CONTROL_MODE { - CUBE_SURFACE_CONTROL_MODE_PROGRAMMED = 0x0, - CUBE_SURFACE_CONTROL_MODE_OVERRIDE = 0x1, - } CUBE_SURFACE_CONTROL_MODE; - typedef enum tagSHADOW_FUNCTION { - SHADOW_FUNCTION_PREFILTEROP_ALWAYS = 0x0, - SHADOW_FUNCTION_PREFILTEROP_NEVER = 0x1, - SHADOW_FUNCTION_PREFILTEROP_LESS = 0x2, - SHADOW_FUNCTION_PREFILTEROP_EQUAL = 0x3, - SHADOW_FUNCTION_PREFILTEROP_LEQUAL = 0x4, - SHADOW_FUNCTION_PREFILTEROP_GREATER = 0x5, - SHADOW_FUNCTION_PREFILTEROP_NOTEQUAL = 0x6, - SHADOW_FUNCTION_PREFILTEROP_GEQUAL = 0x7, - } SHADOW_FUNCTION; - typedef enum tagCHROMAKEY_MODE { - CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH = 0x0, - CHROMAKEY_MODE_KEYFILTER_REPLACE_BLACK = 0x1, - } CHROMAKEY_MODE; - typedef enum tagLOD_CLAMP_MAGNIFICATION_MODE { - LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE = 0x0, - LOD_CLAMP_MAGNIFICATION_MODE_MIPFILTER = 0x1, - } LOD_CLAMP_MAGNIFICATION_MODE; - typedef enum tagTEXTURE_COORDINATE_MODE { - TEXTURE_COORDINATE_MODE_WRAP = 0x0, - TEXTURE_COORDINATE_MODE_MIRROR = 0x1, - TEXTURE_COORDINATE_MODE_CLAMP = 0x2, - TEXTURE_COORDINATE_MODE_CUBE = 0x3, - TEXTURE_COORDINATE_MODE_CLAMP_BORDER = 0x4, - TEXTURE_COORDINATE_MODE_MIRROR_ONCE = 0x5, - TEXTURE_COORDINATE_MODE_HALF_BORDER = 0x6, - TEXTURE_COORDINATE_MODE_MIRROR_101 = 0x7, - } TEXTURE_COORDINATE_MODE; - typedef enum tagTRILINEAR_FILTER_QUALITY { - TRILINEAR_FILTER_QUALITY_FULL = 0x0, - TRILINEAR_FILTER_QUALITY_TRIQUAL_HIGH_MAG_CLAMP_MIPFILTER = 0x1, - TRILINEAR_FILTER_QUALITY_MED = 0x2, - TRILINEAR_FILTER_QUALITY_LOW = 0x3, - } TRILINEAR_FILTER_QUALITY; - typedef enum tagMAXIMUM_ANISOTROPY { - MAXIMUM_ANISOTROPY_RATIO_21 = 0x0, - MAXIMUM_ANISOTROPY_RATIO_41 = 0x1, - MAXIMUM_ANISOTROPY_RATIO_61 = 0x2, - MAXIMUM_ANISOTROPY_RATIO_81 = 0x3, - MAXIMUM_ANISOTROPY_RATIO_101 = 0x4, - MAXIMUM_ANISOTROPY_RATIO_121 = 0x5, - MAXIMUM_ANISOTROPY_RATIO_141 = 0x6, - MAXIMUM_ANISOTROPY_RATIO_161 = 0x7, - } MAXIMUM_ANISOTROPY; - typedef enum tagREDUCTION_TYPE { - REDUCTION_TYPE_STD_FILTER = 0x0, - REDUCTION_TYPE_COMPARISON = 0x1, - REDUCTION_TYPE_MINIMUM = 0x2, - REDUCTION_TYPE_MAXIMUM = 0x3, - } REDUCTION_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.LodAlgorithm = LOD_ALGORITHM_LEGACY; - TheStructure.Common.MinModeFilter = MIN_MODE_FILTER_NEAREST; - TheStructure.Common.MagModeFilter = MAG_MODE_FILTER_NEAREST; - TheStructure.Common.MipModeFilter = MIP_MODE_FILTER_NONE; - TheStructure.Common.CoarseLodQualityMode = COARSE_LOD_QUALITY_MODE_DISABLED; - TheStructure.Common.LodPreclampMode = LOD_PRECLAMP_MODE_NONE; - TheStructure.Common.TextureBorderColorMode = TEXTURE_BORDER_COLOR_MODE_DX10_OGL; - TheStructure.Common.CubeSurfaceControlMode = CUBE_SURFACE_CONTROL_MODE_PROGRAMMED; - TheStructure.Common.ShadowFunction = SHADOW_FUNCTION_PREFILTEROP_ALWAYS; - TheStructure.Common.ChromakeyMode = CHROMAKEY_MODE_KEYFILTER_KILL_ON_ANY_MATCH; - TheStructure.Common.LodClampMagnificationMode = LOD_CLAMP_MAGNIFICATION_MODE_MIPNONE; - TheStructure.Common.TczAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcyAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TcxAddressControlMode = TEXTURE_COORDINATE_MODE_WRAP; - TheStructure.Common.TrilinearFilterQuality = TRILINEAR_FILTER_QUALITY_FULL; - TheStructure.Common.MaximumAnisotropy = MAXIMUM_ANISOTROPY_RATIO_21; - TheStructure.Common.ReductionType = REDUCTION_TYPE_STD_FILTER; - } - static tagSAMPLER_STATE sInit() { - SAMPLER_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setLodAlgorithm(const LOD_ALGORITHM value) { - TheStructure.Common.LodAlgorithm = value; - } - inline LOD_ALGORITHM getLodAlgorithm() const { - return static_cast(TheStructure.Common.LodAlgorithm); - } - inline void setTextureLodBias(const uint32_t value) { - TheStructure.Common.TextureLodBias = value; - } - inline uint32_t getTextureLodBias() const { - return (TheStructure.Common.TextureLodBias); - } - inline void setMinModeFilter(const MIN_MODE_FILTER value) { - TheStructure.Common.MinModeFilter = value; - } - inline MIN_MODE_FILTER getMinModeFilter() const { - return static_cast(TheStructure.Common.MinModeFilter); - } - inline void setMagModeFilter(const MAG_MODE_FILTER value) { - TheStructure.Common.MagModeFilter = value; - } - inline MAG_MODE_FILTER getMagModeFilter() const { - return static_cast(TheStructure.Common.MagModeFilter); - } - inline void setMipModeFilter(const MIP_MODE_FILTER value) { - TheStructure.Common.MipModeFilter = value; - } - inline MIP_MODE_FILTER getMipModeFilter() const { - return static_cast(TheStructure.Common.MipModeFilter); - } - inline void setCoarseLodQualityMode(const COARSE_LOD_QUALITY_MODE value) { - TheStructure.Common.CoarseLodQualityMode = value; - } - inline COARSE_LOD_QUALITY_MODE getCoarseLodQualityMode() const { - return static_cast(TheStructure.Common.CoarseLodQualityMode); - } - inline void setLodPreclampMode(const LOD_PRECLAMP_MODE value) { - TheStructure.Common.LodPreclampMode = value; - } - inline LOD_PRECLAMP_MODE getLodPreclampMode() const { - return static_cast(TheStructure.Common.LodPreclampMode); - } - inline void setTextureBorderColorMode(const TEXTURE_BORDER_COLOR_MODE value) { - TheStructure.Common.TextureBorderColorMode = value; - } - inline TEXTURE_BORDER_COLOR_MODE getTextureBorderColorMode() const { - return static_cast(TheStructure.Common.TextureBorderColorMode); - } - inline void setSamplerDisable(const bool value) { - TheStructure.Common.SamplerDisable = value; - } - inline bool getSamplerDisable() const { - return (TheStructure.Common.SamplerDisable); - } - inline void setCubeSurfaceControlMode(const CUBE_SURFACE_CONTROL_MODE value) { - TheStructure.Common.CubeSurfaceControlMode = value; - } - inline CUBE_SURFACE_CONTROL_MODE getCubeSurfaceControlMode() const { - return static_cast(TheStructure.Common.CubeSurfaceControlMode); - } - inline void setShadowFunction(const SHADOW_FUNCTION value) { - TheStructure.Common.ShadowFunction = value; - } - inline SHADOW_FUNCTION getShadowFunction() const { - return static_cast(TheStructure.Common.ShadowFunction); - } - inline void setChromakeyMode(const CHROMAKEY_MODE value) { - TheStructure.Common.ChromakeyMode = value; - } - inline CHROMAKEY_MODE getChromakeyMode() const { - return static_cast(TheStructure.Common.ChromakeyMode); - } - inline void setChromakeyIndex(const uint32_t value) { - TheStructure.Common.ChromakeyIndex = value; - } - inline uint32_t getChromakeyIndex() const { - return (TheStructure.Common.ChromakeyIndex); - } - inline void setChromakeyEnable(const bool value) { - TheStructure.Common.ChromakeyEnable = value; - } - inline bool getChromakeyEnable() const { - return (TheStructure.Common.ChromakeyEnable); - } - inline void setMaxLod(const uint32_t value) { - TheStructure.Common.MaxLod = value; - } - inline uint32_t getMaxLod() const { - return (TheStructure.Common.MaxLod); - } - inline void setMinLod(const uint32_t value) { - TheStructure.Common.MinLod = value; - } - inline uint32_t getMinLod() const { - return (TheStructure.Common.MinLod); - } - inline void setLodClampMagnificationMode(const LOD_CLAMP_MAGNIFICATION_MODE value) { - TheStructure.Common.LodClampMagnificationMode = value; - } - inline LOD_CLAMP_MAGNIFICATION_MODE getLodClampMagnificationMode() const { - return static_cast(TheStructure.Common.LodClampMagnificationMode); - } - typedef enum tagINDIRECTSTATEPOINTER { - INDIRECTSTATEPOINTER_BIT_SHIFT = 0x6, - INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40, - } INDIRECTSTATEPOINTER; - inline uint32_t getIndirectStatePointer() const { - return (uint32_t)TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT; - } - inline void setIndirectStatePointer(const uint32_t indirectStatePointerValue) { - TheStructure.Common.IndirectStatePointer = indirectStatePointerValue >> INDIRECTSTATEPOINTER_BIT_SHIFT; - } - inline void setTczAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TczAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTczAddressControlMode() const { - return static_cast(TheStructure.Common.TczAddressControlMode); - } - inline void setTcyAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcyAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcyAddressControlMode() const { - return static_cast(TheStructure.Common.TcyAddressControlMode); - } - inline void setTcxAddressControlMode(const TEXTURE_COORDINATE_MODE value) { - TheStructure.Common.TcxAddressControlMode = value; - } - inline TEXTURE_COORDINATE_MODE getTcxAddressControlMode() const { - return static_cast(TheStructure.Common.TcxAddressControlMode); - } - inline void setReductionTypeEnable(const bool value) { - TheStructure.Common.ReductionTypeEnable = value; - } - inline bool getReductionTypeEnable() const { - return (TheStructure.Common.ReductionTypeEnable); - } - inline void setNonNormalizedCoordinateEnable(const bool value) { - TheStructure.Common.Non_NormalizedCoordinateEnable = value; - } - inline bool getNonNormalizedCoordinateEnable() const { - return (TheStructure.Common.Non_NormalizedCoordinateEnable); - } - inline void setTrilinearFilterQuality(const TRILINEAR_FILTER_QUALITY value) { - TheStructure.Common.TrilinearFilterQuality = value; - } - inline TRILINEAR_FILTER_QUALITY getTrilinearFilterQuality() const { - return static_cast(TheStructure.Common.TrilinearFilterQuality); - } - inline void setRAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMinFilterRoundingEnable = value; - } - inline bool getRAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMinFilterRoundingEnable); - } - inline void setRAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.RAddressMagFilterRoundingEnable = value; - } - inline bool getRAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.RAddressMagFilterRoundingEnable); - } - inline void setVAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMinFilterRoundingEnable = value; - } - inline bool getVAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMinFilterRoundingEnable); - } - inline void setVAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.VAddressMagFilterRoundingEnable = value; - } - inline bool getVAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.VAddressMagFilterRoundingEnable); - } - inline void setUAddressMinFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMinFilterRoundingEnable = value; - } - inline bool getUAddressMinFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMinFilterRoundingEnable); - } - inline void setUAddressMagFilterRoundingEnable(const bool value) { - TheStructure.Common.UAddressMagFilterRoundingEnable = value; - } - inline bool getUAddressMagFilterRoundingEnable() const { - return (TheStructure.Common.UAddressMagFilterRoundingEnable); - } - inline void setMaximumAnisotropy(const MAXIMUM_ANISOTROPY value) { - TheStructure.Common.MaximumAnisotropy = value; - } - inline MAXIMUM_ANISOTROPY getMaximumAnisotropy() const { - return static_cast(TheStructure.Common.MaximumAnisotropy); - } - inline void setReductionType(const REDUCTION_TYPE value) { - TheStructure.Common.ReductionType = value; - } - inline REDUCTION_TYPE getReductionType() const { - return static_cast(TheStructure.Common.ReductionType); - } -} SAMPLER_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_STATE)); - -typedef struct tagSTATE_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t GeneralStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t GeneralStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t GeneralStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_43 : BITFIELD_RANGE(11, 11); - uint64_t GeneralStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_96 : BITFIELD_RANGE(0, 15); - uint32_t StatelessDataPortAccessMemoryObjectControlState_Reserved : BITFIELD_RANGE(16, 16); - uint32_t StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(17, 22); - uint32_t Reserved_119 : BITFIELD_RANGE(23, 31); - uint64_t SurfaceStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_129 : BITFIELD_RANGE(1, 3); - uint64_t SurfaceStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t SurfaceStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_139 : BITFIELD_RANGE(11, 11); - uint64_t SurfaceStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t DynamicStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_193 : BITFIELD_RANGE(1, 3); - uint64_t DynamicStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t DynamicStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_203 : BITFIELD_RANGE(11, 11); - uint64_t DynamicStateBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t IndirectObjectBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_257 : BITFIELD_RANGE(1, 3); - uint64_t IndirectObjectMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t IndirectObjectMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_267 : BITFIELD_RANGE(11, 11); - uint64_t IndirectObjectBaseAddress : BITFIELD_RANGE(12, 63); - uint64_t InstructionBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_321 : BITFIELD_RANGE(1, 3); - uint64_t InstructionMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t InstructionMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_331 : BITFIELD_RANGE(11, 11); - uint64_t InstructionBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t GeneralStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_385 : BITFIELD_RANGE(1, 11); - uint32_t GeneralStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t DynamicStateBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_417 : BITFIELD_RANGE(1, 11); - uint32_t DynamicStateBufferSize : BITFIELD_RANGE(12, 31); - uint32_t IndirectObjectBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_449 : BITFIELD_RANGE(1, 11); - uint32_t IndirectObjectBufferSize : BITFIELD_RANGE(12, 31); - uint32_t InstructionBufferSizeModifyEnable : BITFIELD_RANGE(0, 0); - uint32_t Reserved_481 : BITFIELD_RANGE(1, 11); - uint32_t InstructionBufferSize : BITFIELD_RANGE(12, 31); - uint64_t BindlessSurfaceStateBaseAddressModifyEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_513 : BITFIELD_RANGE(1, 3); - uint64_t BindlessSurfaceStateMemoryObjectControlState_Reserved : BITFIELD_RANGE(4, 4); - uint64_t BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(5, 10); - uint64_t Reserved_523 : BITFIELD_RANGE(11, 11); - uint64_t BindlessSurfaceStateBaseAddress : BITFIELD_RANGE(12, 63); - uint32_t Reserved_576 : BITFIELD_RANGE(0, 11); - uint32_t BindlessSurfaceStateSize : BITFIELD_RANGE(12, 31); - } Common; - uint32_t RawData[19]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_MODIFY = 0x10, - DWORD_LENGTH_DWORD_COUNT_N = 0x11, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS = 0x1, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GENERALSTATEBASEADDRESS_BYTEOFFSET = 0x4, - GENERALSTATEBASEADDRESS_INDEX = 0x1, - SURFACESTATEBASEADDRESS_BYTEOFFSET = 0x10, - SURFACESTATEBASEADDRESS_INDEX = 0x4, - DYNAMICSTATEBASEADDRESS_BYTEOFFSET = 0x18, - DYNAMICSTATEBASEADDRESS_INDEX = 0x6, - INDIRECTOBJECTBASEADDRESS_BYTEOFFSET = 0x20, - INDIRECTOBJECTBASEADDRESS_INDEX = 0x8, - INSTRUCTIONBASEADDRESS_BYTEOFFSET = 0x28, - INSTRUCTIONBASEADDRESS_INDEX = 0xa, - BINDLESSSURFACESTATEBASEADDRESS_BYTEOFFSET = 0x40, - BINDLESSSURFACESTATEBASEADDRESS_INDEX = 0x10, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_BASE_ADDRESS sInit() { - STATE_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 19); - return TheStructure.RawData[index]; - } - inline void setGeneralStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBaseAddressModifyEnable = value; - } - inline bool getGeneralStateBaseAddressModifyEnable() const { - return (TheStructure.Common.GeneralStateBaseAddressModifyEnable); - } - inline void setGeneralStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); - } - inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getGeneralStateMemoryObjectControlState() const { - return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagGENERALSTATEBASEADDRESS { - GENERALSTATEBASEADDRESS_BIT_SHIFT = 0xc, - GENERALSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } GENERALSTATEBASEADDRESS; - inline void setGeneralStateBaseAddress(const uint64_t value) { - TheStructure.Common.GeneralStateBaseAddress = value >> GENERALSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getGeneralStateBaseAddress() const { - return (TheStructure.Common.GeneralStateBaseAddress << GENERALSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setStatelessDataPortAccessMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); - } - inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlState() const { - uint32_t mocs = TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - return (mocs); - } - inline void setSurfaceStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.SurfaceStateBaseAddressModifyEnable = value; - } - inline bool getSurfaceStateBaseAddressModifyEnable() const { - return (TheStructure.Common.SurfaceStateBaseAddressModifyEnable); - } - inline void setSurfaceStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); - } - inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getSurfaceStateMemoryObjectControlState() const { - return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagSURFACESTATEBASEADDRESS { - SURFACESTATEBASEADDRESS_BIT_SHIFT = 0xc, - SURFACESTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } SURFACESTATEBASEADDRESS; - inline void setSurfaceStateBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceStateBaseAddress = value >> SURFACESTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getSurfaceStateBaseAddress() const { - return (TheStructure.Common.SurfaceStateBaseAddress << SURFACESTATEBASEADDRESS_BIT_SHIFT); - } - inline void setDynamicStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBaseAddressModifyEnable = value; - } - inline bool getDynamicStateBaseAddressModifyEnable() const { - return (TheStructure.Common.DynamicStateBaseAddressModifyEnable); - } - inline void setDynamicStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); - } - inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getDynamicStateMemoryObjectControlState() const { - return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagDYNAMICSTATEBASEADDRESS { - DYNAMICSTATEBASEADDRESS_BIT_SHIFT = 0xc, - DYNAMICSTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } DYNAMICSTATEBASEADDRESS; - inline void setDynamicStateBaseAddress(const uint64_t value) { - TheStructure.Common.DynamicStateBaseAddress = value >> DYNAMICSTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getDynamicStateBaseAddress() const { - return (TheStructure.Common.DynamicStateBaseAddress << DYNAMICSTATEBASEADDRESS_BIT_SHIFT); - } - inline void setIndirectObjectBaseAddressModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBaseAddressModifyEnable = value; - } - inline bool getIndirectObjectBaseAddressModifyEnable() const { - return (TheStructure.Common.IndirectObjectBaseAddressModifyEnable); - } - inline void setIndirectObjectMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved = value; - } - inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); - } - inline void setIndirectObjectMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getIndirectObjectMemoryObjectControlState() const { - return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagINDIRECTOBJECTBASEADDRESS { - INDIRECTOBJECTBASEADDRESS_BIT_SHIFT = 0xc, - INDIRECTOBJECTBASEADDRESS_ALIGN_SIZE = 0x1000, - } INDIRECTOBJECTBASEADDRESS; - inline void setIndirectObjectBaseAddress(const uint64_t value) { - TheStructure.Common.IndirectObjectBaseAddress = value >> INDIRECTOBJECTBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getIndirectObjectBaseAddress() const { - return (TheStructure.Common.IndirectObjectBaseAddress << INDIRECTOBJECTBASEADDRESS_BIT_SHIFT); - } - inline void setInstructionBaseAddressModifyEnable(const bool value) { - TheStructure.Common.InstructionBaseAddressModifyEnable = value; - } - inline bool getInstructionBaseAddressModifyEnable() const { - return (TheStructure.Common.InstructionBaseAddressModifyEnable); - } - inline void setInstructionMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = value; - } - inline uint64_t getInstructionMemoryObjectControlStateReserved() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); - } - inline void setInstructionMemoryObjectControlState(const uint32_t value) { - uint64_t val = static_cast(value); - TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = (val >> 1); - } - inline uint32_t getInstructionMemoryObjectControlState() const { - uint64_t mocs = TheStructure.Common.InstructionMemoryObjectControlState_Reserved; - mocs |= (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - return static_cast(mocs); - } - typedef enum tagINSTRUCTIONBASEADDRESS { - INSTRUCTIONBASEADDRESS_BIT_SHIFT = 0xc, - INSTRUCTIONBASEADDRESS_ALIGN_SIZE = 0x1000, - } INSTRUCTIONBASEADDRESS; - inline void setInstructionBaseAddress(const uint64_t value) { - TheStructure.Common.InstructionBaseAddress = value >> INSTRUCTIONBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getInstructionBaseAddress() const { - return (TheStructure.Common.InstructionBaseAddress << INSTRUCTIONBASEADDRESS_BIT_SHIFT); - } - inline void setGeneralStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.GeneralStateBufferSizeModifyEnable = value; - } - inline bool getGeneralStateBufferSizeModifyEnable() const { - return (TheStructure.Common.GeneralStateBufferSizeModifyEnable); - } - inline void setGeneralStateBufferSize(const uint32_t value) { - TheStructure.Common.GeneralStateBufferSize = value; - } - inline uint32_t getGeneralStateBufferSize() const { - return (TheStructure.Common.GeneralStateBufferSize); - } - inline void setDynamicStateBufferSizeModifyEnable(const bool value) { - TheStructure.Common.DynamicStateBufferSizeModifyEnable = value; - } - inline bool getDynamicStateBufferSizeModifyEnable() const { - return (TheStructure.Common.DynamicStateBufferSizeModifyEnable); - } - inline void setDynamicStateBufferSize(const uint32_t value) { - TheStructure.Common.DynamicStateBufferSize = value; - } - inline uint32_t getDynamicStateBufferSize() const { - return (TheStructure.Common.DynamicStateBufferSize); - } - inline void setIndirectObjectBufferSizeModifyEnable(const bool value) { - TheStructure.Common.IndirectObjectBufferSizeModifyEnable = value; - } - inline bool getIndirectObjectBufferSizeModifyEnable() const { - return (TheStructure.Common.IndirectObjectBufferSizeModifyEnable); - } - inline void setIndirectObjectBufferSize(const uint32_t value) { - TheStructure.Common.IndirectObjectBufferSize = value; - } - inline uint32_t getIndirectObjectBufferSize() const { - return (TheStructure.Common.IndirectObjectBufferSize); - } - inline void setInstructionBufferSizeModifyEnable(const bool value) { - TheStructure.Common.InstructionBufferSizeModifyEnable = value; - } - inline bool getInstructionBufferSizeModifyEnable() const { - return (TheStructure.Common.InstructionBufferSizeModifyEnable); - } - inline void setInstructionBufferSize(const uint32_t value) { - TheStructure.Common.InstructionBufferSize = value; - } - inline uint32_t getInstructionBufferSize() const { - return (TheStructure.Common.InstructionBufferSize); - } - inline void setBindlessSurfaceStateBaseAddressModifyEnable(const bool value) { - TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable = value; - } - inline bool getBindlessSurfaceStateBaseAddressModifyEnable() const { - return (TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable); - } - inline void setBindlessSurfaceStateMemoryObjectControlStateReserved(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved = value; - } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { - return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); - } - inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { - return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); - } - typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { - BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT = 0xc, - BINDLESSSURFACESTATEBASEADDRESS_ALIGN_SIZE = 0x1000, - } BINDLESSSURFACESTATEBASEADDRESS; - inline void setBindlessSurfaceStateBaseAddress(const uint64_t value) { - TheStructure.Common.BindlessSurfaceStateBaseAddress = value >> BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT; - } - inline uint64_t getBindlessSurfaceStateBaseAddress() const { - return (TheStructure.Common.BindlessSurfaceStateBaseAddress << BINDLESSSURFACESTATEBASEADDRESS_BIT_SHIFT); - } - inline void setBindlessSurfaceStateSize(const uint32_t value) { - TheStructure.Common.BindlessSurfaceStateSize = value; - } - inline uint32_t getBindlessSurfaceStateSize() const { - return (TheStructure.Common.BindlessSurfaceStateSize); - } -} STATE_BASE_ADDRESS; -STATIC_ASSERT(76 == sizeof(STATE_BASE_ADDRESS)); - -typedef struct tagMI_REPORT_PERF_COUNT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t UseGlobalGtt : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 3); - uint64_t CoreModeEnable : BITFIELD_RANGE(4, 4); - uint64_t Reserved_37 : BITFIELD_RANGE(5, 5); - uint64_t MemoryAddress : BITFIELD_RANGE(6, 63); - uint32_t ReportId; - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT = 0x28, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - MEMORYADDRESS_BYTEOFFSET = 0x4, - MEMORYADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_REPORT_PERF_COUNT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_REPORT_PERF_COUNT sInit() { - MI_REPORT_PERF_COUNT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - inline void setCoreModeEnable(const uint64_t value) { - TheStructure.Common.CoreModeEnable = value; - } - inline uint64_t getCoreModeEnable() const { - return (TheStructure.Common.CoreModeEnable); - } - typedef enum tagMEMORYADDRESS { - MEMORYADDRESS_BIT_SHIFT = 0x6, - MEMORYADDRESS_ALIGN_SIZE = 0x40, - } MEMORYADDRESS; - inline void setMemoryAddress(const uint64_t value) { - TheStructure.Common.MemoryAddress = value >> MEMORYADDRESS_BIT_SHIFT; - } - inline uint64_t getMemoryAddress() const { - return (TheStructure.Common.MemoryAddress << MEMORYADDRESS_BIT_SHIFT); - } - inline void setReportId(const uint32_t value) { - TheStructure.Common.ReportId = value; - } - inline uint32_t getReportId() const { - return (TheStructure.Common.ReportId); - } -} MI_REPORT_PERF_COUNT; -STATIC_ASSERT(16 == sizeof(MI_REPORT_PERF_COUNT)); - -typedef struct tagGPGPU_CSR_BASE_ADDRESS { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 11); - uint64_t GpgpuCsrBaseAddress : BITFIELD_RANGE(12, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_UNNAMED_1 = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS = 0x4, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - GPGPUCSRBASEADDRESS_BYTEOFFSET = 0x4, - GPGPUCSRBASEADDRESS_INDEX = 0x1, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_UNNAMED_1; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_GPGPU_CSR_BASE_ADDRESS; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagGPGPU_CSR_BASE_ADDRESS sInit() { - GPGPU_CSR_BASE_ADDRESS state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagGPGPUCSRBASEADDRESS { - GPGPUCSRBASEADDRESS_BIT_SHIFT = 0xC, - GPGPUCSRBASEADDRESS_ALIGN_SIZE = 0x1000, - } GPGPUCSRBASEADDRESS; - inline uint64_t getGpgpuCsrBaseAddress() const { - return (uint64_t)TheStructure.Common.GpgpuCsrBaseAddress << GPGPUCSRBASEADDRESS_BIT_SHIFT; - } - inline void setGpgpuCsrBaseAddress(uint64_t value) { - TheStructure.Common.GpgpuCsrBaseAddress = value >> GPGPUCSRBASEADDRESS_BIT_SHIFT; - } -} GPGPU_CSR_BASE_ADDRESS; -STATIC_ASSERT(12 == sizeof(GPGPU_CSR_BASE_ADDRESS)); - -typedef struct tagSTATE_SIP { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 15); - uint32_t _3DCommandSubOpcode : BITFIELD_RANGE(16, 23); - uint32_t _3DCommandOpcode : BITFIELD_RANGE(24, 26); - uint32_t CommandSubtype : BITFIELD_RANGE(27, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t Reserved_32 : BITFIELD_RANGE(0, 3); - uint64_t SystemInstructionPointer : BITFIELD_RANGE(4, 63); - } Common; - uint32_t RawData[3]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_DWORD_COUNT_N = 0x1, - } DWORD_LENGTH; - typedef enum tag_3D_COMMAND_SUB_OPCODE { - _3D_COMMAND_SUB_OPCODE_STATE_SIP = 0x2, - } _3D_COMMAND_SUB_OPCODE; - typedef enum tag_3D_COMMAND_OPCODE { - _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED = 0x1, - } _3D_COMMAND_OPCODE; - typedef enum tagCOMMAND_SUBTYPE { - COMMAND_SUBTYPE_GFXPIPE_COMMON = 0x0, - } COMMAND_SUBTYPE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_GFXPIPE = 0x3, - } COMMAND_TYPE; - typedef enum tagPATCH_CONSTANTS { - SYSTEMINSTRUCTIONPOINTER_BYTEOFFSET = 0x4, - SYSTEMINSTRUCTIONPOINTER_INDEX = 0x1, - } PATCH_CONSTANTS; - void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_DWORD_COUNT_N; - TheStructure.Common._3DCommandSubOpcode = _3D_COMMAND_SUB_OPCODE_STATE_SIP; - TheStructure.Common._3DCommandOpcode = _3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED; - TheStructure.Common.CommandSubtype = COMMAND_SUBTYPE_GFXPIPE_COMMON; - TheStructure.Common.CommandType = COMMAND_TYPE_GFXPIPE; - } - static tagSTATE_SIP sInit() { - STATE_SIP state; - state.init(); - return state; - } - inline uint32_t &getRawData(uint32_t const index) { - DEBUG_BREAK_IF(index >= 3); - return TheStructure.RawData[index]; - } - typedef enum tagSYSTEMINSTRUCTIONPOINTER { - SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT = 0x4, - SYSTEMINSTRUCTIONPOINTER_ALIGN_SIZE = 0x10, - } SYSTEMINSTRUCTIONPOINTER; - inline uint64_t getSystemInstructionPointer() const { - return (uint64_t)TheStructure.Common.SystemInstructionPointer << SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } - inline void setSystemInstructionPointer(uint64_t value) { - TheStructure.Common.SystemInstructionPointer = value >> SYSTEMINSTRUCTIONPOINTER_BIT_SHIFT; - } -} STATE_SIP; -STATIC_ASSERT(12 == sizeof(STATE_SIP)); - -struct MI_USER_INTERRUPT { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 22); - uint32_t MICommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - } Common; - uint32_t RawData[1]; - } TheStructure; - enum MI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_USER_INTERRUPT = 2, - }; - enum COMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0, - }; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.MICommandOpcode = MI_COMMAND_OPCODE_MI_USER_INTERRUPT; - } - static MI_USER_INTERRUPT sInit() { - MI_USER_INTERRUPT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - return TheStructure.RawData[index]; - } -}; -STATIC_ASSERT(4 == sizeof(MI_USER_INTERRUPT)); - -typedef struct tagMI_FLUSH_DW { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 5); - uint32_t Reserved_6 : BITFIELD_RANGE(6, 7); - uint32_t NotifyEnable : BITFIELD_RANGE(8, 8); - uint32_t FlushLlc : BITFIELD_RANGE(9, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 13); - uint32_t PostSyncOperation : BITFIELD_RANGE(14, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 16); - uint32_t Reserved_17 : BITFIELD_RANGE(17, 17); - uint32_t TlbInvalidate : BITFIELD_RANGE(18, 18); - uint32_t Reserved_19 : BITFIELD_RANGE(19, 20); - uint32_t StoreDataIndex : BITFIELD_RANGE(21, 21); - uint32_t Reserved_22 : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - // DWORD 1-2 - uint64_t Reserved_32 : BITFIELD_RANGE(0, 1); - uint64_t DestinationAddressType : BITFIELD_RANGE(2, 2); - uint64_t DestinationAddress : BITFIELD_RANGE(3, 47); - uint64_t Reserved_80 : BITFIELD_RANGE(48, 63); - // DWORD 3-4 - uint64_t ImmediateData; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x3, - } DWORD_LENGTH; - typedef enum tagPOST_SYNC_OPERATION { - POST_SYNC_OPERATION_NO_WRITE = 0x0, - POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD = 0x1, - POST_SYNC_OPERATION_WRITE_TIMESTAMP_REGISTER = 0x3, - } POST_SYNC_OPERATION; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_FLUSH_DW = 0x26, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - typedef enum tagDESTINATION_ADDRESS_TYPE { - DESTINATION_ADDRESS_TYPE_PPGTT = 0x0, - DESTINATION_ADDRESS_TYPE_GGTT = 0x1, - } DESTINATION_ADDRESS_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.PostSyncOperation = POST_SYNC_OPERATION_NO_WRITE; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_FLUSH_DW; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - TheStructure.Common.DestinationAddressType = DESTINATION_ADDRESS_TYPE_PPGTT; - } - static tagMI_FLUSH_DW sInit() { - MI_FLUSH_DW state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setNotifyEnable(const bool value) { - TheStructure.Common.NotifyEnable = value; - } - inline bool getNotifyEnable() const { - return TheStructure.Common.NotifyEnable; - } - inline void setFlushLlc(const bool value) { - TheStructure.Common.FlushLlc = value; - } - inline bool getFlushLlc() const { - return TheStructure.Common.FlushLlc; - } - inline void setPostSyncOperation(const POST_SYNC_OPERATION value) { - TheStructure.Common.PostSyncOperation = value; - } - inline POST_SYNC_OPERATION getPostSyncOperation() const { - return static_cast(TheStructure.Common.PostSyncOperation); - } - inline void setTlbInvalidate(const bool value) { - TheStructure.Common.TlbInvalidate = value; - } - inline bool getTlbInvalidate() const { - return TheStructure.Common.TlbInvalidate; - } - inline void setStoreDataIndex(const bool value) { - TheStructure.Common.StoreDataIndex = value; - } - inline bool getStoreDataIndex() const { - return TheStructure.Common.StoreDataIndex; - } - inline void setDestinationAddressType(const DESTINATION_ADDRESS_TYPE value) { - TheStructure.Common.DestinationAddressType = value; - } - inline DESTINATION_ADDRESS_TYPE getDestinationAddressType() const { - return static_cast(TheStructure.Common.DestinationAddressType); - } - typedef enum tagDESTINATIONADDRESS { - DESTINATIONADDRESS_BIT_SHIFT = 0x3, - DESTINATIONADDRESS_ALIGN_SIZE = 0x8, - } DESTINATIONADDRESS; - inline void setDestinationAddress(const uint64_t value) { - UNRECOVERABLE_IF(value > 0xfffffffffff8L); - TheStructure.Common.DestinationAddress = value >> DESTINATIONADDRESS_BIT_SHIFT; - } - inline uint64_t getDestinationAddress() const { - return TheStructure.Common.DestinationAddress << DESTINATIONADDRESS_BIT_SHIFT; - } - inline void setImmediateData(const uint64_t value) { - TheStructure.Common.ImmediateData = value; - } - inline uint64_t getImmediateData() const { - return TheStructure.Common.ImmediateData; - } -} MI_FLUSH_DW; -STATIC_ASSERT(20 == sizeof(MI_FLUSH_DW)); - -typedef struct tagXY_SRC_COPY_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 14); - uint32_t SrcTilingEnable : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4-5 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SourceX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t SourceY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 7 - uint32_t SourcePitch : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - // DWORD 8-9 - uint64_t SourceBaseAddress; - } Common; - uint32_t RawData[10]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tagSRC_TILING_ENABLE { - SRC_TILING_ENABLE_TILING_DISABLED_LINEAR = 0x0, - SRC_TILING_ENABLE_TILING_ENABLED = 0x1, - } SRC_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x53, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x8, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.SrcTilingEnable = SRC_TILING_ENABLE_TILING_DISABLED_LINEAR; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xCC; - } - static tagXY_SRC_COPY_BLT sInit() { - XY_SRC_COPY_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void setSrcTilingEnable(const SRC_TILING_ENABLE value) { - TheStructure.Common.SrcTilingEnable = value; - } - inline SRC_TILING_ENABLE getSrcTilingEnable() const { - return static_cast(TheStructure.Common.SrcTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setSourceX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourceX1Coordinate_Left = value; - } - inline uint32_t getSourceX1CoordinateLeft() const { - return TheStructure.Common.SourceX1Coordinate_Left; - } - inline void setSourceY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.SourceY1Coordinate_Top = value; - } - inline uint32_t getSourceY1CoordinateTop() const { - return TheStructure.Common.SourceY1Coordinate_Top; - } - inline void setSourcePitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.SourcePitch = value; - } - inline uint32_t getSourcePitch() const { - return TheStructure.Common.SourcePitch; - } - inline void setSourceBaseAddress(const uint64_t value) { - TheStructure.Common.SourceBaseAddress = value; - } - inline uint64_t getSourceBaseAddress() const { - return TheStructure.Common.SourceBaseAddress; - } -} XY_SRC_COPY_BLT; -STATIC_ASSERT(40 == sizeof(XY_SRC_COPY_BLT)); - -typedef struct tagXY_COLOR_BLT { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 10); - uint32_t DestTilingEnable : BITFIELD_RANGE(11, 11); - uint32_t Reserved_12 : BITFIELD_RANGE(12, 19); - uint32_t _32BppByteMask : BITFIELD_RANGE(20, 21); - uint32_t InstructionTarget_Opcode : BITFIELD_RANGE(22, 28); - uint32_t Client : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint32_t DestinationPitch : BITFIELD_RANGE(0, 15); - uint32_t RasterOperation : BITFIELD_RANGE(16, 23); - uint32_t ColorDepth : BITFIELD_RANGE(24, 25); - uint32_t Reserved_58 : BITFIELD_RANGE(26, 29); - uint32_t ClippingEnabled : BITFIELD_RANGE(30, 30); - uint32_t Reserved_63 : BITFIELD_RANGE(31, 31); - // DWORD 2 - uint32_t DestinationX1Coordinate_Left : BITFIELD_RANGE(0, 15); - uint32_t DestinationY1Coordinate_Top : BITFIELD_RANGE(16, 31); - // DWORD 3 - uint32_t DestinationX2Coordinate_Right : BITFIELD_RANGE(0, 15); - uint32_t DestinationY2Coordinate_Bottom : BITFIELD_RANGE(16, 31); - // DWORD 4-5 - uint64_t DestinationBaseAddress; - // DWORD 6 - uint32_t SolidPaternColor; - } Common; - uint32_t RawData[7]; - } TheStructure; - typedef enum tagDEST_TILING_ENABLE { - DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT = 0x0, - DEST_TILING_ENABLE_TILING_ENABLED = 0x1, - } DEST_TILING_ENABLE; - typedef enum tag_32BPP_BYTE_MASK { - _32BPP_BYTE_MASK_WRITE_RGB_CHANNEL = 0x1, - _32BPP_BYTE_MASK_WRITE_ALPHA_CHANNEL = 0x2, - _32BPP_BYTE_MASK_WRITE_RGBA_CHANNEL = 0x3 - } _32BPP_BYTE_MASK; - typedef enum tagCLIENT { - CLIENT_2D_PROCESSOR = 0x2, - } CLIENT; - typedef enum tagCOLOR_DEPTH { - COLOR_DEPTH_8_BIT_COLOR = 0x0, - COLOR_DEPTH_16_BIT_COLOR565 = 0x1, - COLOR_DEPTH_16_BIT_COLOR1555 = 0x2, - COLOR_DEPTH_32_BIT_COLOR = 0x3, - } COLOR_DEPTH; - typedef enum tagCLIPPING_ENABLED { - CLIPPING_ENABLED_DISABLED = 0x0, - CLIPPING_ENABLED_ENABLED = 0x1, - } CLIPPING_ENABLED; - typedef enum tagINSTRUCTIONTARGET_OPCODE { - INSTRUCTIONTARGET_OPCODE_OPCODE = 0x50, - } INSTRUCTIONTARGET_OPCODE; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x5, - } DWORD_LENGTH; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DestTilingEnable = DEST_TILING_ENABLE_TILING_DISABLED_LINEAR_BLIT; - TheStructure.Common.Client = CLIENT_2D_PROCESSOR; - TheStructure.Common.ColorDepth = COLOR_DEPTH_8_BIT_COLOR; - TheStructure.Common.ClippingEnabled = CLIPPING_ENABLED_DISABLED; - TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE_OPCODE; - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.RasterOperation = 0xF0; - } - static tagXY_COLOR_BLT sInit() { - XY_COLOR_BLT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 10); - return TheStructure.RawData[index]; - } - inline void setDestTilingEnable(const DEST_TILING_ENABLE value) { - TheStructure.Common.DestTilingEnable = value; - } - inline DEST_TILING_ENABLE getDestTilingEnable() const { - return static_cast(TheStructure.Common.DestTilingEnable); - } - inline void set32BppByteMask(const _32BPP_BYTE_MASK value) { - TheStructure.Common._32BppByteMask = value; - } - inline _32BPP_BYTE_MASK get32BppByteMask() const { - return static_cast<_32BPP_BYTE_MASK>(TheStructure.Common._32BppByteMask); - } - inline void setInstructionTargetOpcode(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x1fc00000); - TheStructure.Common.InstructionTarget_Opcode = value; - } - inline uint32_t getInstructionTargetOpcode() const { - return TheStructure.Common.InstructionTarget_Opcode; - } - inline void setClient(const CLIENT value) { - TheStructure.Common.Client = value; - } - inline CLIENT getClient() const { - return static_cast(TheStructure.Common.Client); - } - inline void setDestinationPitch(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationPitch = value; - } - inline uint32_t getDestinationPitch() const { - return TheStructure.Common.DestinationPitch; - } - inline void setRasterOperation(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xff0000); - TheStructure.Common.RasterOperation = value; - } - inline uint32_t getRasterOperation() const { - return TheStructure.Common.RasterOperation; - } - inline void setColorDepth(const COLOR_DEPTH value) { - TheStructure.Common.ColorDepth = value; - } - inline COLOR_DEPTH getColorDepth() const { - return static_cast(TheStructure.Common.ColorDepth); - } - inline void setClippingEnabled(const CLIPPING_ENABLED value) { - TheStructure.Common.ClippingEnabled = value; - } - inline CLIPPING_ENABLED getClippingEnabled() const { - return static_cast(TheStructure.Common.ClippingEnabled); - } - inline void setDestinationX1CoordinateLeft(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX1Coordinate_Left = value; - } - inline uint32_t getDestinationX1CoordinateLeft() const { - return TheStructure.Common.DestinationX1Coordinate_Left; - } - inline void setDestinationY1CoordinateTop(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY1Coordinate_Top = value; - } - inline uint32_t getDestinationY1CoordinateTop() const { - return TheStructure.Common.DestinationY1Coordinate_Top; - } - inline void setDestinationX2CoordinateRight(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff); - TheStructure.Common.DestinationX2Coordinate_Right = value; - } - inline uint32_t getDestinationX2CoordinateRight() const { - return TheStructure.Common.DestinationX2Coordinate_Right; - } - inline void setDestinationY2CoordinateBottom(const uint32_t value) { - UNRECOVERABLE_IF(value > 0xffff0000); - TheStructure.Common.DestinationY2Coordinate_Bottom = value; - } - inline uint32_t getDestinationY2CoordinateBottom() const { - return TheStructure.Common.DestinationY2Coordinate_Bottom; - } - inline void setDestinationBaseAddress(const uint64_t value) { - TheStructure.Common.DestinationBaseAddress = value; - } - inline uint64_t getDestinationBaseAddress() const { - return TheStructure.Common.DestinationBaseAddress; - } - inline void setFillColor(const uint32_t *value) { - TheStructure.Common.SolidPaternColor = *value; - } -} XY_COLOR_BLT; -STATIC_ASSERT(28 == sizeof(XY_COLOR_BLT)); - -typedef struct tagGRF { - union tagTheStructure { - float fRegs[8]; - uint32_t dwRegs[8]; - uint16_t wRegs[16]; - uint32_t RawData[8]; - } TheStructure; -} GRF; -STATIC_ASSERT(32 == sizeof(GRF)); - -typedef struct tagMEDIA_SURFACE_STATE { - union tagTheStructure { - struct tagCommon { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 29); - uint32_t Rotation : BITFIELD_RANGE(30, 31); - uint32_t Cr_VCb_UPixelOffsetVDirection : BITFIELD_RANGE(0, 1); - uint32_t PictureStructure : BITFIELD_RANGE(2, 3); - uint32_t Width : BITFIELD_RANGE(4, 17); - uint32_t Height : BITFIELD_RANGE(18, 31); - uint32_t TileMode : BITFIELD_RANGE(0, 1); - uint32_t HalfPitchForChroma : BITFIELD_RANGE(2, 2); - uint32_t SurfacePitch : BITFIELD_RANGE(3, 20); - uint32_t AddressControl : BITFIELD_RANGE(21, 21); - uint32_t MemoryCompressionEnable : BITFIELD_RANGE(22, 22); - uint32_t MemoryCompressionMode : BITFIELD_RANGE(23, 23); - uint32_t Cr_VCb_UPixelOffsetVDirectionMsb : BITFIELD_RANGE(24, 24); - uint32_t Cr_VCb_UPixelOffsetUDirection : BITFIELD_RANGE(25, 25); - uint32_t InterleaveChroma : BITFIELD_RANGE(26, 26); - uint32_t SurfaceFormat : BITFIELD_RANGE(27, 31); - uint32_t YOffsetForU_Cb : BITFIELD_RANGE(0, 13); - uint32_t Reserved_110 : BITFIELD_RANGE(14, 15); - uint32_t XOffsetForU_Cb : BITFIELD_RANGE(16, 29); - uint32_t Reserved_126 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_128; - uint32_t SurfaceMemoryObjectControlState_Reserved : BITFIELD_RANGE(0, 0); - uint32_t SurfaceMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(1, 6); - uint32_t Reserved_167 : BITFIELD_RANGE(7, 17); - uint32_t TiledResourceMode : BITFIELD_RANGE(18, 19); - uint32_t Reserved_180 : BITFIELD_RANGE(20, 29); - uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(30, 30); - uint32_t VerticalLineStride : BITFIELD_RANGE(31, 31); - uint32_t SurfaceBaseAddressLow; - uint32_t SurfaceBaseAddressHigh : BITFIELD_RANGE(0, 15); - uint32_t Reserved_240 : BITFIELD_RANGE(16, 31); - } Common; - struct tagSurfaceFormatIsNotOneOfPlanarFormats { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } SurfaceFormatIsNotOneOfPlanarFormats; - struct tagSurfaceFormatIsOneOfPlanarFormats { - uint32_t Reserved_0 : BITFIELD_RANGE(0, 15); - uint32_t YOffset : BITFIELD_RANGE(16, 19); - uint32_t XOffset : BITFIELD_RANGE(20, 26); - uint32_t Reserved_27 : BITFIELD_RANGE(27, 31); - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t Reserved_128; - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } SurfaceFormatIsOneOfPlanarFormats; - struct tag_SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0 { - uint32_t Reserved_0; - uint32_t Reserved_32; - uint32_t Reserved_64; - uint32_t Reserved_96; - uint32_t YOffsetForV_Cr : BITFIELD_RANGE(0, 14); - uint32_t Reserved_143 : BITFIELD_RANGE(15, 15); - uint32_t XOffsetForV_Cr : BITFIELD_RANGE(16, 29); - uint32_t Reserved_158 : BITFIELD_RANGE(30, 31); - uint32_t Reserved_160; - uint32_t Reserved_192; - uint32_t Reserved_224; - } _SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0; - uint32_t RawData[8]; - } TheStructure; - typedef enum tagROTATION { - ROTATION_NO_ROTATION_OR_0_DEGREE = 0x0, - ROTATION_90_DEGREE_ROTATION = 0x1, - ROTATION_180_DEGREE_ROTATION = 0x2, - ROTATION_270_DEGREE_ROTATION = 0x3, - } ROTATION; - typedef enum tagPICTURE_STRUCTURE { - PICTURE_STRUCTURE_FRAME_PICTURE = 0x0, - PICTURE_STRUCTURE_TOP_FIELD_PICTURE = 0x1, - PICTURE_STRUCTURE_BOTTOM_FIELD_PICTURE = 0x2, - PICTURE_STRUCTURE_INVALID_NOT_ALLOWED = 0x3, - } PICTURE_STRUCTURE; - typedef enum tagTILE_MODE { - TILE_MODE_TILEMODE_LINEAR = 0x0, - TILE_MODE_TILEMODE_XMAJOR = 0x2, - TILE_MODE_TILEMODE_YMAJOR = 0x3, - } TILE_MODE; - typedef enum tagADDRESS_CONTROL { - ADDRESS_CONTROL_CLAMP = 0x0, - ADDRESS_CONTROL_MIRROR = 0x1, - } ADDRESS_CONTROL; - typedef enum tagMEMORY_COMPRESSION_MODE { - MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE = 0x0, - MEMORY_COMPRESSION_MODE_VERTICAL_COMPRESSION_MODE = 0x1, - } MEMORY_COMPRESSION_MODE; - typedef enum tagSURFACE_FORMAT { - SURFACE_FORMAT_YCRCB_NORMAL = 0x0, - SURFACE_FORMAT_YCRCB_SWAPUVY = 0x1, - SURFACE_FORMAT_YCRCB_SWAPUV = 0x2, - SURFACE_FORMAT_YCRCB_SWAPY = 0x3, - SURFACE_FORMAT_PLANAR_420_8 = 0x4, - SURFACE_FORMAT_Y8_UNORM_VA = 0x5, - SURFACE_FORMAT_Y16_SNORM = 0x6, - SURFACE_FORMAT_Y16_UNORM_VA = 0x7, - SURFACE_FORMAT_R10G10B10A2_UNORM = 0x8, - SURFACE_FORMAT_R8G8B8A8_UNORM = 0x9, - SURFACE_FORMAT_R8B8_UNORM_CRCB = 0xa, - SURFACE_FORMAT_R8_UNORM_CR_CB = 0xb, - SURFACE_FORMAT_Y8_UNORM = 0xc, - SURFACE_FORMAT_A8Y8U8V8_UNORM = 0xd, - SURFACE_FORMAT_B8G8R8A8_UNORM = 0xe, - SURFACE_FORMAT_R16G16B16A16 = 0xf, - SURFACE_FORMAT_Y1_UNORM = 0x10, - SURFACE_FORMAT_Y32_UNORM = 0x11, - SURFACE_FORMAT_PLANAR_422_8 = 0x12, - } SURFACE_FORMAT; - typedef enum tagSURFACE_MEMORY_OBJECT_CONTROL_STATE { - SURFACE_MEMORY_OBJECT_CONTROL_STATE_DEFAULTVAUEDESC = 0x0, - } SURFACE_MEMORY_OBJECT_CONTROL_STATE; - typedef enum tagTILED_RESOURCE_MODE { - TILED_RESOURCE_MODE_TRMODE_NONE = 0x0, - TILED_RESOURCE_MODE_TRMODE_TILEYF = 0x1, - TILED_RESOURCE_MODE_TRMODE_TILEYS = 0x2, - } TILED_RESOURCE_MODE; - typedef enum tagPATCH_CONSTANTS { - SURFACEBASEADDRESS_BYTEOFFSET = 0x18, - SURFACEBASEADDRESS_INDEX = 0x6, - SURFACEBASEADDRESSHIGH_BYTEOFFSET = 0x1c, - SURFACEBASEADDRESSHIGH_INDEX = 0x7, - } PATCH_CONSTANTS; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.Rotation = ROTATION_NO_ROTATION_OR_0_DEGREE; - TheStructure.Common.PictureStructure = PICTURE_STRUCTURE_FRAME_PICTURE; - TheStructure.Common.TileMode = TILE_MODE_TILEMODE_LINEAR; - TheStructure.Common.AddressControl = ADDRESS_CONTROL_CLAMP; - TheStructure.Common.MemoryCompressionMode = MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE; - TheStructure.Common.SurfaceFormat = SURFACE_FORMAT_YCRCB_NORMAL; - TheStructure.Common.TiledResourceMode = TILED_RESOURCE_MODE_TRMODE_NONE; - } - static tagMEDIA_SURFACE_STATE sInit() { - MEDIA_SURFACE_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 8); - return TheStructure.RawData[index]; - } - inline void setRotation(const ROTATION value) { - TheStructure.Common.Rotation = value; - } - inline ROTATION getRotation() const { - return static_cast(TheStructure.Common.Rotation); - } - inline void setCrVCbUPixelOffsetVDirection(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetVDirection = value; - } - inline uint32_t getCrVCbUPixelOffsetVDirection() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirection); - } - inline void setPictureStructure(const PICTURE_STRUCTURE value) { - TheStructure.Common.PictureStructure = value; - } - inline PICTURE_STRUCTURE getPictureStructure() const { - return static_cast(TheStructure.Common.PictureStructure); - } - inline void setWidth(const uint32_t value) { - TheStructure.Common.Width = value - 1; - } - inline uint32_t getWidth() const { - return (TheStructure.Common.Width + 1); - } - inline void setHeight(const uint32_t value) { - TheStructure.Common.Height = value - 1; - } - inline uint32_t getHeight() const { - return (TheStructure.Common.Height + 1); - } - inline void setTileMode(const TILE_MODE value) { - TheStructure.Common.TileMode = value; - } - inline TILE_MODE getTileMode() const { - return static_cast(TheStructure.Common.TileMode); - } - inline void setHalfPitchForChroma(const bool value) { - TheStructure.Common.HalfPitchForChroma = value; - } - inline bool getHalfPitchForChroma() const { - return (TheStructure.Common.HalfPitchForChroma); - } - inline void setSurfacePitch(const uint32_t value) { - TheStructure.Common.SurfacePitch = value - 1; - } - inline uint32_t getSurfacePitch() const { - return (TheStructure.Common.SurfacePitch + 1); - } - inline void setAddressControl(const ADDRESS_CONTROL value) { - TheStructure.Common.AddressControl = value; - } - inline ADDRESS_CONTROL getAddressControl() const { - return static_cast(TheStructure.Common.AddressControl); - } - inline void setMemoryCompressionEnable(const bool value) { - TheStructure.Common.MemoryCompressionEnable = value; - } - inline bool getMemoryCompressionEnable() const { - return (TheStructure.Common.MemoryCompressionEnable); - } - inline void setMemoryCompressionMode(const MEMORY_COMPRESSION_MODE value) { - TheStructure.Common.MemoryCompressionMode = value; - } - inline MEMORY_COMPRESSION_MODE getMemoryCompressionMode() const { - return static_cast(TheStructure.Common.MemoryCompressionMode); - } - inline void setCrVCbUPixelOffsetVDirectionMsb(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb = value; - } - inline uint32_t getCrVCbUPixelOffsetVDirectionMsb() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb); - } - inline void setCrVCbUPixelOffsetUDirection(const uint32_t value) { - TheStructure.Common.Cr_VCb_UPixelOffsetUDirection = value; - } - inline uint32_t getCrVCbUPixelOffsetUDirection() const { - return (TheStructure.Common.Cr_VCb_UPixelOffsetUDirection); - } - inline void setInterleaveChroma(const bool value) { - TheStructure.Common.InterleaveChroma = value; - } - inline bool getInterleaveChroma() const { - return (TheStructure.Common.InterleaveChroma); - } - inline void setSurfaceFormat(const SURFACE_FORMAT value) { - TheStructure.Common.SurfaceFormat = value; - } - inline SURFACE_FORMAT getSurfaceFormat() const { - return static_cast(TheStructure.Common.SurfaceFormat); - } - inline void setYOffsetForUCb(const uint32_t value) { - TheStructure.Common.YOffsetForU_Cb = value; - } - inline uint32_t getYOffsetForUCb() const { - return (TheStructure.Common.YOffsetForU_Cb); - } - inline void setXOffsetForUCb(const uint32_t value) { - TheStructure.Common.XOffsetForU_Cb = value; - } - inline uint32_t getXOffsetForUCb() const { - return (TheStructure.Common.XOffsetForU_Cb); - } - inline void setSurfaceMemoryObjectControlStateReserved(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_Reserved = value; - } - inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); - } - inline void setSurfaceMemoryObjectControlState(const uint32_t value) { - TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getSurfaceMemoryObjectControlState() const { - return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); - } - inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { - TheStructure.Common.TiledResourceMode = value; - } - inline TILED_RESOURCE_MODE getTiledResourceMode() const { - return static_cast(TheStructure.Common.TiledResourceMode); - } - inline void setVerticalLineStrideOffset(const uint32_t value) { - TheStructure.Common.VerticalLineStrideOffset = value; - } - inline uint32_t getVerticalLineStrideOffset() const { - return (TheStructure.Common.VerticalLineStrideOffset); - } - inline void setVerticalLineStride(const uint32_t value) { - TheStructure.Common.VerticalLineStride = value; - } - inline uint32_t getVerticalLineStride() const { - return (TheStructure.Common.VerticalLineStride); - } - inline void setSurfaceBaseAddress(const uint64_t value) { - TheStructure.Common.SurfaceBaseAddressLow = static_cast(value & 0xffffffff); - TheStructure.Common.SurfaceBaseAddressHigh = (value >> 32) & 0xffffffff; - } - inline uint64_t getSurfaceBaseAddress() const { - return (TheStructure.Common.SurfaceBaseAddressLow | - static_cast(TheStructure.Common.SurfaceBaseAddressHigh) << 32); - } - inline void setSurfaceBaseAddressHigh(const uint32_t value) { - TheStructure.Common.SurfaceBaseAddressHigh = value; - } - inline uint32_t getSurfaceBaseAddressHigh() const { - return (TheStructure.Common.SurfaceBaseAddressHigh); - } - typedef enum tagYOFFSET { - YOFFSET_BIT_SHIFT = 0x2, - YOFFSET_ALIGN_SIZE = 0x4, - } YOFFSET; - inline void setYOffset(const uint32_t value) { - TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset = value >> YOFFSET_BIT_SHIFT; - } - inline uint32_t getYOffset() const { - return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset << YOFFSET_BIT_SHIFT); - } - typedef enum tagXOFFSET { - XOFFSET_BIT_SHIFT = 0x2, - XOFFSET_ALIGN_SIZE = 0x4, - } XOFFSET; - inline void setXOffset(const uint32_t value) { - TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset = value >> XOFFSET_BIT_SHIFT; - } - inline uint32_t getXOffset() const { - return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset << XOFFSET_BIT_SHIFT); - } - inline void setYOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr = value; - } - inline uint32_t getYOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr); - } - inline void setXOffsetForVCr(const uint32_t value) { - TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr = value; - } - inline uint32_t getXOffsetForVCr() const { - return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr); - } -} MEDIA_SURFACE_STATE; -STATIC_ASSERT(32 == sizeof(MEDIA_SURFACE_STATE)); - -typedef struct tagMI_MATH { - union _DW0 { - struct _BitField { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved : BITFIELD_RANGE(8, 22); - uint32_t InstructionOpcode : BITFIELD_RANGE(23, 28); - uint32_t InstructionType : BITFIELD_RANGE(29, 31); - } BitField; - uint32_t Value; - } DW0; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_MATH = 0x1A, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; -} MI_MATH; - -typedef struct tagMI_MATH_ALU_INST_INLINE { - union _DW0 { - struct _BitField { - uint32_t Operand2 : BITFIELD_RANGE(0, 9); - uint32_t Operand1 : BITFIELD_RANGE(10, 19); - uint32_t ALUOpcode : BITFIELD_RANGE(20, 31); - } BitField; - uint32_t Value; - } DW0; -} MI_MATH_ALU_INST_INLINE; - -typedef struct tagMI_SEMAPHORE_WAIT { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t Reserved_8 : BITFIELD_RANGE(8, 11); - uint32_t CompareOperation : BITFIELD_RANGE(12, 14); - uint32_t WaitMode : BITFIELD_RANGE(15, 15); - uint32_t Reserved_16 : BITFIELD_RANGE(16, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint32_t SemaphoreDataDword; - uint64_t Reserved_64 : BITFIELD_RANGE(0, 1); - uint64_t SemaphoreAddress_Graphicsaddress : BITFIELD_RANGE(2, 47); - uint64_t SemaphoreAddress_Reserved : BITFIELD_RANGE(48, 63); - } Common; - uint32_t RawData[4]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2, - } DWORD_LENGTH; - typedef enum tagCOMPARE_OPERATION { - COMPARE_OPERATION_SAD_GREATER_THAN_SDD = 0x0, - COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD = 0x1, - COMPARE_OPERATION_SAD_LESS_THAN_SDD = 0x2, - COMPARE_OPERATION_SAD_LESS_THAN_OR_EQUAL_SDD = 0x3, - COMPARE_OPERATION_SAD_EQUAL_SDD = 0x4, - COMPARE_OPERATION_SAD_NOT_EQUAL_SDD = 0x5, - } COMPARE_OPERATION; - typedef enum tagWAIT_MODE { - WAIT_MODE_SIGNAL_MODE = 0x0, - WAIT_MODE_POLLING_MODE = 0x1, - } WAIT_MODE; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT = 0x1c, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.CompareOperation = COMPARE_OPERATION_SAD_GREATER_THAN_SDD; - TheStructure.Common.WaitMode = WAIT_MODE_SIGNAL_MODE; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_SEMAPHORE_WAIT sInit() { - MI_SEMAPHORE_WAIT state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setCompareOperation(const COMPARE_OPERATION value) { - TheStructure.Common.CompareOperation = value; - } - inline COMPARE_OPERATION getCompareOperation() const { - return static_cast(TheStructure.Common.CompareOperation); - } - inline void setWaitMode(const WAIT_MODE value) { - TheStructure.Common.WaitMode = value; - } - inline WAIT_MODE getWaitMode() const { - return static_cast(TheStructure.Common.WaitMode); - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - inline void setSemaphoreDataDword(const uint32_t value) { - TheStructure.Common.SemaphoreDataDword = value; - } - inline uint32_t getSemaphoreDataDword() const { - return (TheStructure.Common.SemaphoreDataDword); - } - typedef enum tagSEMAPHOREADDRESS_GRAPHICSADDRESS { - SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_GRAPHICSADDRESS_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_GRAPHICSADDRESS; - inline void setSemaphoreGraphicsAddress(const uint64_t value) { - TheStructure.Common.SemaphoreAddress_Graphicsaddress = value >> SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT; - } - inline uint64_t getSemaphoreGraphicsAddress() const { - return (TheStructure.Common.SemaphoreAddress_Graphicsaddress << SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT); - } - typedef enum tagSEMAPHOREADDRESS_RESERVED { - SEMAPHOREADDRESS_RESERVED_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS_RESERVED; - inline void setSemaphoreAddressReserved(const uint64_t value) { - TheStructure.Common.SemaphoreAddress_Reserved = value >> SEMAPHOREADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getSemaphoreAddressReserved() const { - return (TheStructure.Common.SemaphoreAddress_Reserved << SEMAPHOREADDRESS_RESERVED_BIT_SHIFT); - } -} MI_SEMAPHORE_WAIT; -STATIC_ASSERT(16 == sizeof(MI_SEMAPHORE_WAIT)); - -typedef struct tagMI_STORE_DATA_IMM { - union tagTheStructure { - struct tagCommon { - uint32_t DwordLength : BITFIELD_RANGE(0, 9); - uint32_t Reserved_10 : BITFIELD_RANGE(10, 20); - uint32_t StoreQword : BITFIELD_RANGE(21, 21); - uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - uint64_t CoreModeEnable : BITFIELD_RANGE(0, 0); - uint64_t Reserved_33 : BITFIELD_RANGE(1, 1); - uint64_t Address_Graphicsaddress47_2 : BITFIELD_RANGE(2, 47); - uint64_t Address_Reserved : BITFIELD_RANGE(48, 63); - uint32_t DataDword0; - uint32_t DataDword1; - } Common; - uint32_t RawData[5]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_STORE_DWORD = 0x2, - DWORD_LENGTH_STORE_QWORD = 0x3, - } DWORD_LENGTH; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_STORE_DATA_IMM = 0x20, - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_STORE_DWORD; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_DATA_IMM; - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_STORE_DATA_IMM sInit() { - MI_STORE_DATA_IMM state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - DEBUG_BREAK_IF(index >= 5); - return TheStructure.RawData[index]; - } - inline void setDwordLength(const DWORD_LENGTH value) { - TheStructure.Common.DwordLength = value; - } - inline DWORD_LENGTH getDwordLength() const { - return static_cast(TheStructure.Common.DwordLength); - } - inline void setStoreQword(const bool value) { - TheStructure.Common.StoreQword = value; - } - inline bool getStoreQword() const { - return (TheStructure.Common.StoreQword); - } - inline void setUseGlobalGtt(const bool value) { - TheStructure.Common.UseGlobalGtt = value; - } - inline bool getUseGlobalGtt() const { - return (TheStructure.Common.UseGlobalGtt); - } - inline void setCoreModeEnable(const uint64_t value) { - TheStructure.Common.CoreModeEnable = value; - } - inline uint64_t getCoreModeEnable() const { - return (TheStructure.Common.CoreModeEnable); - } - typedef enum tagADDRESS_GRAPHICSADDRESS47_2 { - ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT = 0x2, - ADDRESS_GRAPHICSADDRESS47_2_ALIGN_SIZE = 0x4, - } ADDRESS_GRAPHICSADDRESS47_2; - inline void setAddress(const uint64_t value) { - TheStructure.Common.Address_Graphicsaddress47_2 = value >> ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT; - } - inline uint64_t getAddress() const { - return (TheStructure.Common.Address_Graphicsaddress47_2 << ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT); - } - typedef enum tagADDRESS_RESERVED { - ADDRESS_RESERVED_BIT_SHIFT = 0x2, - ADDRESS_RESERVED_ALIGN_SIZE = 0x4, - } ADDRESS_RESERVED; - inline void setAddressReserved(const uint64_t value) { - TheStructure.Common.Address_Reserved = value >> ADDRESS_RESERVED_BIT_SHIFT; - } - inline uint64_t getAddressReserved() const { - return (TheStructure.Common.Address_Reserved << ADDRESS_RESERVED_BIT_SHIFT); - } - inline void setDataDword0(const uint32_t value) { - TheStructure.Common.DataDword0 = value; - } - inline uint32_t getDataDword0() const { - return (TheStructure.Common.DataDword0); - } - inline void setDataDword1(const uint32_t value) { - TheStructure.Common.DataDword1 = value; - } - inline uint32_t getDataDword1() const { - return (TheStructure.Common.DataDword1); - } -} MI_STORE_DATA_IMM; -STATIC_ASSERT(20 == sizeof(MI_STORE_DATA_IMM)); - -typedef struct tagSAMPLER_BORDER_COLOR_STATE { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - float BorderColorRed; - // DWORD 1 - float BorderColorGreen; - // DWORD 2 - float BorderColorBlue; - // DWORD 3 - float BorderColorAlpha; - } Common; - uint32_t RawData[4]; - } TheStructure; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.BorderColorRed = 0.0; - TheStructure.Common.BorderColorGreen = 0.0; - TheStructure.Common.BorderColorBlue = 0.0; - TheStructure.Common.BorderColorAlpha = 0.0; - } - static tagSAMPLER_BORDER_COLOR_STATE sInit() { - SAMPLER_BORDER_COLOR_STATE state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 4); - return TheStructure.RawData[index]; - } - inline void setBorderColorRed(const float value) { - TheStructure.Common.BorderColorRed = value; - } - inline float getBorderColorRed() const { - return TheStructure.Common.BorderColorRed; - } - inline void setBorderColorGreen(const float value) { - TheStructure.Common.BorderColorGreen = value; - } - inline float getBorderColorGreen() const { - return TheStructure.Common.BorderColorGreen; - } - inline void setBorderColorBlue(const float value) { - TheStructure.Common.BorderColorBlue = value; - } - inline float getBorderColorBlue() const { - return TheStructure.Common.BorderColorBlue; - } - inline void setBorderColorAlpha(const float value) { - TheStructure.Common.BorderColorAlpha = value; - } - inline float getBorderColorAlpha() const { - return TheStructure.Common.BorderColorAlpha; - } -} SAMPLER_BORDER_COLOR_STATE; -STATIC_ASSERT(16 == sizeof(SAMPLER_BORDER_COLOR_STATE)); - -#pragma pack() diff --git a/shared/test/common/gen11/CMakeLists.txt b/shared/test/common/gen11/CMakeLists.txt deleted file mode 100644 index b15d25ebf7..0000000000 --- a/shared/test/common/gen11/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - target_sources(neo_libult_common PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen11.h - ) - - add_subdirectories() -endif() diff --git a/shared/test/common/gen11/cmd_parse_gen11.cpp b/shared/test/common/gen11/cmd_parse_gen11.cpp deleted file mode 100644 index 3cbccf76ac..0000000000 --- a/shared/test/common/gen11/cmd_parse_gen11.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -using GenStruct = NEO::Gen11; -using GenGfxFamily = NEO::Gen11Family; - -#include "shared/test/common/cmd_parse/cmd_parse_base.inl" -#include "shared/test/common/cmd_parse/cmd_parse_base_mi_arb.inl" -#include "shared/test/common/cmd_parse/cmd_parse_csr_base_address.inl" -#include "shared/test/common/cmd_parse/cmd_parse_gpgpu_walker.inl" -#include "shared/test/common/cmd_parse/cmd_parse_sip.inl" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/cmd_parse/hw_parse_base.inl" - -template <> -size_t CmdParse::getCommandLengthHwSpecific(void *cmd) { - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - return 0; -} - -template <> -const char *CmdParse::getCommandNameHwSpecific(void *cmd) { - if (nullptr != genCmdCast(cmd)) { - return "GPGPU_WALKER"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_INTERFACE_DESCRIPTOR_LOAD"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_VFE_STATE"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_STATE_FLUSH"; - } - - if (nullptr != genCmdCast(cmd)) { - return "GPGPU_CSR_BASE_ADDRESS"; - } - - if (nullptr != genCmdCast(cmd)) { - return "STATE_SIP"; - } - return "UNKNOWN"; -} - -template struct CmdParse; - -namespace NEO { -template void HardwareParse::findHardwareCommands(); -template void HardwareParse::findHardwareCommands(IndirectHeap *); -template const void *HardwareParse::getStatelessArgumentPointer(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex); -template const typename Gen11Family::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState(IndirectHeap *ssh, uint32_t index); -} // namespace NEO diff --git a/shared/test/common/gen11/ehl/mock_product_helper_ehl.cpp b/shared/test/common/gen11/ehl/mock_product_helper_ehl.cpp deleted file mode 100644 index 7450366cd7..0000000000 --- a/shared/test/common/gen11/ehl/mock_product_helper_ehl.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_ELKHARTLAKE; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen11/icllp/mock_product_helper_icllp.cpp b/shared/test/common/gen11/icllp/mock_product_helper_icllp.cpp deleted file mode 100644 index 9c3c19a91f..0000000000 --- a/shared/test/common/gen11/icllp/mock_product_helper_icllp.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_ICELAKE_LP; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen11/lkf/mock_product_helper_lkf.cpp b/shared/test/common/gen11/lkf/mock_product_helper_lkf.cpp deleted file mode 100644 index 17ed0b1d35..0000000000 --- a/shared/test/common/gen11/lkf/mock_product_helper_lkf.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_LAKEFIELD; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen11/test_traits_gen11.h b/shared/test/common/gen11/test_traits_gen11.h deleted file mode 100644 index e752a0df25..0000000000 --- a/shared/test/common/gen11/test_traits_gen11.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/test/common/helpers/test_traits.h" - -template <> -struct TestTraits { - static constexpr bool auxBuiltinsSupported = false; - static constexpr bool programOnlyChangedFieldsInComputeStateMode = true; - static constexpr bool iohInSbaSupported = true; - static constexpr bool auxTranslationSupported = false; - static constexpr bool isUsingNonDefaultIoctls = false; - static constexpr bool deviceEnqueueSupport = false; - static constexpr bool implementsPreambleThreadArbitration = true; - static constexpr bool forceGpuNonCoherent = false; - static constexpr bool imagesSupported = true; - static constexpr bool programComputeModeCommandProgramsThreadArbitrationPolicy = true; - static constexpr bool programComputeModeCommandProgramsNonCoherent = true; - static constexpr bool heaplessAllowed = false; -}; diff --git a/shared/test/common/gen11/unit_test_helper_gen11.cpp b/shared/test/common/gen11/unit_test_helper_gen11.cpp deleted file mode 100644 index 907c8f734d..0000000000 --- a/shared/test/common/gen11/unit_test_helper_gen11.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/gen11/hw_info.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/helpers/unit_test_helper.inl" -#include "shared/test/common/helpers/unit_test_helper_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen11Family; - -template <> -uint32_t UnitTestHelper::getDebugModeRegisterOffset() { - return 0x20d8; -} - -template struct UnitTestHelper; -} // namespace NEO diff --git a/shared/test/common/gen8/CMakeLists.txt b/shared/test/common/gen8/CMakeLists.txt deleted file mode 100644 index 0026eb546a..0000000000 --- a/shared/test/common/gen8/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - target_sources(neo_libult_common PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen8.h - ) - - add_subdirectories() -endif() diff --git a/shared/test/common/gen8/bdw/mock_product_helper_bdw.cpp b/shared/test/common/gen8/bdw/mock_product_helper_bdw.cpp deleted file mode 100644 index a1c4c1d8f8..0000000000 --- a/shared/test/common/gen8/bdw/mock_product_helper_bdw.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_BROADWELL; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen8/cmd_parse_gen8.cpp b/shared/test/common/gen8/cmd_parse_gen8.cpp deleted file mode 100644 index 63e9ec341a..0000000000 --- a/shared/test/common/gen8/cmd_parse_gen8.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -using GenStruct = NEO::Gen8; -using GenGfxFamily = NEO::Gen8Family; - -#include "shared/test/common/cmd_parse/cmd_parse_base.inl" -#include "shared/test/common/cmd_parse/cmd_parse_base_mi_arb.inl" -#include "shared/test/common/cmd_parse/cmd_parse_csr_base_address.inl" -#include "shared/test/common/cmd_parse/cmd_parse_gpgpu_walker.inl" -#include "shared/test/common/cmd_parse/cmd_parse_sip.inl" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/cmd_parse/hw_parse_base.inl" - -template <> -size_t CmdParse::getCommandLengthHwSpecific(void *cmd) { - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - return 0; -} - -template <> -const char *CmdParse::getCommandNameHwSpecific(void *cmd) { - if (nullptr != genCmdCast(cmd)) { - return "GPGPU_WALKER"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_INTERFACE_DESCRIPTOR_LOAD"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_VFE_STATE"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_STATE_FLUSH"; - } - return "UNKNOWN"; -} - -template struct CmdParse; - -namespace NEO { -template void HardwareParse::findHardwareCommands(); -template void HardwareParse::findHardwareCommands(IndirectHeap *); -template const void *HardwareParse::getStatelessArgumentPointer(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex); -template const typename Gen8Family::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState(IndirectHeap *ssh, uint32_t index); -} // namespace NEO diff --git a/shared/test/common/gen8/test_traits_gen8.h b/shared/test/common/gen8/test_traits_gen8.h deleted file mode 100644 index 996972748e..0000000000 --- a/shared/test/common/gen8/test_traits_gen8.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/test/common/helpers/test_traits.h" - -template <> -struct TestTraits { - static constexpr bool auxBuiltinsSupported = false; - static constexpr bool programOnlyChangedFieldsInComputeStateMode = true; - static constexpr bool iohInSbaSupported = true; - static constexpr bool isUsingNonDefaultIoctls = false; - static constexpr bool deviceEnqueueSupport = false; - static constexpr bool implementsPreambleThreadArbitration = false; - static constexpr bool forceGpuNonCoherent = false; - static constexpr bool imagesSupported = true; - static constexpr bool programComputeModeCommandProgramsThreadArbitrationPolicy = false; - static constexpr bool programComputeModeCommandProgramsNonCoherent = false; - static constexpr bool heaplessAllowed = false; -}; diff --git a/shared/test/common/gen8/unit_test_helper_gen8.cpp b/shared/test/common/gen8/unit_test_helper_gen8.cpp deleted file mode 100644 index 05a381f45d..0000000000 --- a/shared/test/common/gen8/unit_test_helper_gen8.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/gen8/hw_info.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/helpers/unit_test_helper.inl" -#include "shared/test/common/helpers/unit_test_helper_bdw_and_later.inl" - -namespace NEO { - -using Family = Gen8Family; - -template <> -uint32_t UnitTestHelper::getDebugModeRegisterOffset() { - return 0x20ec; -} - -template <> -uint32_t UnitTestHelper::getDebugModeRegisterValue() { - return (1u << 6) | (1u << 22); -} - -template struct UnitTestHelper; -} // namespace NEO diff --git a/shared/test/common/gen9/CMakeLists.txt b/shared/test/common/gen9/CMakeLists.txt deleted file mode 100644 index fd7bb56c3b..0000000000 --- a/shared/test/common/gen9/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - target_sources(neo_libult_common PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen9.h - ) -endif() diff --git a/shared/test/common/gen9/bxt/mock_product_helper_bxt.cpp b/shared/test/common/gen9/bxt/mock_product_helper_bxt.cpp deleted file mode 100644 index 30f3a630af..0000000000 --- a/shared/test/common/gen9/bxt/mock_product_helper_bxt.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_BROXTON; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen9/cfl/mock_product_helper_cfl.cpp b/shared/test/common/gen9/cfl/mock_product_helper_cfl.cpp deleted file mode 100644 index 0c132f4432..0000000000 --- a/shared/test/common/gen9/cfl/mock_product_helper_cfl.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_COFFEELAKE; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen9/cmd_parse_gen9.cpp b/shared/test/common/gen9/cmd_parse_gen9.cpp deleted file mode 100644 index 986ed8988c..0000000000 --- a/shared/test/common/gen9/cmd_parse_gen9.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -using GenStruct = NEO::Gen9; -using GenGfxFamily = NEO::Gen9Family; - -#include "shared/test/common/cmd_parse/cmd_parse_base.inl" -#include "shared/test/common/cmd_parse/cmd_parse_base_mi_arb.inl" -#include "shared/test/common/cmd_parse/cmd_parse_csr_base_address.inl" -#include "shared/test/common/cmd_parse/cmd_parse_gpgpu_walker.inl" -#include "shared/test/common/cmd_parse/cmd_parse_sip.inl" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/cmd_parse/hw_parse_base.inl" - -template <> -size_t CmdParse::getCommandLengthHwSpecific(void *cmd) { - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - { - auto pCmd = genCmdCast(cmd); - if (pCmd) - return pCmd->TheStructure.Common.DwordLength + 2; - } - return 0; -} - -template <> -const char *CmdParse::getCommandNameHwSpecific(void *cmd) { - if (nullptr != genCmdCast(cmd)) { - return "GPGPU_WALKER"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_INTERFACE_DESCRIPTOR_LOAD"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_VFE_STATE"; - } - - if (nullptr != genCmdCast(cmd)) { - return "MEDIA_STATE_FLUSH"; - } - - if (nullptr != genCmdCast(cmd)) { - return "GPGPU_CSR_BASE_ADDRESS"; - } - - if (nullptr != genCmdCast(cmd)) { - return "STATE_SIP"; - } - return "UNKNOWN"; -} - -template struct CmdParse; - -namespace NEO { -template void HardwareParse::findHardwareCommands(); -template void HardwareParse::findHardwareCommands(IndirectHeap *); -template const void *HardwareParse::getStatelessArgumentPointer(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex); -template const typename Gen9Family::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState(IndirectHeap *ssh, uint32_t index); -} // namespace NEO diff --git a/shared/test/common/gen9/glk/mock_product_helper_glk.cpp b/shared/test/common/gen9/glk/mock_product_helper_glk.cpp deleted file mode 100644 index d7e38b37a4..0000000000 --- a/shared/test/common/gen9/glk/mock_product_helper_glk.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_GEMINILAKE; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen9/kbl/mock_product_helper_kbl.cpp b/shared/test/common/gen9/kbl/mock_product_helper_kbl.cpp deleted file mode 100644 index 4feb4d343e..0000000000 --- a/shared/test/common/gen9/kbl/mock_product_helper_kbl.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_KABYLAKE; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen9/skl/mock_product_helper_skl.cpp b/shared/test/common/gen9/skl/mock_product_helper_skl.cpp deleted file mode 100644 index 5916824ffc..0000000000 --- a/shared/test/common/gen9/skl/mock_product_helper_skl.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/mock_product_helper_hw.h" - -constexpr static auto gfxProduct = IGFX_SKYLAKE; - -#include "shared/test/common/helpers/mock_product_helper_hw.inl" - -template struct NEO::MockProductHelperHw; diff --git a/shared/test/common/gen9/test_traits_gen9.h b/shared/test/common/gen9/test_traits_gen9.h deleted file mode 100644 index d827308ea7..0000000000 --- a/shared/test/common/gen9/test_traits_gen9.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2021-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#pragma once -#include "shared/test/common/helpers/test_traits.h" - -template <> -struct TestTraits { - static constexpr bool auxBuiltinsSupported = false; - static constexpr bool programOnlyChangedFieldsInComputeStateMode = true; - static constexpr bool iohInSbaSupported = true; - static constexpr bool isUsingNonDefaultIoctls = false; - static constexpr bool deviceEnqueueSupport = false; - static constexpr bool implementsPreambleThreadArbitration = true; - static constexpr bool forceGpuNonCoherent = false; - static constexpr bool imagesSupported = true; - static constexpr bool programComputeModeCommandProgramsThreadArbitrationPolicy = true; - static constexpr bool programComputeModeCommandProgramsNonCoherent = false; - static constexpr bool heaplessAllowed = false; -}; diff --git a/shared/test/common/gen9/unit_test_helper_gen9.cpp b/shared/test/common/gen9/unit_test_helper_gen9.cpp deleted file mode 100644 index f7b8b5b532..0000000000 --- a/shared/test/common/gen9/unit_test_helper_gen9.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gen9/hw_info.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/helpers/unit_test_helper.inl" -#include "shared/test/common/helpers/unit_test_helper_bdw_and_later.inl" - -namespace NEO { -using Family = Gen9Family; - -template <> -bool UnitTestHelper::isPipeControlWArequired(const HardwareInfo &hwInfo) { - return true; -} - -template <> -uint32_t UnitTestHelper::getDebugModeRegisterOffset() { - return 0x20ec; -} - -template <> -uint32_t UnitTestHelper::getDebugModeRegisterValue() { - return (1u << 6) | (1u << 22); -} - -template struct UnitTestHelper; -} // namespace NEO diff --git a/shared/test/common/helpers/includes/test_traits_common.h b/shared/test/common/helpers/includes/test_traits_common.h index 34e93f21b8..36e7b8bb92 100644 --- a/shared/test/common/helpers/includes/test_traits_common.h +++ b/shared/test/common/helpers/includes/test_traits_common.h @@ -6,10 +6,7 @@ */ #pragma once -#include "shared/test/common/gen11/test_traits_gen11.h" #include "shared/test/common/gen12lp/test_traits_gen12lp.h" -#include "shared/test/common/gen8/test_traits_gen8.h" -#include "shared/test/common/gen9/test_traits_gen9.h" #include "shared/test/common/xe2_hpg_core/test_traits_xe2_hpg_core.h" #include "shared/test/common/xe_hpc_core/test_traits_xe_hpc_core.h" #include "shared/test/common/xe_hpg_core/test_traits_xe_hpg_core.h" diff --git a/shared/test/common/test_configuration/aub_tests/gen11/CMakeLists.txt b/shared/test/common/test_configuration/aub_tests/gen11/CMakeLists.txt deleted file mode 100644 index 3a6e3c35f4..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - set(NEO_SHARED_aub_tests_configurations - ${NEO_SHARED_aub_tests_configurations} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration_gen11.cpp - ) - - set(NEO_SHARED_aub_tests_configurations ${NEO_SHARED_aub_tests_configurations} PARENT_SCOPE) -endif() diff --git a/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp b/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp deleted file mode 100644 index b4d19477e5..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen11/aub_tests_configuration_gen11.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl" - -using namespace NEO; - -template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/gen8/CMakeLists.txt b/shared/test/common/test_configuration/aub_tests/gen8/CMakeLists.txt deleted file mode 100644 index 2e547f0815..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen8/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - set(NEO_SHARED_aub_tests_configurations - ${NEO_SHARED_aub_tests_configurations} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration_gen8.cpp - ) - - set(NEO_SHARED_aub_tests_configurations ${NEO_SHARED_aub_tests_configurations} PARENT_SCOPE) -endif() diff --git a/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp b/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp deleted file mode 100644 index 5086fe0019..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen8/aub_tests_configuration_gen8.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl" - -using namespace NEO; - -template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/common/test_configuration/aub_tests/gen9/CMakeLists.txt b/shared/test/common/test_configuration/aub_tests/gen9/CMakeLists.txt deleted file mode 100644 index 80e1579ebf..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - set(NEO_SHARED_aub_tests_configurations - ${NEO_SHARED_aub_tests_configurations} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration_gen9.cpp - ) - - set(NEO_SHARED_aub_tests_configurations ${NEO_SHARED_aub_tests_configurations} PARENT_SCOPE) -endif() diff --git a/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp b/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp deleted file mode 100644 index 697900c9f6..0000000000 --- a/shared/test/common/test_configuration/aub_tests/gen9/aub_tests_configuration_gen9.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/test_configuration/aub_tests/aub_tests_configuration.inl" - -using namespace NEO; - -template AubTestsConfig getAubTestsConfig(); diff --git a/shared/test/unit_test/gen11/CMakeLists.txt b/shared/test/unit_test/gen11/CMakeLists.txt deleted file mode 100644 index 6ef928025e..0000000000 --- a/shared/test/unit_test/gen11/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2021-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen11_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen11.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen11/command_encoder_tests_gen11.cpp b/shared/test/unit_test/gen11/command_encoder_tests_gen11.cpp deleted file mode 100644 index 5d7f7dbc2c..0000000000 --- a/shared/test/unit_test/gen11/command_encoder_tests_gen11.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/blit_commands_helper.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen11CommandEncodeTest = testing::Test; -GEN11TEST_F(Gen11CommandEncodeTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) { - EXPECT_FALSE(EncodeSurfaceState::doBindingTablePrefetch()); -} - -GEN11TEST_F(Gen11CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) { - EXPECT_FALSE(BlitCommandsHelper::miArbCheckWaRequired()); -} - -GEN11TEST_F(Gen11CommandEncodeTest, givenSurfaceStateWhenAuxParamsForMCSCCSAreSetThenAuxModeStaysTheSame) { - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - MockDevice device; - auto releaseHelper = device.getReleaseHelper(); - - auto originalAuxMode = surfaceState.getAuxiliarySurfaceMode(); - - EncodeSurfaceState::setAuxParamsForMCSCCS(&surfaceState, releaseHelper); - - EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), originalAuxMode); -} diff --git a/shared/test/unit_test/gen11/ehl/CMakeLists.txt b/shared/test/unit_test/gen11/ehl/CMakeLists.txt deleted file mode 100644 index 4bc47bc4be..0000000000 --- a/shared/test/unit_test/gen11/ehl/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_EHL) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen11_ehl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_ehl.cpp - ) - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen11/ehl/excludes_gen11_ehl.cpp b/shared/test/unit_test/gen11/ehl/excludes_gen11_ehl.cpp deleted file mode 100644 index 005369b04d..0000000000 --- a/shared/test/unit_test/gen11/ehl/excludes_gen11_ehl.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (C) 2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" - -HWTEST_EXCLUDE_PRODUCT(AubCenterTests, whenCreatingAubManagerThenCorrectProductFamilyIsPassed, IGFX_ELKHARTLAKE); diff --git a/shared/test/unit_test/gen11/ehl/linux/CMakeLists.txt b/shared/test/unit_test/gen11/ehl/linux/CMakeLists.txt deleted file mode 100644 index 94477005c9..0000000000 --- a/shared/test/unit_test/gen11/ehl/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_ehl.cpp - ) -endif() diff --git a/shared/test/unit_test/gen11/ehl/linux/product_helper_tests_ehl.cpp b/shared/test/unit_test/gen11/ehl/linux/product_helper_tests_ehl.cpp deleted file mode 100644 index 9a42f80f0a..0000000000 --- a/shared/test/unit_test/gen11/ehl/linux/product_helper_tests_ehl.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -template -class EhlHwInfoTests : public ::testing::Test {}; -TEST(EhlHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo = *defaultHwInfo; - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &hwInfo, &EhlHwConfig::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp b/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp deleted file mode 100644 index ed561c2f68..0000000000 --- a/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "platforms.h" - -using namespace NEO; - -using EhlProductHelper = ProductHelperTest; - -EHLTEST_F(EhlProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - hardwareInfoSetup[productFamily](&pInHwInfo, false, 0x100040008, nullptr); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); - EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); -} - -EHLTEST_F(EhlProductHelper, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - bool boolValue[]{ - true, false}; - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - FeatureTable &featureTable = pInHwInfo.featureTable; - WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; - - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, 0x100040008, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrStandardMipTailFormat); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - } -} - -EHLTEST_F(EhlProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::EHL); -} - -EHLTEST_F(EhlProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -EHLTEST_F(EhlProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen11/gfx_core_helper_tests_gen11.cpp b/shared/test/unit_test/gen11/gfx_core_helper_tests_gen11.cpp deleted file mode 100644 index fe5e2b00b1..0000000000 --- a/shared/test/unit_test/gen11/gfx_core_helper_tests_gen11.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using GfxCoreHelperTestGen11 = GfxCoreHelperTest; - -GEN11TEST_F(GfxCoreHelperTestGen11, WhenGettingMaxBarriersPerSliceThenCorrectSizeIsReturned) { - auto &helper = getHelper(); - EXPECT_EQ(32u, helper.getMaxBarrierRegisterPerSlice()); -} - -GEN11TEST_F(GfxCoreHelperTestGen11, WhenGettingPitchAlignmentForImageThenCorrectValueIsReturned) { - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(4u, gfxCoreHelper.getPitchAlignmentForImage(pDevice->getRootDeviceEnvironment())); -} - -GEN11TEST_F(GfxCoreHelperTestGen11, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) { - auto engineType = hardwareInfo.capabilityTable.defaultEngineType; - auto &gfxCoreHelper = getHelper(); - auto &productHelper = getHelper(); - - gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr); - EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType); -} - -GEN11TEST_F(GfxCoreHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) { - auto &gfxCoreHelper = getHelper(); - auto gpgpuEngines = gfxCoreHelper.getGpgpuEngineInstances(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(3u, gpgpuEngines.size()); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[0].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[1].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[2].first); - EXPECT_EQ(3u, pDevice->allEngines.size()); -} - -using MemorySynchronizatiopCommandsTestsGen11 = ::testing::Test; -GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) { - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - std::unique_ptr buffer(new uint8_t[128]); - MockExecutionEnvironment mockExecutionEnvironment{}; - LinearStream stream(buffer.get(), 128); - MemorySynchronizationCommands::addFullCacheFlush(stream, *mockExecutionEnvironment.rootDeviceEnvironments[0]); - PIPE_CONTROL *pipeControl = genCmdCast(buffer.get()); - ASSERT_NE(nullptr, pipeControl); - EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable()); -} - -GEN11TEST_F(GfxCoreHelperTestGen11, givenGen11WhenCallIsPackedSupportedThenReturnTrue) { - auto &helper = pDevice->getGfxCoreHelper(); - EXPECT_TRUE(helper.packedFormatsSupported()); -} diff --git a/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp b/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp deleted file mode 100644 index 5a01b1013e..0000000000 --- a/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen11HwCmdTest = ::testing::Test; - -GEN11TEST_F(Gen11HwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - renderSurfaceState.setMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables); -} - -GEN11TEST_F(Gen11HwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setIndirectObjectMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setInstructionMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables); -} - -GEN11TEST_F(Gen11HwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables); -} diff --git a/shared/test/unit_test/gen11/icllp/CMakeLists.txt b/shared/test/unit_test/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 40af78f5ff..0000000000 --- a/shared/test/unit_test/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ICLLP) - set(NEO_CORE_tests_gen11_icllp_excludes ${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen11_icllp.cpp) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_tests_excludes ${NEO_CORE_tests_gen11_icllp_excludes}) - - set(NEO_SHARED_tests_gen11_icllp ${NEO_CORE_tests_gen11_icllp_excludes}) - - target_sources(neo_shared_tests PRIVATE - ${NEO_SHARED_tests_gen11_icllp} - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_icllp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_program_media_sampler_icllp.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen11/icllp/excludes_gen11_icllp.cpp b/shared/test/unit_test/gen11/icllp/excludes_gen11_icllp.cpp deleted file mode 100644 index e2bdb191e3..0000000000 --- a/shared/test/unit_test/gen11/icllp/excludes_gen11_icllp.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" - -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfAdditionalMediaSamplerProgrammingIsRequiredThenFalseIsReturned, IGFX_ICELAKE_LP) -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfInitialFlagsProgrammingIsRequiredThenFalseIsReturned, IGFX_ICELAKE_LP) -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfReturnedCmdSizeForMediaSamplerAdjustmentIsRequiredThenFalseIsReturned, IGFX_ICELAKE_LP) diff --git a/shared/test/unit_test/gen11/icllp/linux/CMakeLists.txt b/shared/test/unit_test/gen11/icllp/linux/CMakeLists.txt deleted file mode 100644 index 1851b0d94a..0000000000 --- a/shared/test/unit_test/gen11/icllp/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_icllp.cpp - ) -endif() diff --git a/shared/test/unit_test/gen11/icllp/linux/product_helper_tests_icllp.cpp b/shared/test/unit_test/gen11/icllp/linux/product_helper_tests_icllp.cpp deleted file mode 100644 index 5c9ef7916a..0000000000 --- a/shared/test/unit_test/gen11/icllp/linux/product_helper_tests_icllp.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -template -class IcllpHwInfoTests : public ::testing::Test {}; -typedef ::testing::Types icllpTestTypes; -TYPED_TEST_SUITE(IcllpHwInfoTests, icllpTestTypes); -TYPED_TEST(IcllpHwInfoTests, WhenGettingSystemInfoThenParamsAreValid) { - auto executionEnvironment = std::make_unique(); - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 5u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp b/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp deleted file mode 100644 index 987355d5be..0000000000 --- a/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; - -using IcllpProductHelper = ProductHelperTest; - -ICLLPTEST_F(IcllpProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -ICLLPTEST_F(IcllpProductHelper, givenProductHelperWhenAskedIfAdditionalMediaSamplerProgrammingIsRequiredThenTrueIsReturned) { - - EXPECT_TRUE(productHelper->isAdditionalMediaSamplerProgrammingRequired()); -} - -ICLLPTEST_F(IcllpProductHelper, givenProductHelperWhenAskedIfInitialFlagsProgrammingIsRequiredThenTrueIsReturned) { - - EXPECT_TRUE(productHelper->isInitialFlagsProgrammingRequired()); -} - -ICLLPTEST_F(IcllpProductHelper, givenProductHelperWhenAskedIfReturnedCmdSizeForMediaSamplerAdjustmentIsRequiredThenTrueIsReturned) { - - EXPECT_TRUE(productHelper->isReturnedCmdSizeForMediaSamplerAdjustmentRequired()); -} - -ICLLPTEST_F(IcllpProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Icllp, productHelper->getAubStreamProductFamily()); -} - -ICLLPTEST_F(IcllpProductHelper, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100080008, - 0x100040008, - 0x100060008}; - bool boolValue[]{ - true, false}; - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - FeatureTable &featureTable = pInHwInfo.featureTable; - WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; - - for (auto config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrStandardMipTailFormat); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - } - } -} - -ICLLPTEST_F(IcllpProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - EXPECT_EQ(compilerProductHelper->getHwIpVersion(*defaultHwInfo), AOT::ICL); -} - -ICLLPTEST_F(IcllpProductHelper, givenCompilerProductHelperWhenGettingOclocEnforceZebinFormatThenExpectTrue) { - EXPECT_TRUE(compilerProductHelper->oclocEnforceZebinFormat()); -} - -ICLLPTEST_F(IcllpProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -ICLLPTEST_F(IcllpProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen11/icllp/test_program_media_sampler_icllp.cpp b/shared/test/unit_test/gen11/icllp/test_program_media_sampler_icllp.cpp deleted file mode 100644 index b857a06da2..0000000000 --- a/shared/test/unit_test/gen11/icllp/test_program_media_sampler_icllp.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_hw.h" -#include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/gen11/reg_configs.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using PIPE_CONTROL = typename Gen11Family::PIPE_CONTROL; -struct Gen11MediaSamplerProgramingTest : public ::testing::Test { - typedef typename Gen11Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - - struct MyCsr : public CommandStreamReceiverHw { - using CommandStreamReceiver::commandStream; - using CommandStreamReceiverHw::programMediaSampler; - MyCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw(executionEnvironment, 0, 1){}; - void overrideLastVmeSubliceConfig(bool value) { - lastVmeSubslicesConfig = value; - } - }; - - void overrideMediaRequest(bool lastVmeConfig, bool mediaSamplerRequired) { - csr->overrideLastVmeSubliceConfig(lastVmeConfig); - flags.pipelineSelectArgs.mediaSamplerRequired = mediaSamplerRequired; - } - - void SetUp() override { - device.reset(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); - csr = new MyCsr(*device->executionEnvironment); - device->resetCommandStreamReceiver(csr); - - stream.reset(new LinearStream(buff, MemoryConstants::pageSize)); - } - - void programMediaSampler() { - csr->programMediaSampler(*stream, flags); - } - - size_t getCmdSize() { - return csr->getCmdSizeForMediaSampler(flags.pipelineSelectArgs.mediaSamplerRequired); - } - - MyCsr *csr = nullptr; - std::unique_ptr device; - DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags(); - char buff[MemoryConstants::pageSize]; - std::unique_ptr stream; -}; - -void setFlushAllCaches(PIPE_CONTROL &pc) { - pc.setDcFlushEnable(true); - pc.setRenderTargetCacheFlushEnable(true); - pc.setInstructionCacheInvalidateEnable(true); - pc.setTextureCacheInvalidationEnable(true); - pc.setPipeControlFlushEnable(true); - pc.setVfCacheInvalidationEnable(true); - pc.setConstantCacheInvalidationEnable(true); - pc.setStateCacheInvalidationEnable(true); -} - -ICLLPTEST_F(Gen11MediaSamplerProgramingTest, givenVmeEnableSubsliceDisabledWhenPowerClockStateRegisterEnableThenExpectCorrectCmdValues) { - uint32_t programVmeCmdSize = sizeof(MI_LOAD_REGISTER_IMM) + 2 * sizeof(PIPE_CONTROL); - - overrideMediaRequest(false, true); - - size_t estimatedCmdSize = getCmdSize(); - EXPECT_EQ(programVmeCmdSize, estimatedCmdSize); - - auto expectedMiLrCmd = FamilyType::cmdInitLoadRegisterImm; - expectedMiLrCmd.setRegisterOffset(gen11PowerClockStateRegister::address); - auto expectedRegValue = (device->getHardwareInfo().gtSystemInfo.SubSliceCount / 2) << gen11PowerClockStateRegister::subSliceCountShift; - expectedRegValue |= (gen11PowerClockStateRegister::vmeSliceCount << gen11PowerClockStateRegister::sliceCountShift); - expectedRegValue |= (device->getHardwareInfo().gtSystemInfo.MaxEuPerSubSlice << gen11PowerClockStateRegister::minEuCountShift); - expectedRegValue |= (device->getHardwareInfo().gtSystemInfo.MaxEuPerSubSlice << gen11PowerClockStateRegister::maxEuCountShift); - expectedRegValue |= gen11PowerClockStateRegister::enabledValue; - expectedMiLrCmd.setDataDword(expectedRegValue); - - programMediaSampler(); - ASSERT_EQ(programVmeCmdSize, stream->getUsed()); - - auto expectedPipeControlCmd = FamilyType::cmdInitPipeControl; - expectedPipeControlCmd.setCommandStreamerStallEnable(0x1); - setFlushAllCaches(expectedPipeControlCmd); - auto pipeControlCmd = genCmdCast(stream->getCpuBase()); - ASSERT_NE(nullptr, pipeControlCmd); - EXPECT_EQ(0, memcmp(&expectedPipeControlCmd, pipeControlCmd, sizeof(PIPE_CONTROL))); - - size_t cmdOffset = sizeof(PIPE_CONTROL); - auto miLrCmd = genCmdCast(ptrOffset(stream->getCpuBase(), cmdOffset)); - ASSERT_NE(nullptr, miLrCmd); - EXPECT_EQ(0, memcmp(&expectedMiLrCmd, miLrCmd, sizeof(MI_LOAD_REGISTER_IMM))); - - cmdOffset += sizeof(MI_LOAD_REGISTER_IMM); - expectedPipeControlCmd = FamilyType::cmdInitPipeControl; - expectedPipeControlCmd.setCommandStreamerStallEnable(0x1); - pipeControlCmd = genCmdCast(ptrOffset(stream->getCpuBase(), cmdOffset)); - ASSERT_NE(nullptr, pipeControlCmd); - EXPECT_EQ(0, memcmp(&expectedPipeControlCmd, pipeControlCmd, sizeof(PIPE_CONTROL))); -} - -ICLLPTEST_F(Gen11MediaSamplerProgramingTest, givenVmeEnableSubsliceEnabledWhenPowerClockStateRegisterDisableThenExpectCorrectCmdValues) { - constexpr uint32_t programVmeCmdSize = sizeof(MI_LOAD_REGISTER_IMM) + 3 * sizeof(PIPE_CONTROL); - - overrideMediaRequest(true, false); - - size_t estimatedCmdSize = getCmdSize(); - EXPECT_EQ(programVmeCmdSize, estimatedCmdSize); - - programMediaSampler(); - - auto expectedMiLrCmd = FamilyType::cmdInitLoadRegisterImm; - expectedMiLrCmd.setRegisterOffset(gen11PowerClockStateRegister::address); - auto expectedRegValue = (device->getHardwareInfo().gtSystemInfo.SubSliceCount / 2) << gen11PowerClockStateRegister::subSliceCountShift; - expectedRegValue |= ((device->getHardwareInfo().gtSystemInfo.SliceCount * 2) << gen11PowerClockStateRegister::sliceCountShift); - expectedRegValue |= (device->getHardwareInfo().gtSystemInfo.MaxEuPerSubSlice << gen11PowerClockStateRegister::minEuCountShift); - expectedRegValue |= (device->getHardwareInfo().gtSystemInfo.MaxEuPerSubSlice << gen11PowerClockStateRegister::maxEuCountShift); - expectedRegValue |= gen11PowerClockStateRegister::disabledValue; - expectedMiLrCmd.setDataDword(expectedRegValue); - - ASSERT_EQ(programVmeCmdSize, stream->getUsed()); - - auto expectedPipeControlCmd = FamilyType::cmdInitPipeControl; - expectedPipeControlCmd.setCommandStreamerStallEnable(0x1); - setFlushAllCaches(expectedPipeControlCmd); - expectedPipeControlCmd.setGenericMediaStateClear(true); - auto pipeControlCmd = genCmdCast(stream->getCpuBase()); - ASSERT_NE(nullptr, pipeControlCmd); - EXPECT_EQ(0, memcmp(&expectedPipeControlCmd, pipeControlCmd, sizeof(PIPE_CONTROL))); - - size_t cmdOffset = sizeof(PIPE_CONTROL); - pipeControlCmd = genCmdCast(ptrOffset(stream->getCpuBase(), cmdOffset)); - ASSERT_NE(nullptr, pipeControlCmd); - expectedPipeControlCmd = FamilyType::cmdInitPipeControl; - expectedPipeControlCmd.setCommandStreamerStallEnable(0x1); - EXPECT_EQ(0, memcmp(&expectedPipeControlCmd, pipeControlCmd, sizeof(PIPE_CONTROL))); - - cmdOffset += sizeof(PIPE_CONTROL); - auto miLrCmd = genCmdCast(ptrOffset(stream->getCpuBase(), cmdOffset)); - ASSERT_NE(nullptr, miLrCmd); - EXPECT_EQ(0, memcmp(&expectedMiLrCmd, miLrCmd, sizeof(MI_LOAD_REGISTER_IMM))); - - cmdOffset += sizeof(MI_LOAD_REGISTER_IMM); - pipeControlCmd = genCmdCast(ptrOffset(stream->getCpuBase(), cmdOffset)); - ASSERT_NE(nullptr, pipeControlCmd); - EXPECT_EQ(0, memcmp(&expectedPipeControlCmd, pipeControlCmd, sizeof(PIPE_CONTROL))); -} - -ICLLPTEST_F(Gen11MediaSamplerProgramingTest, givenVmeEnableSubsliceEnabledWhenPowerClockStateRegisterEnabledThenExpectNoCmds) { - constexpr uint32_t programVmeCmdSize = 0; - - overrideMediaRequest(true, true); - - size_t estimatedCmdSize = getCmdSize(); - EXPECT_EQ(programVmeCmdSize, estimatedCmdSize); - - programMediaSampler(); - EXPECT_EQ(programVmeCmdSize, stream->getUsed()); -} - -ICLLPTEST_F(Gen11MediaSamplerProgramingTest, givenVmeEnableSubsliceDisabledWhenPowerClockStateRegisterDisableThenExpectNoCmds) { - constexpr uint32_t programVmeCmdSize = 0; - - overrideMediaRequest(false, false); - - size_t estimatedCmdSize = getCmdSize(); - EXPECT_EQ(programVmeCmdSize, estimatedCmdSize); - - programMediaSampler(); - EXPECT_EQ(programVmeCmdSize, stream->getUsed()); -} diff --git a/shared/test/unit_test/gen11/image_surface_state_tests_gen11.cpp b/shared/test/unit_test/gen11/image_surface_state_tests_gen11.cpp deleted file mode 100644 index fa811a9565..0000000000 --- a/shared/test/unit_test/gen11/image_surface_state_tests_gen11.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/image/image_surface_state_fixture.h" - -using namespace NEO; - -using ImageSurfaceStateTestsGen11 = ImageSurfaceStateTests; - -GEN11TEST_F(ImageSurfaceStateTestsGen11, givenGmmWithMediaCompressedWhenSetFlagsForMediaCompressionThenAuxiliarySurfaceNoneIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - castSurfaceState->setAuxiliarySurfaceMode(FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = false; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = true; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); -} - -GEN11TEST_F(ImageSurfaceStateTestsGen11, givenGmmWithMediaCompressedWhenSetMipTailStartLodThenMipTailStartLodIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - - setMipTailStartLod(castSurfaceState, nullptr); - - EXPECT_EQ(castSurfaceState->getMipTailStartLod(), 0u); - - setMipTailStartLod(castSurfaceState, mockGmm.get()); - - EXPECT_EQ(castSurfaceState->getMipTailStartLod(), mockGmm->gmmResourceInfo->getMipTailStartLodSurfaceState()); -} diff --git a/shared/test/unit_test/gen11/lkf/CMakeLists.txt b/shared/test/unit_test/gen11/lkf/CMakeLists.txt deleted file mode 100644 index f54c2780eb..0000000000 --- a/shared/test/unit_test/gen11/lkf/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_LKF) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen11_lkf.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_lkf.cpp - ) - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen11/lkf/excludes_gen11_lkf.cpp b/shared/test/unit_test/gen11/lkf/excludes_gen11_lkf.cpp deleted file mode 100644 index b361bdffd2..0000000000 --- a/shared/test/unit_test/gen11/lkf/excludes_gen11_lkf.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (C) 2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" - -HWTEST_EXCLUDE_PRODUCT(AubCenterTests, whenCreatingAubManagerThenCorrectProductFamilyIsPassed, IGFX_LAKEFIELD); diff --git a/shared/test/unit_test/gen11/lkf/linux/CMakeLists.txt b/shared/test/unit_test/gen11/lkf/linux/CMakeLists.txt deleted file mode 100644 index 2f6bc9b4d2..0000000000 --- a/shared/test/unit_test/gen11/lkf/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_lkf.cpp - ) -endif() diff --git a/shared/test/unit_test/gen11/lkf/linux/product_helper_tests_lkf.cpp b/shared/test/unit_test/gen11/lkf/linux/product_helper_tests_lkf.cpp deleted file mode 100644 index 319e3dc291..0000000000 --- a/shared/test/unit_test/gen11/lkf/linux/product_helper_tests_lkf.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -template -class LkfHwInfoTests : public ::testing::Test {}; -using lkfTestTypes = ::testing::Types; -TYPED_TEST_SUITE(LkfHwInfoTests, lkfTestTypes); -TYPED_TEST(LkfHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo = *defaultHwInfo; - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp b/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp deleted file mode 100644 index c8731950f1..0000000000 --- a/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "platforms.h" - -using namespace NEO; - -using LkfProductHelper = ProductHelperTest; - -LKFTEST_F(LkfProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -LKFTEST_F(LkfProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - - uint64_t config = 0x100080008; - hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); - EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); -} - -LKFTEST_F(LkfProductHelper, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - bool boolValue[]{ - true, false}; - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - FeatureTable &featureTable = pInHwInfo.featureTable; - WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; - - uint64_t config = 0x100080008; - - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrStandardMipTailFormat); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - } -} - -LKFTEST_F(LkfProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::LKF); -} - -LKFTEST_F(LkfProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -LKFTEST_F(LkfProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen11/preamble_tests_gen11.cpp b/shared/test/unit_test/gen11/preamble_tests_gen11.cpp deleted file mode 100644 index 6536e2aa8e..0000000000 --- a/shared/test/unit_test/gen11/preamble_tests_gen11.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/source_level_debugger/source_level_debugger_preamble_test.h" - -#include "gtest/gtest.h" - -using namespace NEO; -typedef Gen11Family GfxFamily; - -#include "shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl" - -using PreambleTestGen11 = ::testing::Test; - -GEN11TEST_F(PreambleTestGen11, givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN11TEST_F(PreambleTestGen11, givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAndStateSipAreInlcuded) { - SourceLevelDebuggerPreambleTest::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThenCorrectSizeIsInlcudedTest(); -} diff --git a/shared/test/unit_test/gen11/sampler_tests_gen11.cpp b/shared/test/unit_test/gen11/sampler_tests_gen11.cpp deleted file mode 100644 index c1eb44841b..0000000000 --- a/shared/test/unit_test/gen11/sampler_tests_gen11.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include - -using namespace NEO; - -using Gen11SamplerTest = ::testing::Test; - -GEN11TEST_F(Gen11SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) { - using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE; - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - auto &productHelper = rootDeviceEnvironment.getHelper(); - auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState; - auto stateWithAppendedParams = FamilyType::cmdInitSamplerState; - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); - productHelper.adjustSamplerState(&stateWithAppendedParams, *defaultHwInfo); - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); -} diff --git a/shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp b/shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp deleted file mode 100644 index 0bc0e14e43..0000000000 --- a/shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/helpers/simd_helper_tests.inl" - -using namespace NEO; - -using TestSimdConfigSet = ::testing::Test; - -GEN11TEST_F(TestSimdConfigSet, GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturnedGen11) { - GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturned::testBodyImpl(); -} \ No newline at end of file diff --git a/shared/test/unit_test/gen11/tbx_command_stream_receiver_tests_gen11.cpp b/shared/test/unit_test/gen11/tbx_command_stream_receiver_tests_gen11.cpp deleted file mode 100644 index 9b21ef07c5..0000000000 --- a/shared/test/unit_test/gen11/tbx_command_stream_receiver_tests_gen11.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen11TbxCommandStreamReceiverTests = Test; - -GEN11TEST_F(Gen11TbxCommandStreamReceiverTests, whenAskedForPollForCompletionParametersThenReturnCorrectValues) { - class MyMockTbxHw : public TbxCommandStreamReceiverHw { - public: - MyMockTbxHw(ExecutionEnvironment &executionEnvironment) - : TbxCommandStreamReceiverHw(executionEnvironment, 0, 1) {} - using TbxCommandStreamReceiverHw::getpollNotEqualValueForPollForCompletion; - using TbxCommandStreamReceiverHw::getMaskAndValueForPollForCompletion; - }; - - MyMockTbxHw myMockTbxHw(*pDevice->executionEnvironment); - EXPECT_EQ(0x80u, myMockTbxHw.getMaskAndValueForPollForCompletion()); - EXPECT_TRUE(myMockTbxHw.getpollNotEqualValueForPollForCompletion()); -} diff --git a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp b/shared/test/unit_test/gen11/test_device_caps_gen11.cpp deleted file mode 100644 index e65e59781b..0000000000 --- a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen11DeviceCaps = Test; - -GEN11TEST_F(Gen11DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReturned) { - EXPECT_TRUE(PreemptionMode::MidThread == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); -} - -GEN11TEST_F(Gen11DeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { - const auto &caps = pDevice->getDeviceInfo(); - EXPECT_EQ(83u, caps.outProfilingTimerResolution); -} - -GEN11TEST_F(Gen11DeviceCaps, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -GEN11TEST_F(Gen11DeviceCaps, WhenCheckingCompressionThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedImages); -} - -GEN11TEST_F(Gen11DeviceCaps, givenHwInfoWhenRequestedComputeUnitsUsedForScratchThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - auto &gfxCoreHelper = getHelper(); - uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice * 8; - - EXPECT_EQ(expectedValue, gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment())); - EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch); -} - -GEN11TEST_F(Gen11DeviceCaps, givenHwInfoWhenRequestedMaxFrontEndThreadsThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - - EXPECT_EQ(GfxCoreHelper::getMaxThreadsForVfe(hwInfo), pDevice->getDeviceInfo().maxFrontEndThreads); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckSupportCacheFlushAfterWalkerThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckBlitterOperationsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingImageSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsImages); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingMediaBlockSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsMediaBlock); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingCoherencySupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsCoherency); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingFloatAtomicsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsFloatAtomics); -} - -GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingCxlTypeThenReturnZero) { - EXPECT_EQ(0u, pDevice->getHardwareInfo().capabilityTable.cxlType); -} diff --git a/shared/test/unit_test/gen11/test_encode_math_gen11.cpp b/shared/test/unit_test/gen11/test_encode_math_gen11.cpp deleted file mode 100644 index 8394d53204..0000000000 --- a/shared/test/unit_test/gen11/test_encode_math_gen11.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/register_offsets.h" -#include "shared/source/indirect_heap/heap_size.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using CommandEncoderMathTestGen11 = Test; - -GEN11TEST_F(CommandEncoderMathTestGen11, WhenAppendsAGreaterThanThenPredicateCorrectlySet) { - using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM; - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - using MI_LOAD_REGISTER_REG = typename FamilyType::MI_LOAD_REGISTER_REG; - using MI_MATH = typename FamilyType::MI_MATH; - using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; - - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - - EncodeMathMMIO::encodeGreaterThanPredicate(cmdContainer, 0xDEADBEEFCAF0u, 17u, false); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - auto itor = commands.begin(); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMEM = genCmdCast(*itor); - EXPECT_EQ(cmdMEM->getRegisterAddress(), RegisterOffsets::csGprR0); - EXPECT_EQ(cmdMEM->getMemoryAddress(), 0xDEADBEEFCAF0u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdIMM = genCmdCast(*itor); - EXPECT_EQ(cmdIMM->getRegisterOffset(), RegisterOffsets::csGprR1); - EXPECT_EQ(cmdIMM->getDataDword(), 17u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMATH = genCmdCast(*itor); - EXPECT_EQ(cmdMATH->DW0.BitField.DwordLength, 3u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdREG = genCmdCast(*itor); - EXPECT_EQ(cmdREG->getSourceRegisterAddress(), RegisterOffsets::csGprR2); - EXPECT_EQ(cmdREG->getDestinationRegisterAddress(), RegisterOffsets::csPredicateResult); - - auto cmdALU = reinterpret_cast(cmdMATH + 3); - EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::opcodeSub)); -} diff --git a/shared/test/unit_test/gen11/test_preamble_gen11.cpp b/shared/test/unit_test/gen11/test_preamble_gen11.cpp deleted file mode 100644 index 60e6231f55..0000000000 --- a/shared/test/unit_test/gen11/test_preamble_gen11.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2019-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/command_stream/stream_properties.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/fixtures/preamble_fixture.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using namespace NEO; - -typedef PreambleFixture IclSlm; - -GEN11TEST_F(IclSlm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueAreProgrammed) { - typedef Gen11Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - LinearStream &cs = linearStream; - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - PreambleHelper::programL3(&cs, l3Config, false); - - parseCommands(cs); - - auto itorLRI = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorLRI); - - const auto &lri = *reinterpret_cast(*itorLRI); - auto registerOffset = L3CNTLRegisterOffset::registerOffset; - EXPECT_EQ(registerOffset, lri.getRegisterOffset()); - EXPECT_EQ(0u, lri.getDataDword() & 1); -} - -GEN11TEST_F(IclSlm, givenGen11WhenProgramingL3ThenErrorDetectionBehaviorControlBitSet) { - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - - uint32_t errorDetectionBehaviorControlBit = 1 << 9; - - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); -} - -typedef PreambleFixture Gen11UrbEntryAllocationSize; -GEN11TEST_F(Gen11UrbEntryAllocationSize, WhenPreambleRetrievesUrbEntryAllocationSizeThenValueIsCorrect) { - uint32_t actualVal = PreambleHelper::getUrbEntryAllocationSize(); - EXPECT_EQ(0x782u, actualVal); -} - -typedef PreambleVfeState Gen11PreambleVfeState; -GEN11TEST_F(Gen11PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsCorrect) { - typedef typename Gen11Family::PIPE_CONTROL PIPE_CONTROL; - testWaTable->flags.waSendMIFLUSHBeforeVFE = 0; - LinearStream &cs = linearStream; - auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::renderCompute); - StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); - - parseCommands(cs); - - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - const auto &pc = *reinterpret_cast(*itorPC); - EXPECT_FALSE(pc.getRenderTargetCacheFlushEnable()); - EXPECT_FALSE(pc.getDepthCacheFlushEnable()); - EXPECT_FALSE(pc.getDcFlushEnable()); - EXPECT_EQ(1u, pc.getCommandStreamerStallEnable()); -} - -GEN11TEST_F(Gen11PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCorrect) { - typedef typename Gen11Family::PIPE_CONTROL PIPE_CONTROL; - testWaTable->flags.waSendMIFLUSHBeforeVFE = 1; - LinearStream &cs = linearStream; - auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::renderCompute); - StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); - - parseCommands(cs); - - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - const auto &pc = *reinterpret_cast(*itorPC); - EXPECT_TRUE(pc.getRenderTargetCacheFlushEnable()); - EXPECT_TRUE(pc.getDepthCacheFlushEnable()); - EXPECT_TRUE(pc.getDcFlushEnable()); - EXPECT_EQ(1u, pc.getCommandStreamerStallEnable()); -} - -typedef PreambleFixture PreemptionWatermarkGen11; -GEN11TEST_F(PreemptionWatermarkGen11, WhenPreambleIsCreatedThenWorkAroundsIsNotProgrammed) { - PreambleHelper::programGenSpecificPreambleWorkArounds(&linearStream, *defaultHwInfo); - - parseCommands(linearStream); - - auto cmd = findMmioCmd(cmdList.begin(), cmdList.end(), FfSliceCsChknReg2::address); - ASSERT_EQ(nullptr, cmd); - - MockDevice mockDevice; - size_t expectedSize = PreemptionHelper::getRequiredPreambleSize(mockDevice); - EXPECT_EQ(expectedSize, PreambleHelper::getAdditionalCommandsSize(mockDevice)); - - mockDevice.executionEnvironment->rootDeviceEnvironments[0]->initDebuggerL0(&mockDevice); - expectedSize += PreambleHelper::getKernelDebuggingCommandsSize(mockDevice.getDebugger() != nullptr); - EXPECT_EQ(expectedSize, PreambleHelper::getAdditionalCommandsSize(mockDevice)); -} - -typedef PreambleFixture ThreadArbitrationGen11; -GEN11TEST_F(ThreadArbitrationGen11, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsNotSet) { - DebugManagerStateRestore dbgRestore; - debugManager.flags.ForcePreemptionMode.set(static_cast(PreemptionMode::Disabled)); - typedef Gen11Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef Gen11Family::PIPE_CONTROL PIPE_CONTROL; - LinearStream &cs = linearStream; - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - MockDevice mockDevice; - PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, nullptr, false); - - parseCommands(cs); - - auto ppC = find(cmdList.begin(), cmdList.end()); - ASSERT_EQ(cmdList.end(), ppC); - - auto cmd = findMmioCmd(cmdList.begin(), cmdList.end(), RowChickenReg4::address); - ASSERT_EQ(nullptr, cmd); - - MockDevice device; - EXPECT_EQ(0u, PreambleHelper::getAdditionalCommandsSize(device)); -} - -GEN11TEST_F(ThreadArbitrationGen11, whenThreadArbitrationPolicyIsProgrammedThenCorrectValuesAreSet) { - DebugManagerStateRestore dbgRestore; - debugManager.flags.ForcePreemptionMode.set(static_cast(PreemptionMode::Disabled)); - typedef Gen11Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef Gen11Family::PIPE_CONTROL PIPE_CONTROL; - LinearStream &cs = linearStream; - MockDevice mockDevice; - StreamProperties streamProperties{}; - streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment()); - - parseCommands(cs); - - auto ppC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(ppC, cmdList.end()); - - auto cmd = findMmioCmd(cmdList.begin(), cmdList.end(), RowChickenReg4::address); - ASSERT_NE(nullptr, cmd); - - EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[ThreadArbitrationPolicy::RoundRobin], cmd->getDataDword()); - - MockDevice device; - EXPECT_EQ(0u, PreambleHelper::getAdditionalCommandsSize(device)); -} - -GEN11TEST_F(ThreadArbitrationGen11, GivenDefaultWhenProgrammingPreambleThenArbitrationPolicyIsRoundRobin) { - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(ThreadArbitrationPolicy::RoundRobinAfterDependency, gfxCoreHelper.getDefaultThreadArbitrationPolicy()); -} - -GEN11TEST_F(ThreadArbitrationGen11, whenGetSupportThreadArbitrationPoliciesIsCalledThenAllPoliciesAreReturned) { - auto supportedPolicies = PreambleHelper::getSupportedThreadArbitrationPolicies(); - - EXPECT_EQ(3u, supportedPolicies.size()); - EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(), - supportedPolicies.end(), - ThreadArbitrationPolicy::AgeBased)); - EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(), - supportedPolicies.end(), - ThreadArbitrationPolicy::RoundRobin)); - EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(), - supportedPolicies.end(), - ThreadArbitrationPolicy::RoundRobinAfterDependency)); -} - -using Gen11PreamblePipelineSelect = PreambleFixture; -GEN11TEST_F(Gen11PreamblePipelineSelect, WhenPreambleRetrievesPipelineSelectSizeThenValueIsCorrect) { - using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; - size_t actualVal = PreambleHelper::getCmdSizeForPipelineSelect(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(sizeof(PIPELINE_SELECT), actualVal); -} diff --git a/shared/test/unit_test/gen11/test_preemption_gen11.cpp b/shared/test/unit_test/gen11/test_preemption_gen11.cpp deleted file mode 100644 index 38c0b49066..0000000000 --- a/shared/test/unit_test/gen11/test_preemption_gen11.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/built_ins/sip.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/gen11/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/fixtures/preemption_fixture.h" - -#include "patch_shared.h" - -using namespace NEO; - -template <> -PreemptionTestHwDetails getPreemptionTestHwDetails() { - PreemptionTestHwDetails ret; - ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); - ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); - ret.modeToRegValueMap[PreemptionMode::MidThread] = DwordBuilder::build(2, true, false) | DwordBuilder::build(1, true, false); - ret.defaultRegValue = ret.modeToRegValueMap[PreemptionMode::MidBatch]; - ret.regAddress = 0x2580u; - return ret; -} - -using Gen11PreemptionTests = DevicePreemptionTests; - -GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNotProgramStateSip) { - device->setPreemptionMode(PreemptionMode::ThreadGroup); - - size_t requiredSize = PreemptionHelper::getRequiredPreambleSize(*device); - EXPECT_EQ(0U, requiredSize); - - LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::getRequiredStateSipCmdSize(*device, false); - EXPECT_EQ(0U, cmdStream.getUsed()); -} - -GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIsProgrammed) { - using STATE_SIP = typename FamilyType::STATE_SIP; - - device->setPreemptionMode(PreemptionMode::MidThread); - executionEnvironment->DisableMidThreadPreemption = 0; - - size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize(*device, false); - size_t expectedPreambleSize = sizeof(STATE_SIP); - EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize); - - StackVec streamStorage(requiredCmdStreamSize); - ASSERT_LE(requiredCmdStreamSize, streamStorage.size()); - - LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr); - - HardwareParse hwParsePreamble; - hwParsePreamble.parseCommands(cmdStream); - - auto stateSipCmd = hwParsePreamble.getCommand(); - ASSERT_NE(nullptr, stateSipCmd); - EXPECT_EQ(SipKernel::getSipKernel(*device, nullptr).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer()); -} - -GEN11TEST_F(Gen11PreemptionTests, WhenGettingPreemptionWaCsSizeThenZeroIsReturned) { - size_t expectedSize = 0; - EXPECT_EQ(expectedSize, PreemptionHelper::getPreemptionWaCsSize(*device)); -} - -GEN11TEST_F(Gen11PreemptionTests, WhenApplyingPreemptionWaCmdsThenNothingIsAdded) { - size_t usedSize = 0; - StackVec streamStorage(1024); - LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; - - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdStream, *device); - EXPECT_EQ(usedSize, cmdStream.getUsed()); - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdStream, *device); - EXPECT_EQ(usedSize, cmdStream.getUsed()); -} - -GEN11TEST_F(Gen11PreemptionTests, givenInterfaceDescriptorDataWhenMidThreadPreemptionModeThenSetDisableThreadPreemptionBitToDisable) { - using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; - - INTERFACE_DESCRIPTOR_DATA iddArg; - iddArg = FamilyType::cmdInitInterfaceDescriptorData; - - iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidThread); - EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE, iddArg.getThreadPreemptionDisable()); -} - -GEN11TEST_F(Gen11PreemptionTests, givenInterfaceDescriptorDataWhenNoMidThreadPreemptionModeThenSetDisableThreadPreemptionBitToEnable) { - using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; - - INTERFACE_DESCRIPTOR_DATA iddArg; - iddArg = FamilyType::cmdInitInterfaceDescriptorData; - - iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::Disabled); - EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable()); - - iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidBatch); - EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable()); - - iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::ThreadGroup); - EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable()); -} diff --git a/shared/test/unit_test/gen11/test_sample_gen11.cpp b/shared/test/unit_test/gen11/test_sample_gen11.cpp deleted file mode 100644 index 68cd968ce2..0000000000 --- a/shared/test/unit_test/gen11/test_sample_gen11.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen11OnlyTest = ::testing::Test; - -GEN11TEST_F(Gen11OnlyTest, WhenGettingRenderCoreFamilyThenGen11CoreIsReturned) { - EXPECT_EQ(IGFX_GEN11_CORE, defaultHwInfo->platform.eRenderCoreFamily); -} diff --git a/shared/test/unit_test/gen11/windows/CMakeLists.txt b/shared/test/unit_test/gen11/windows/CMakeLists.txt deleted file mode 100644 index 6cf614be4c..0000000000 --- a/shared/test/unit_test/gen11/windows/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (C) 2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(WIN32) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/gmm_callbacks_tests_gen11.cpp - ) - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen11/windows/gmm_callbacks_tests_gen11.cpp b/shared/test/unit_test/gen11/windows/gmm_callbacks_tests_gen11.cpp deleted file mode 100644 index 2602d02cdf..0000000000 --- a/shared/test/unit_test/gen11/windows/gmm_callbacks_tests_gen11.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2019-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -typedef ::testing::Test Gen11GmmCallbacksTests; - -GEN11TEST_F(Gen11GmmCallbacksTests, GivenDefaultWhenNotifyingAubCaptureThenDeviceCallbackIsNotSupported) { - EXPECT_EQ(0, DeviceCallbacks::notifyAubCapture(nullptr, 0, 0, false)); -} - -GEN11TEST_F(Gen11GmmCallbacksTests, GivenDefaultWhenWritingL3AddressThenTtCallbackIsNotSupported) { - EXPECT_EQ(0, TTCallbacks::writeL3Address(nullptr, 1, 2)); -} diff --git a/shared/test/unit_test/gen8/CMakeLists.txt b/shared/test/unit_test/gen8/CMakeLists.txt deleted file mode 100644 index 64b219b5a9..0000000000 --- a/shared/test/unit_test/gen8/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (C) 2021-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen8.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen8/bdw/CMakeLists.txt b/shared/test/unit_test/gen8/bdw/CMakeLists.txt deleted file mode 100644 index 5fbdef7dab..0000000000 --- a/shared/test/unit_test/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2021-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_bdw.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen8/bdw/linux/CMakeLists.txt b/shared/test/unit_test/gen8/bdw/linux/CMakeLists.txt deleted file mode 100644 index ade850e8ef..0000000000 --- a/shared/test/unit_test/gen8/bdw/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_bdw.cpp - ) -endif() diff --git a/shared/test/unit_test/gen8/bdw/linux/product_helper_tests_bdw.cpp b/shared/test/unit_test/gen8/bdw/linux/product_helper_tests_bdw.cpp deleted file mode 100644 index 4def9e19cc..0000000000 --- a/shared/test/unit_test/gen8/bdw/linux/product_helper_tests_bdw.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -template -class BdwHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types bdwTestTypes; -TYPED_TEST_SUITE(BdwHwInfoTests, bdwTestTypes); -TYPED_TEST(BdwHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp b/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp deleted file mode 100644 index e0f6f21782..0000000000 --- a/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; -using BdwProductHelper = ProductHelperTest; - -BDWTEST_F(BdwProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100030008, - 0x200030008, - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - FeatureTable &featureTable = pInHwInfo.featureTable; - WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(setParamBool, workaroundTable.flags.waUseVAlign16OnTileXYBpp816); - EXPECT_EQ(setParamBool, workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - } - } -} - -BDWTEST_F(BdwProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - - uint64_t config = 0x0; - hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); - EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); - EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); -} - -BDWTEST_F(BdwProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::BDW); -} - -BDWTEST_F(BdwProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -BDWTEST_F(BdwProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Bdw, productHelper->getAubStreamProductFamily()); -} - -BDWTEST_F(BdwProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_FALSE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_FALSE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} - -using CompilerProductHelperHelperTestsBdw = ::testing::Test; -BDWTEST_F(CompilerProductHelperHelperTestsBdw, givenBdwWhenIsStatelessToStatefulBufferOffsetSupportedIsCalledThenReturnsTrue) { - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &compilerProductHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper(); - EXPECT_FALSE(compilerProductHelper.isStatelessToStatefulBufferOffsetSupported()); -} diff --git a/shared/test/unit_test/gen8/command_encoder_tests_gen8.cpp b/shared/test/unit_test/gen8/command_encoder_tests_gen8.cpp deleted file mode 100644 index 4004f5b377..0000000000 --- a/shared/test/unit_test/gen8/command_encoder_tests_gen8.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/blit_commands_helper.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen8CommandEncodeTest = testing::Test; -GEN8TEST_F(Gen8CommandEncodeTest, givenGen8PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) { - EXPECT_TRUE(EncodeSurfaceState::doBindingTablePrefetch()); -} - -GEN8TEST_F(Gen8CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) { - EXPECT_FALSE(BlitCommandsHelper::miArbCheckWaRequired()); -} - -GEN8TEST_F(Gen8CommandEncodeTest, givenSurfaceStateWhenAuxParamsForMCSCCSAreSetThenAuxModeStaysTheSame) { - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - MockDevice device; - auto releaseHelper = device.getReleaseHelper(); - - auto originalAuxMode = surfaceState.getAuxiliarySurfaceMode(); - - EncodeSurfaceState::setAuxParamsForMCSCCS(&surfaceState, releaseHelper); - - EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), originalAuxMode); -} diff --git a/shared/test/unit_test/gen8/gfx_core_helper_tests_gen8.cpp b/shared/test/unit_test/gen8/gfx_core_helper_tests_gen8.cpp deleted file mode 100644 index c8348a4633..0000000000 --- a/shared/test/unit_test/gen8/gfx_core_helper_tests_gen8.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/constants.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using GfxCoreHelperTestGen8 = GfxCoreHelperTest; - -GEN8TEST_F(GfxCoreHelperTestGen8, WhenGettingMaxBarriersPerSliceThenCorrectSizeIsReturned) { - auto &helper = getHelper(); - - EXPECT_EQ(16u, helper.getMaxBarrierRegisterPerSlice()); -} - -GEN8TEST_F(GfxCoreHelperTestGen8, WhenGettingPitchAlignmentForImageThenCorrectValueIsReturned) { - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(4u, gfxCoreHelper.getPitchAlignmentForImage(pDevice->getRootDeviceEnvironment())); -} - -GEN8TEST_F(GfxCoreHelperTestGen8, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) { - auto engineType = hardwareInfo.capabilityTable.defaultEngineType; - auto &gfxCoreHelper = getHelper(); - auto &productHelper = getHelper(); - gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr); - EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType); -} - -GEN8TEST_F(GfxCoreHelperTestGen8, whenGetGpgpuEnginesThenReturnThreeEngines) { - auto &gfxCoreHelper = getHelper(); - auto gpgpuEngines = gfxCoreHelper.getGpgpuEngineInstances(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(3u, gpgpuEngines.size()); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[0].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[1].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[2].first); - EXPECT_EQ(3u, pDevice->allEngines.size()); -} - -using MemorySynchronizatiopCommandsTestsGen8 = ::testing::Test; -GEN8TEST_F(MemorySynchronizatiopCommandsTestsGen8, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) { - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - std::unique_ptr buffer(new uint8_t[128]); - MockExecutionEnvironment mockExecutionEnvironment{}; - LinearStream stream(buffer.get(), 128); - MemorySynchronizationCommands::addFullCacheFlush(stream, *mockExecutionEnvironment.rootDeviceEnvironments[0]); - PIPE_CONTROL *pipeControl = genCmdCast(buffer.get()); - ASSERT_NE(nullptr, pipeControl); - EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable()); -} - -using CompilerProductHelperTestGen8 = Test; -GEN8TEST_F(CompilerProductHelperTestGen8, givenHwInfosWhenIsMatrixMultiplyAccumulateSupportedThenReturnFalse) { - auto &compilerProductHelper = getHelper(); - auto releaseHelper = this->pDevice->getReleaseHelper(); - EXPECT_FALSE(compilerProductHelper.isMatrixMultiplyAccumulateSupported(releaseHelper)); -} diff --git a/shared/test/unit_test/gen8/image_surface_state_tests_gen8.cpp b/shared/test/unit_test/gen8/image_surface_state_tests_gen8.cpp deleted file mode 100644 index 48cceac7c6..0000000000 --- a/shared/test/unit_test/gen8/image_surface_state_tests_gen8.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/image/image_surface_state_fixture.h" - -using namespace NEO; - -using ImageSurfaceStateTestsGen8 = ImageSurfaceStateTests; - -GEN8TEST_F(ImageSurfaceStateTestsGen8, givenGmmWithMediaCompressedWhenSetFlagsForMediaCompressionThenAuxiliarySurfaceNoneIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - castSurfaceState->setAuxiliarySurfaceMode(FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = false; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = true; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); -} - -GEN8TEST_F(ImageSurfaceStateTestsGen8, givenGmmWithMediaCompressedWhenSetMipTailStartLodThenMipTailStartLodIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - - setMipTailStartLod(castSurfaceState, nullptr); -} diff --git a/shared/test/unit_test/gen8/sampler_tests_gen8.cpp b/shared/test/unit_test/gen8/sampler_tests_gen8.cpp deleted file mode 100644 index b0292f18cf..0000000000 --- a/shared/test/unit_test/gen8/sampler_tests_gen8.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include - -using namespace NEO; - -using Gen8SamplerTest = ::testing::Test; - -GEN8TEST_F(Gen8SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) { - - using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE; - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - auto &productHelper = rootDeviceEnvironment.getHelper(); - - auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState; - auto stateWithAppendedParams = FamilyType::cmdInitSamplerState; - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); - productHelper.adjustSamplerState(&stateWithAppendedParams, *defaultHwInfo); - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); -} diff --git a/shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp b/shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp deleted file mode 100644 index 45ac773836..0000000000 --- a/shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/helpers/simd_helper_tests.inl" - -using namespace NEO; - -using TestSimdConfigSet = ::testing::Test; - -GEN8TEST_F(TestSimdConfigSet, GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturnedGen8) { - GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturned::testBodyImpl(); -} diff --git a/shared/test/unit_test/gen8/state_base_address_tests_gen8.cpp b/shared/test/unit_test/gen8/state_base_address_tests_gen8.cpp deleted file mode 100644 index 692515f46d..0000000000 --- a/shared/test/unit_test/gen8/state_base_address_tests_gen8.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/memory_compression_state.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/state_base_address_tests.h" - -BDWTEST_F(SbaTest, givenUsedBindlessBuffersWhenAppendStateBaseAddressParametersIsCalledThenSBACmdHasNotBindingSurfaceStateProgrammed) { - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - debugManager.flags.UseBindlessMode.set(1); - - STATE_BASE_ADDRESS stateBaseAddress = {}; - STATE_BASE_ADDRESS stateBaseAddressReference = {}; - - StateBaseAddressHelperArgs args = createSbaHelperArgs(&stateBaseAddress, nullptr, &ssh, nullptr, nullptr); - - StateBaseAddressHelper::appendStateBaseAddressParameters(args); - - EXPECT_EQ(0u, ssh.getUsed()); - EXPECT_EQ(0, memcmp(&stateBaseAddressReference, &stateBaseAddress, sizeof(STATE_BASE_ADDRESS))); -} - -BDWTEST_F(SbaTest, - givenUsedBindlessBuffersAndOverridenSurfaceStateBaseAddressWhenAppendStateBaseAddressParametersIsCalledThenSbaCmdHasCorrectSurfaceStateBaseAddress) { - using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS; - - constexpr uint64_t surfaceStateBaseAddress = 0xBADA550000; - - STATE_BASE_ADDRESS stateBaseAddressCmd = {}; - - StateBaseAddressHelperArgs args = createSbaHelperArgs(&stateBaseAddressCmd, nullptr, &ssh, nullptr, nullptr); - args.surfaceStateBaseAddress = surfaceStateBaseAddress; - args.overrideSurfaceStateBaseAddress = true; - - StateBaseAddressHelper::programStateBaseAddress(args); - - EXPECT_TRUE(stateBaseAddressCmd.getSurfaceStateBaseAddressModifyEnable()); - EXPECT_EQ(surfaceStateBaseAddress, stateBaseAddressCmd.getSurfaceStateBaseAddress()); -} diff --git a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp b/shared/test/unit_test/gen8/test_device_caps_gen8.cpp deleted file mode 100644 index 8ec91e9852..0000000000 --- a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen8DeviceCaps = Test; - -GEN8TEST_F(Gen8DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenDisabledIsReported) { - EXPECT_TRUE(PreemptionMode::Disabled == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); -} - -GEN8TEST_F(Gen8DeviceCaps, BdwProfilingTimerResolution) { - const auto &caps = pDevice->getDeviceInfo(); - EXPECT_EQ(80u, caps.outProfilingTimerResolution); -} - -GEN8TEST_F(Gen8DeviceCaps, givenHwInfoWhenRequestedComputeUnitsUsedForScratchThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - auto &gfxCoreHelper = getHelper(); - - uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice * - hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount; - - EXPECT_EQ(expectedValue, gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment())); - EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch); -} - -GEN8TEST_F(Gen8DeviceCaps, givenHwInfoWhenRequestedMaxFrontEndThreadsThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - - EXPECT_EQ(GfxCoreHelper::getMaxThreadsForVfe(hwInfo), pDevice->getDeviceInfo().maxFrontEndThreads); -} - -GEN8TEST_F(Gen8DeviceCaps, GivenBdwWhenCheckftr64KBpagesThenFalse) { - EXPECT_FALSE(defaultHwInfo->capabilityTable.ftr64KBpages); -} - -GEN8TEST_F(Gen8DeviceCaps, GivenDefaultSettingsWhenCheckingPreemptionModeThenPreemptionIsDisabled) { - EXPECT_TRUE(PreemptionMode::Disabled == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); -} - -GEN8TEST_F(Gen8DeviceCaps, WhenCheckingKmdNotifyMechanismThenPropertiesAreSetCorrectly) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -GEN8TEST_F(Gen8DeviceCaps, WhenCheckingCompressionThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedImages); -} - -GEN8TEST_F(Gen8DeviceCaps, WhenCheckingImage3dDimensionsThenCapsAreSetCorrectly) { - const auto &sharedCaps = pDevice->getDeviceInfo(); - EXPECT_EQ(2048u, sharedCaps.image3DMaxDepth); -} - -GEN8TEST_F(Gen8DeviceCaps, givenHwInfoWhenSlmSizeIsRequiredThenReturnCorrectValue) { - EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckSupportCacheFlushAfterWalkerThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckBlitterOperationsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingImageSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsImages); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingMediaBlockSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsMediaBlock); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingDeviceEnqueueSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsDeviceEnqueue); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingFloatAtomicsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsFloatAtomics); -} - -GEN8TEST_F(Gen8DeviceCaps, givenGen8WhenCheckingCxlTypeThenReturnZero) { - EXPECT_EQ(0u, pDevice->getHardwareInfo().capabilityTable.cxlType); -} diff --git a/shared/test/unit_test/gen8/test_encode_math_gen8.cpp b/shared/test/unit_test/gen8/test_encode_math_gen8.cpp deleted file mode 100644 index 6101a15db3..0000000000 --- a/shared/test/unit_test/gen8/test_encode_math_gen8.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/register_offsets.h" -#include "shared/source/indirect_heap/heap_size.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using CommandEncoderMathTestGen8 = Test; - -GEN8TEST_F(CommandEncoderMathTestGen8, WhenAppendsAGreaterThanThenPredicateCorrectlySet) { - using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM; - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - using MI_LOAD_REGISTER_REG = typename FamilyType::MI_LOAD_REGISTER_REG; - using MI_MATH = typename FamilyType::MI_MATH; - using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; - - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - - EncodeMathMMIO::encodeGreaterThanPredicate(cmdContainer, 0xDEADBEEFCAF0u, 17u, false); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - auto itor = commands.begin(); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMEM = genCmdCast(*itor); - EXPECT_EQ(cmdMEM->getRegisterAddress(), RegisterOffsets::csGprR0); - EXPECT_EQ(cmdMEM->getMemoryAddress(), 0xDEADBEEFCAF0u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdIMM = genCmdCast(*itor); - EXPECT_EQ(cmdIMM->getRegisterOffset(), RegisterOffsets::csGprR1); - EXPECT_EQ(cmdIMM->getDataDword(), 17u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMATH = genCmdCast(*itor); - EXPECT_EQ(cmdMATH->DW0.BitField.DwordLength, 3u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdREG = genCmdCast(*itor); - EXPECT_EQ(cmdREG->getSourceRegisterAddress(), RegisterOffsets::csGprR2); - EXPECT_EQ(cmdREG->getDestinationRegisterAddress(), RegisterOffsets::csPredicateResult); - - auto cmdALU = reinterpret_cast(cmdMATH + 3); - EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::opcodeSub)); -} diff --git a/shared/test/unit_test/gen8/test_preamble_gen8.cpp b/shared/test/unit_test/gen8/test_preamble_gen8.cpp deleted file mode 100644 index 348a6c6fad..0000000000 --- a/shared/test/unit_test/gen8/test_preamble_gen8.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_stream/stream_properties.h" -#include "shared/source/command_stream/thread_arbitration_policy.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/gen8/reg_configs.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/preamble.h" -#include "shared/test/common/fixtures/preamble_fixture.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using namespace NEO; - -typedef PreambleFixture BdwSlm; - -BDWTEST_F(BdwSlm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueAreProgrammed) { - typedef Gen8Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - LinearStream &cs = linearStream; - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - PreambleHelper::programL3(&cs, l3Config, false); - - parseCommands(cs); - - auto itorLRI = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorLRI); - - const auto &lri = *reinterpret_cast(*itorLRI); - auto registerOffset = L3CNTLRegisterOffset::registerOffset; - EXPECT_EQ(registerOffset, lri.getRegisterOffset()); - EXPECT_EQ(1u, lri.getDataDword() & 1); -} - -typedef PreambleFixture Gen8L3Config; - -BDWTEST_F(Gen8L3Config, GivenNoSlmWhenProgrammingL3ThenProgrammingIsCorrect) { - bool slmUsed = false; - uint32_t l3Config = 0; - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x80000340u, l3Config); - - uint32_t errorDetectionBehaviorControlBit = 1 << 9; - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); -} - -BDWTEST_F(Gen8L3Config, GivenlmWhenProgrammingL3ThenProgrammingIsCorrect) { - bool slmUsed = true; - uint32_t l3Config = 0; - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x60000321u, l3Config); - - uint32_t errorDetectionBehaviorControlBit = 1 << 9; - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); -} - -typedef PreambleFixture ThreadArbitrationGen8; -BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenDoNothing) { - typedef Gen8Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - LinearStream &cs = linearStream; - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - StreamProperties streamProperties{}; - streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, rootDeviceEnvironment); - - EXPECT_EQ(0u, cs.getUsed()); - - MockDevice device; - EXPECT_EQ(0u, PreambleHelper::getAdditionalCommandsSize(device)); - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(ThreadArbitrationPolicy::AgeBased, gfxCoreHelper.getDefaultThreadArbitrationPolicy()); -} - -BDWTEST_F(ThreadArbitrationGen8, whenGetSupportThreadArbitrationPoliciesIsCalledThenEmptyVectorIsReturned) { - auto supportedPolicies = PreambleHelper::getSupportedThreadArbitrationPolicies(); - - EXPECT_EQ(0u, supportedPolicies.size()); -} - -typedef PreambleFixture Gen8UrbEntryAllocationSize; -BDWTEST_F(Gen8UrbEntryAllocationSize, WhenPreambleIsCreatedThenUrbEntryAllocationSizeIsCorrect) { - uint32_t actualVal = PreambleHelper::getUrbEntryAllocationSize(); - EXPECT_EQ(0x782u, actualVal); -} - -BDWTEST_F(PreambleVfeState, WhenProgrammingVfeStateThenProgrammingIsCorrect) { - typedef Gen8Family::PIPE_CONTROL PIPE_CONTROL; - - LinearStream &cs = linearStream; - auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::renderCompute); - StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); - - parseCommands(cs); - - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - const auto &pc = *reinterpret_cast(*itorPC); - EXPECT_TRUE(pc.getDcFlushEnable()); - EXPECT_EQ(1u, pc.getCommandStreamerStallEnable()); -} - -using Gen8PreamblePipelineSelect = PreambleFixture; -BDWTEST_F(Gen8PreamblePipelineSelect, WhenPreambleRetrievesPipelineSelectSizeThenValueIsCorrect) { - using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; - size_t actualVal = PreambleHelper::getCmdSizeForPipelineSelect(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(sizeof(PIPELINE_SELECT), actualVal); -} diff --git a/shared/test/unit_test/gen8/test_preemption_gen8.cpp b/shared/test/unit_test/gen8/test_preemption_gen8.cpp deleted file mode 100644 index 56543c04c3..0000000000 --- a/shared/test/unit_test/gen8/test_preemption_gen8.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/gen8/hw_cmds_base.h" -#include "shared/source/helpers/constants.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/fixtures/preemption_fixture.h" - -using namespace NEO; - -template <> -PreemptionTestHwDetails getPreemptionTestHwDetails() { - PreemptionTestHwDetails ret; - ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = 0; - ret.modeToRegValueMap[PreemptionMode::MidBatch] = (1 << 2); - ret.defaultRegValue = ret.modeToRegValueMap[PreemptionMode::MidBatch]; - ret.regAddress = 0x2248u; - return ret; -} - -using Gen8PreemptionTests = DevicePreemptionTests; - -GEN8TEST_F(Gen8PreemptionTests, whenProgramStateSipIsCalledThenNoCmdsAreProgrammed) { - size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize(*device, false); - EXPECT_EQ(0U, requiredSize); - - LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr); - EXPECT_EQ(0U, cmdStream.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTests, GivenMidBatchWhenGettingPreemptionWaCsSizeThenSizeIsZero) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::MidBatch); - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN8TEST_F(Gen8PreemptionTests, GivenMidBatchAndNoWaWhenGettingPreemptionWaCsSizeThenSizeIsZero) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN8TEST_F(Gen8PreemptionTests, GivenMidBatchAndWaWhenGettingPreemptionWaCsSizeThenSizeIsNonZero) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t expectedSize = 2 * sizeof(MI_LOAD_REGISTER_IMM); - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN8TEST_F(Gen8PreemptionTests, GivenMidThreadAndNoWaWhenGettingPreemptionWaCsSizeThenSizeIsZero) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN8TEST_F(Gen8PreemptionTests, GivenMidThreadAndWaWhenGettingPreemptionWaCsSizeThenSizeNonIsZero) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t expectedSize = 2 * sizeof(MI_LOAD_REGISTER_IMM); - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN8TEST_F(Gen8PreemptionTests, givenInterfaceDescriptorDataWhenAnyPreemptionModeThenNoChange) { - using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; - - INTERFACE_DESCRIPTOR_DATA idd; - INTERFACE_DESCRIPTOR_DATA iddArg; - int ret; - - idd = FamilyType::cmdInitInterfaceDescriptorData; - iddArg = FamilyType::cmdInitInterfaceDescriptorData; - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::Disabled); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidBatch); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::ThreadGroup); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidThread); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); -} - -struct Gen8PreemptionTestsLinearStream : public Gen8PreemptionTests { - void SetUp() override { - Gen8PreemptionTests::SetUp(); - cmdBufferAllocation = alignedMalloc(MemoryConstants::pageSize, MemoryConstants::pageSize); - cmdBuffer.replaceBuffer(cmdBufferAllocation, MemoryConstants::pageSize); - } - - void TearDown() override { - alignedFree(cmdBufferAllocation); - Gen8PreemptionTests::TearDown(); - } - - LinearStream cmdBuffer; - void *cmdBufferAllocation; - HardwareParse cmdBufferParser; -}; - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidBatchPreemptionWhenProgrammingWaCmdsBeginThenExpectNoCmds) { - device->setPreemptionMode(PreemptionMode::MidBatch); - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidBatchPreemptionWhenProgrammingWaCmdsEndThenExpectNoCmds) { - device->setPreemptionMode(PreemptionMode::MidBatch); - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenThreadGroupPreemptionNoWaSetWhenProgrammingWaCmdsBeginThenExpectNoCmd) { - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenThreadGroupPreemptionNoWaSetWhenProgrammingWaCmdsEndThenExpectNoCmd) { - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenThreadGroupPreemptionWaSetWhenProgrammingWaCmdsBeginThenExpectMmioCmd) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdBuffer, *device); - - cmdBufferParser.parseCommands(cmdBuffer); - cmdBufferParser.findHardwareCommands(); - GenCmdList::iterator itMmioCmd = cmdBufferParser.lriList.begin(); - ASSERT_NE(cmdBufferParser.lriList.end(), itMmioCmd); - MI_LOAD_REGISTER_IMM *mmioCmd = genCmdCast(*itMmioCmd); - EXPECT_EQ(0x2600u, mmioCmd->getRegisterOffset()); - EXPECT_EQ(0xFFFFFFFFu, mmioCmd->getDataDword()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenThreadGroupPreemptionWaSetWhenProgrammingWaCmdsEndThenExpectMmioCmd) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdBuffer, *device); - - cmdBufferParser.parseCommands(cmdBuffer); - cmdBufferParser.findHardwareCommands(); - GenCmdList::iterator itMmioCmd = cmdBufferParser.lriList.begin(); - ASSERT_NE(cmdBufferParser.lriList.end(), itMmioCmd); - MI_LOAD_REGISTER_IMM *mmioCmd = genCmdCast(*itMmioCmd); - EXPECT_EQ(0x2600u, mmioCmd->getRegisterOffset()); - EXPECT_EQ(0x00000000u, mmioCmd->getDataDword()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidThreadPreemptionNoWaSetWhenProgrammingWaCmdsBeginThenExpectNoCmd) { - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidThreadPreemptionNoWaSetWhenProgrammingWaCmdsEndThenExpectNoCmd) { - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdBuffer, *device); - EXPECT_EQ(0u, cmdBuffer.getUsed()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidThreadPreemptionWaSetWhenProgrammingWaCmdsBeginThenExpectMmioCmd) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - PreemptionHelper::applyPreemptionWaCmdsBegin(&cmdBuffer, *device); - - cmdBufferParser.parseCommands(cmdBuffer); - cmdBufferParser.findHardwareCommands(); - GenCmdList::iterator itMmioCmd = cmdBufferParser.lriList.begin(); - ASSERT_NE(cmdBufferParser.lriList.end(), itMmioCmd); - MI_LOAD_REGISTER_IMM *mmioCmd = genCmdCast(*itMmioCmd); - EXPECT_EQ(0x2600u, mmioCmd->getRegisterOffset()); - EXPECT_EQ(0xFFFFFFFFu, mmioCmd->getDataDword()); -} - -GEN8TEST_F(Gen8PreemptionTestsLinearStream, givenMidThreadPreemptionWaSetWhenProgrammingWaCmdsEndThenExpectMmioCmd) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - PreemptionHelper::applyPreemptionWaCmdsEnd(&cmdBuffer, *device); - - cmdBufferParser.parseCommands(cmdBuffer); - cmdBufferParser.findHardwareCommands(); - GenCmdList::iterator itMmioCmd = cmdBufferParser.lriList.begin(); - ASSERT_NE(cmdBufferParser.lriList.end(), itMmioCmd); - MI_LOAD_REGISTER_IMM *mmioCmd = genCmdCast(*itMmioCmd); - EXPECT_EQ(0x2600u, mmioCmd->getRegisterOffset()); - EXPECT_EQ(0x00000000u, mmioCmd->getDataDword()); -} diff --git a/shared/test/unit_test/gen8/test_sample_gen8.cpp b/shared/test/unit_test/gen8/test_sample_gen8.cpp deleted file mode 100644 index 13f8208de3..0000000000 --- a/shared/test/unit_test/gen8/test_sample_gen8.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using BroadwellOnlyTest = ::testing::Test; - -BDWTEST_F(BroadwellOnlyTest, WhenGettingProductFamilyThenBroadwellIsReturned) { - EXPECT_EQ(IGFX_BROADWELL, defaultHwInfo->platform.eProductFamily); -} - -using Gen8OnlyTest = ::testing::Test; - -GEN8TEST_F(Gen8OnlyTest, WhenGettingRenderCoreFamilyThenGen8CoreIsReturned) { - EXPECT_EQ(IGFX_GEN8_CORE, defaultHwInfo->platform.eRenderCoreFamily); -} diff --git a/shared/test/unit_test/gen8/windows/CMakeLists.txt b/shared/test/unit_test/gen8/windows/CMakeLists.txt deleted file mode 100644 index f35bfa5ee6..0000000000 --- a/shared/test/unit_test/gen8/windows/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(WIN32) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/gmm_callbacks_tests_gen8.cpp - ) -endif() diff --git a/shared/test/unit_test/gen8/windows/gmm_callbacks_tests_gen8.cpp b/shared/test/unit_test/gen8/windows/gmm_callbacks_tests_gen8.cpp deleted file mode 100644 index 70f6bfc457..0000000000 --- a/shared/test/unit_test/gen8/windows/gmm_callbacks_tests_gen8.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen8GmmCallbacksTests = ::testing::Test; - -GEN8TEST_F(Gen8GmmCallbacksTests, GivenDefaultWhenNotifyingAubCaptureThenDeviceCallbackIsNotSupported) { - EXPECT_EQ(0, DeviceCallbacks::notifyAubCapture(nullptr, 0, 0, false)); -} - -GEN8TEST_F(Gen8GmmCallbacksTests, GivenDefaultWhenWritingL3AddressThenTtCallbackIsNotSupported) { - EXPECT_EQ(0, TTCallbacks::writeL3Address(nullptr, 1, 2)); -} diff --git a/shared/test/unit_test/gen9/CMakeLists.txt b/shared/test/unit_test/gen9/CMakeLists.txt deleted file mode 100644 index 9cc453b73b..0000000000 --- a/shared/test/unit_test/gen9/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2021-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/sip_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen9.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/bxt/CMakeLists.txt b/shared/test/unit_test/gen9/bxt/CMakeLists.txt deleted file mode 100644 index 03e93bdd72..0000000000 --- a/shared/test/unit_test/gen9/bxt/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BXT) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_tests_bxt.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_bxt.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/bxt/device_tests_bxt.cpp b/shared/test/unit_test/gen9/bxt/device_tests_bxt.cpp deleted file mode 100644 index 02a3e94b5d..0000000000 --- a/shared/test/unit_test/gen9/bxt/device_tests_bxt.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/hw_test.h" - -using namespace NEO; - -using DeviceBxtTest = Test; - -BXTTEST_F(DeviceBxtTest, givenBxtDeviceWhenAskedForProflingTimerResolutionThen52IsReturned) { - auto resolution = pDevice->getProfilingTimerResolution(); - EXPECT_DOUBLE_EQ(52.083, resolution); -} diff --git a/shared/test/unit_test/gen9/bxt/linux/CMakeLists.txt b/shared/test/unit_test/gen9/bxt/linux/CMakeLists.txt deleted file mode 100644 index 7628e23a86..0000000000 --- a/shared/test/unit_test/gen9/bxt/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_bxt.cpp - ) -endif() diff --git a/shared/test/unit_test/gen9/bxt/linux/product_helper_tests_bxt.cpp b/shared/test/unit_test/gen9/bxt/linux/product_helper_tests_bxt.cpp deleted file mode 100644 index 0bb8b46069..0000000000 --- a/shared/test/unit_test/gen9/bxt/linux/product_helper_tests_bxt.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -struct BxtProductHelperLinux : ProductHelperTestLinux { - void SetUp() override { - ProductHelperTestLinux::SetUp(); - - drm->storedEUVal = 18; - drm->storedHasPooledEU = 1; - drm->storedMinEUinPool = 3; - } -}; - -BXTTEST_F(BxtProductHelperLinux, WhenConfiguringHwInfoThenConfigIsCorrect) { - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((unsigned int)drm->storedHasPooledEU, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ((uint32_t)drm->storedMinEUinPool, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - // constant sysInfo/ftr flags - EXPECT_TRUE(outHwInfo.gtSystemInfo.VEBoxInfo.IsValid); - - pInHwInfo.platform.usDeviceID = 0x5A85; - drm->storedMinEUinPool = 6; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((unsigned int)drm->storedHasPooledEU, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ((uint32_t)drm->storedMinEUinPool, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x5A85; - drm->storedMinEUinPool = 9; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((unsigned int)drm->storedHasPooledEU, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ((uint32_t)drm->storedMinEUinPool, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ((outHwInfo.gtSystemInfo.EUCount - outHwInfo.gtSystemInfo.EuCountPerPoolMin), outHwInfo.gtSystemInfo.EuCountPerPoolMax); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; - EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); -} - -BXTTEST_F(BxtProductHelperLinux, GivenDisabledEnabledPoolWhenConfiguringHwInfoThenZeroIsReturned) { - drm->storedHasPooledEU = 0; - - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMax); -} - -template -class BxtHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types bxtTestTypes; -TYPED_TEST_SUITE(BxtHwInfoTests, bxtTestTypes); -TYPED_TEST(BxtHwInfoTests, WhenConfiguringHwInfoThenConfigIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp b/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp deleted file mode 100644 index 272d3b133d..0000000000 --- a/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; - -using BxtProductHelper = ProductHelperTest; - -BXTTEST_F(BxtProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -BXTTEST_F(BxtProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Bxt, productHelper->getAubStreamProductFamily()); -} - -BXTTEST_F(BxtProductHelper, givenBoolWhenCallBxtHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - HardwareInfo hwInfo = *defaultHwInfo; - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - FeatureTable &featureTable = hwInfo.featureTable; - WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - PLATFORM &platform = hwInfo.platform; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - platform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrULT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrLCIA); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waLLCCachingUnsupported); - EXPECT_EQ(setParamBool, workaroundTable.flags.waMsaa8xTileYDepthPitchAlignment); - EXPECT_EQ(setParamBool, workaroundTable.flags.waFbcLinearSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSendMIFLUSHBeforeVFE); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - } - } -} - -BXTTEST_F(BxtProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::APL); -} - -BXTTEST_F(BxtProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -BXTTEST_F(BxtProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_FALSE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen9/cfl/CMakeLists.txt b/shared/test/unit_test/gen9/cfl/CMakeLists.txt deleted file mode 100644 index 168d0aef7a..0000000000 --- a/shared/test/unit_test/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_CFL) - set(NEO_CORE_tests_gen9_cfl_excludes ${CMAKE_CURRENT_SOURCE_DIR}/excludes_cfl.cpp) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_tests_excludes ${NEO_CORE_tests_gen9_cfl_excludes}) - target_sources(neo_shared_tests PRIVATE - ${NEO_CORE_tests_gen9_cfl_excludes} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_cfl.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/cfl/excludes_cfl.cpp b/shared/test/unit_test/gen9/cfl/excludes_cfl.cpp deleted file mode 100644 index 02867666cd..0000000000 --- a/shared/test/unit_test/gen9/cfl/excludes_cfl.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" diff --git a/shared/test/unit_test/gen9/cfl/linux/CMakeLists.txt b/shared/test/unit_test/gen9/cfl/linux/CMakeLists.txt deleted file mode 100644 index c820d5aa37..0000000000 --- a/shared/test/unit_test/gen9/cfl/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_cfl.cpp - ) -endif() diff --git a/shared/test/unit_test/gen9/cfl/linux/product_helper_tests_cfl.cpp b/shared/test/unit_test/gen9/cfl/linux/product_helper_tests_cfl.cpp deleted file mode 100644 index 722047b876..0000000000 --- a/shared/test/unit_test/gen9/cfl/linux/product_helper_tests_cfl.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -struct CflProductHelperLinux : ProductHelperTestLinux { - void SetUp() override { - ProductHelperTestLinux::SetUp(); - } -}; - -CFLTEST_F(CflProductHelperLinux, WhenConfiguringHwInfoThenInformationIsCorrect) { - - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - // constant sysInfo/ftr flags - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.VEBoxInfo.Instances.Bits.VEBox0Enabled); - EXPECT_TRUE(outHwInfo.gtSystemInfo.VEBoxInfo.IsValid); - - pInHwInfo.platform.usDeviceID = 0x3E90; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x3EA5; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; - EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -CFLTEST_F(CflProductHelperLinux, WhenConfiguringHwInfoThenEdramInformationIsCorrect) { - - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL(0u, outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x3EA8; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x3EA6; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); -} - -template -class CflHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types cflTestTypes; -TYPED_TEST_SUITE(CflHwInfoTests, cflTestTypes); -TYPED_TEST(CflHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp b/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp deleted file mode 100644 index ff1f44425b..0000000000 --- a/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/cfl/device_ids_configs_cfl.h" -#include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; - -using CflProductHelper = ProductHelperTest; - -CFLTEST_F(CflProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -CFLTEST_F(CflProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Cfl, productHelper->getAubStreamProductFamily()); -} - -CFLTEST_F(CflProductHelper, givenBoolWhenCallCflHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100030008, - 0x200030008, - 0x300030008, - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - HardwareInfo hwInfo = *defaultHwInfo; - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - FeatureTable &featureTable = hwInfo.featureTable; - WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waSendMIFLUSHBeforeVFE); - EXPECT_EQ(setParamBool, workaroundTable.flags.waMsaa8xTileYDepthPitchAlignment); - EXPECT_EQ(setParamBool, workaroundTable.flags.waLosslessCompressionSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.waFbcLinearSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - } - } -} - -CFLTEST_F(CflProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - - for (const auto &deviceId : cflDeviceIds) { - pInHwInfo.platform.usDeviceID = deviceId; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CFL); - } - for (const auto &deviceId : cmlDeviceIds) { - pInHwInfo.platform.usDeviceID = deviceId; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CML); - } - for (const auto &deviceId : whlDeviceIds) { - pInHwInfo.platform.usDeviceID = deviceId; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::WHL); - } - - pInHwInfo.platform.usDeviceID = 0u; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CFL); -} - -CFLTEST_F(CflProductHelper, givenCompilerProductHelperWhenGetIpVersionAndDeviceIdIsUnknownThenDefaultConfigIsReturned) { - pInHwInfo.platform.usDeviceID = 0u; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CFL); - EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::CFL); -} - -CFLTEST_F(CflProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -CFLTEST_F(CflProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_FALSE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen9/command_encoder_tests_gen9.cpp b/shared/test/unit_test/gen9/command_encoder_tests_gen9.cpp deleted file mode 100644 index dd6571cee8..0000000000 --- a/shared/test/unit_test/gen9/command_encoder_tests_gen9.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen9CommandEncodeTest = testing::Test; -GEN9TEST_F(Gen9CommandEncodeTest, givenGen9PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) { - EXPECT_TRUE(EncodeSurfaceState::doBindingTablePrefetch()); -} - -GEN9TEST_F(Gen9CommandEncodeTest, givenSurfaceStateWhenAuxParamsForMCSCCSAreSetThenAuxModeStaysTheSame) { - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - MockDevice device; - auto releaseHelper = device.getReleaseHelper(); - - auto originalAuxMode = surfaceState.getAuxiliarySurfaceMode(); - - EncodeSurfaceState::setAuxParamsForMCSCCS(&surfaceState, releaseHelper); - - EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), originalAuxMode); -} diff --git a/shared/test/unit_test/gen9/gfx_core_helper_tests_gen9.cpp b/shared/test/unit_test/gen9/gfx_core_helper_tests_gen9.cpp deleted file mode 100644 index baaacce09e..0000000000 --- a/shared/test/unit_test/gen9/gfx_core_helper_tests_gen9.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/helpers/gfx_core_helper_tests.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using GfxCoreHelperTestGen9 = GfxCoreHelperTest; - -GEN9TEST_F(GfxCoreHelperTestGen9, WhenGettingMaxBarriersPerSliceThenCorrectSizeIsReturned) { - auto &helper = getHelper(); - EXPECT_EQ(32u, helper.getMaxBarrierRegisterPerSlice()); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, givenGen9WhenCallIsPackedSupportedThenReturnFalse) { - auto &helper = pDevice->getGfxCoreHelper(); - EXPECT_FALSE(helper.packedFormatsSupported()); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, WhenGettingPitchAlignmentForImageThenCorrectValueIsReturned) { - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(4u, gfxCoreHelper.getPitchAlignmentForImage(pDevice->getRootDeviceEnvironment())); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) { - auto engineType = hardwareInfo.capabilityTable.defaultEngineType; - auto &gfxCoreHelper = getHelper(); - auto &productHelper = getHelper(); - gfxCoreHelper.adjustDefaultEngineType(&hardwareInfo, productHelper, nullptr); - EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, givenDebuggingActiveWhenSipKernelTypeIsQueriedThenDbgCsrLocalTypeIsReturned) { - auto &gfxCoreHelper = getHelper(); - - auto sipType = gfxCoreHelper.getSipKernelType(true); - EXPECT_EQ(SipKernelType::dbgCsrLocal, sipType); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, whenGetGpgpuEnginesThenReturnThreeRcsEngines) { - auto &gfxCoreHelper = getHelper(); - auto gpgpuEngines = gfxCoreHelper.getGpgpuEngineInstances(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(3u, gpgpuEngines.size()); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[0].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[1].first); - EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[2].first); - EXPECT_EQ(3u, pDevice->allEngines.size()); -} - -GEN9TEST_F(GfxCoreHelperTestGen9, givenGen9WhenCallIsTimestampShiftRequiredThenFalseIsReturned) { - auto &gfxCoreHelper = pDevice->getGfxCoreHelper(); - EXPECT_FALSE(gfxCoreHelper.isTimestampShiftRequired()); -} - -using MemorySynchronizatiopCommandsTestsGen9 = ::testing::Test; -GEN9TEST_F(MemorySynchronizatiopCommandsTestsGen9, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) { - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - std::unique_ptr buffer(new uint8_t[128]); - MockExecutionEnvironment mockExecutionEnvironment{}; - LinearStream stream(buffer.get(), 128); - MemorySynchronizationCommands::addFullCacheFlush(stream, *mockExecutionEnvironment.rootDeviceEnvironments[0]); - PIPE_CONTROL *pipeControl = genCmdCast(buffer.get()); - ASSERT_NE(nullptr, pipeControl); - EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable()); -} diff --git a/shared/test/unit_test/gen9/glk/CMakeLists.txt b/shared/test/unit_test/gen9/glk/CMakeLists.txt deleted file mode 100644 index 13668e49fb..0000000000 --- a/shared/test/unit_test/gen9/glk/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GLK) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_glk.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/glk/linux/CMakeLists.txt b/shared/test/unit_test/gen9/glk/linux/CMakeLists.txt deleted file mode 100644 index b058261e88..0000000000 --- a/shared/test/unit_test/gen9/glk/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_glk.cpp - ) -endif() diff --git a/shared/test/unit_test/gen9/glk/linux/product_helper_tests_glk.cpp b/shared/test/unit_test/gen9/glk/linux/product_helper_tests_glk.cpp deleted file mode 100644 index 14aba924cf..0000000000 --- a/shared/test/unit_test/gen9/glk/linux/product_helper_tests_glk.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -struct GlkProductHelperLinux : ProductHelperTestLinux { - void SetUp() override { - ProductHelperTestLinux::SetUp(); - - drm->storedEUVal = 18; - drm->storedHasPooledEU = 1; - drm->storedMinEUinPool = 3; - } -}; - -GLKTEST_F(GlkProductHelperLinux, WhenConfiguringHwInfoThenInformationIsCorrect) { - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - // constant sysInfo/ftr flags - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.VEBoxInfo.Instances.Bits.VEBox0Enabled); - EXPECT_TRUE(outHwInfo.gtSystemInfo.VEBoxInfo.IsValid); - - pInHwInfo.platform.usDeviceID = 0x3184; - - drm->storedMinEUinPool = 6; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ((unsigned int)drm->storedHasPooledEU, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ((uint32_t)drm->storedMinEUinPool, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ((outHwInfo.gtSystemInfo.EUCount - outHwInfo.gtSystemInfo.EuCountPerPoolMin), outHwInfo.gtSystemInfo.EuCountPerPoolMax); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x3185; - - drm->storedMinEUinPool = 9; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ((unsigned int)drm->storedHasPooledEU, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ((uint32_t)drm->storedMinEUinPool, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ((outHwInfo.gtSystemInfo.EUCount - outHwInfo.gtSystemInfo.EuCountPerPoolMin), outHwInfo.gtSystemInfo.EuCountPerPoolMax); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; - EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -GLKTEST_F(GlkProductHelperLinux, GivenFailingEnabledPoolWhenConfiguringHwInfoThenZeroIsSet) { - drm->storedRetValForPooledEU = -1; - - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMax); -} - -GLKTEST_F(GlkProductHelperLinux, GivenDisabledEnabledPoolWhenConfiguringHwInfoThenZeroIsSet) { - drm->storedHasPooledEU = 0; - - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrPooledEuEnabled); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMin); - EXPECT_EQ(0u, outHwInfo.gtSystemInfo.EuCountPerPoolMax); -} - -template -class GlkHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types glkTestTypes; -TYPED_TEST_SUITE(GlkHwInfoTests, glkTestTypes); -TYPED_TEST(GlkHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp b/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp deleted file mode 100644 index 9711e4cb9f..0000000000 --- a/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; - -using GlkProductHelper = ProductHelperTest; - -GLKTEST_F(GlkProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - gtSystemInfo = {0}; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -GLKTEST_F(GlkProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Glk, productHelper->getAubStreamProductFamily()); -} - -GLKTEST_F(GlkProductHelper, givenBoolWhenCallGlkHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - HardwareInfo hwInfo = *defaultHwInfo; - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - FeatureTable &featureTable = hwInfo.featureTable; - WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrLCIA); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileMappedResource); - EXPECT_EQ(setParamBool, featureTable.flags.ftrULT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcHdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrAstcLdr2D); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waLLCCachingUnsupported); - EXPECT_EQ(setParamBool, workaroundTable.flags.waMsaa8xTileYDepthPitchAlignment); - EXPECT_EQ(setParamBool, workaroundTable.flags.waFbcLinearSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSendMIFLUSHBeforeVFE); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - } - } -} - -GLKTEST_F(GlkProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::GLK); -} - -GLKTEST_F(GlkProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -GLKTEST_F(GlkProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_FALSE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp b/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp deleted file mode 100644 index a41a800ed6..0000000000 --- a/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2021-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen9HwCmdTest = ::testing::Test; - -GEN9TEST_F(Gen9HwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - renderSurfaceState.setMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables); -} - -GEN9TEST_F(Gen9HwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setIndirectObjectMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setInstructionMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); - - stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); -} - -GEN9TEST_F(Gen9HwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { - auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; - uint32_t mocs = 4u; - uint32_t expectedMocsIndex = (mocs >> 1); - mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); - EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables); -} diff --git a/shared/test/unit_test/gen9/image_surface_state_tests_gen9.cpp b/shared/test/unit_test/gen9/image_surface_state_tests_gen9.cpp deleted file mode 100644 index 7616aee52f..0000000000 --- a/shared/test/unit_test/gen9/image_surface_state_tests_gen9.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/image/image_surface_state_fixture.h" - -using namespace NEO; - -using ImageSurfaceStateTestsGen9 = ImageSurfaceStateTests; - -GEN9TEST_F(ImageSurfaceStateTestsGen9, givenGmmWithMediaCompressedWhenSetFlagsForMediaCompressionThenAuxiliarySurfaceNoneIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - castSurfaceState->setAuxiliarySurfaceMode(FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = false; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E); - mockGmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed = true; - EncodeSurfaceState::setFlagsForMediaCompression(castSurfaceState, mockGmm.get()); - EXPECT_EQ(castSurfaceState->getAuxiliarySurfaceMode(), FamilyType::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); -} - -GEN9TEST_F(ImageSurfaceStateTestsGen9, givenGmmWithMediaCompressedWhenSetMipTailStartLodThenMipTailStartLodIsSet) { - auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE); - auto surfaceState = std::make_unique(size); - auto castSurfaceState = reinterpret_cast(surfaceState.get()); - - setMipTailStartLod(castSurfaceState, nullptr); - - EXPECT_EQ(castSurfaceState->getMipTailStartLod(), 0u); - - setMipTailStartLod(castSurfaceState, mockGmm.get()); - - EXPECT_EQ(castSurfaceState->getMipTailStartLod(), mockGmm->gmmResourceInfo->getMipTailStartLodSurfaceState()); -} diff --git a/shared/test/unit_test/gen9/kbl/CMakeLists.txt b/shared/test/unit_test/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 0be06f3706..0000000000 --- a/shared/test/unit_test/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_KBL) - set(NEO_CORE_tests_gen9_kbl_excludes ${CMAKE_CURRENT_SOURCE_DIR}/excludes_kbl.cpp) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_tests_excludes ${NEO_CORE_tests_gen9_kbl_excludes}) - target_sources(neo_shared_tests PRIVATE - ${NEO_CORE_tests_gen9_kbl_excludes} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_kbl.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/kbl/excludes_kbl.cpp b/shared/test/unit_test/gen9/kbl/excludes_kbl.cpp deleted file mode 100644 index 02867666cd..0000000000 --- a/shared/test/unit_test/gen9/kbl/excludes_kbl.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" diff --git a/shared/test/unit_test/gen9/kbl/linux/CMakeLists.txt b/shared/test/unit_test/gen9/kbl/linux/CMakeLists.txt deleted file mode 100644 index 1421d031ef..0000000000 --- a/shared/test/unit_test/gen9/kbl/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_kbl.cpp - ) -endif() diff --git a/shared/test/unit_test/gen9/kbl/linux/product_helper_tests_kbl.cpp b/shared/test/unit_test/gen9/kbl/linux/product_helper_tests_kbl.cpp deleted file mode 100644 index 609aa1ec47..0000000000 --- a/shared/test/unit_test/gen9/kbl/linux/product_helper_tests_kbl.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -struct KblProductHelperLinux : ProductHelperTestLinux { - void SetUp() override { - ProductHelperTestLinux::SetUp(); - } -}; - -KBLTEST_F(KblProductHelperLinux, WhenConfiguringHwInfoThenInformationIsCorrect) { - - auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - // constant sysInfo/ftr flags - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.VEBoxInfo.Instances.Bits.VEBox0Enabled); - EXPECT_TRUE(outHwInfo.gtSystemInfo.VEBoxInfo.IsValid); - - drm->storedSSVal = 3; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.SliceCount); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount); - EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - drm->storedSSVal = 6; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; - EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -KBLTEST_F(KblProductHelperLinux, GivenWaFlagsWhenConfiguringHwInfoThenInformationIsCorrect) { - - outHwInfo.platform.usRevId = 0; - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - pInHwInfo.platform.usRevId = 7; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waEncryptedEdramOnlyPartials); - - pInHwInfo.platform.usRevId = 9; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waEncryptedEdramOnlyPartials); -} - -KBLTEST_F(KblProductHelperLinux, WhenConfiguringHwInfoThenEdramInformationIsCorrect) { - - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL(0u, outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x5927; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x5926; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); -} - -template -class KblHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types kblTestTypes; -TYPED_TEST_SUITE(KblHwInfoTests, kblTestTypes); -TYPED_TEST(KblHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} diff --git a/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp b/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp deleted file mode 100644 index e792eec031..0000000000 --- a/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/kbl/device_ids_configs_kbl.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/hw_test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; - -using KblProductHelper = ProductHelperTest; - -KBLTEST_F(KblProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - - uint64_t config = 0xdeadbeef; - gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -KBLTEST_F(KblProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Kbl, productHelper->getAubStreamProductFamily()); -} - -KBLTEST_F(KblProductHelper, givenBoolWhenCallKblHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100030008, - 0x200030008, - 0x300030008, - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - HardwareInfo hwInfo = *defaultHwInfo; - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - FeatureTable &featureTable = hwInfo.featureTable; - WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - PLATFORM &platform = hwInfo.platform; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - platform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waSendMIFLUSHBeforeVFE); - EXPECT_EQ(setParamBool, workaroundTable.flags.waMsaa8xTileYDepthPitchAlignment); - EXPECT_EQ(setParamBool, workaroundTable.flags.waLosslessCompressionSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.waFbcLinearSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - EXPECT_EQ(false, workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(false, workaroundTable.flags.waEncryptedEdramOnlyPartials); - - platform.usRevId = 1; - workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, true, config, nullptr); - - EXPECT_EQ(true, workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(true, workaroundTable.flags.waEncryptedEdramOnlyPartials); - } - } -} - -KBLTEST_F(KblProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - - for (const auto &deviceId : amlDeviceIds) { - pInHwInfo.platform.usDeviceID = deviceId; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::AML); - } - for (const auto &deviceId : kblDeviceIds) { - pInHwInfo.platform.usDeviceID = deviceId; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::KBL); - } -} - -KBLTEST_F(KblProductHelper, givenCompilerProductHelperWhenGetIpVersionAndDeviceIdIsUnknownThenDefaultConfigIsReturned) { - pInHwInfo.platform.usDeviceID = 0u; - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::KBL); - EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::KBL); -} - -KBLTEST_F(KblProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -KBLTEST_F(KblProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_FALSE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen9/preamble_tests_gen9.cpp b/shared/test/unit_test/gen9/preamble_tests_gen9.cpp deleted file mode 100644 index 4aa6073a4b..0000000000 --- a/shared/test/unit_test/gen9/preamble_tests_gen9.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/test/common/fixtures/preamble_fixture.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/source_level_debugger/source_level_debugger_preamble_test.h" - -#include "gtest/gtest.h" - -using namespace NEO; -typedef Gen9Family GfxFamily; - -#include "shared/test/common/source_level_debugger/source_level_debugger_preamble_test.inl" - -using PreambleTestGen9 = ::testing::Test; - -GEN9TEST_F(PreambleTestGen9, givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) { - SourceLevelDebuggerPreambleTest::givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest(); -} - -GEN9TEST_F(PreambleTestGen9, givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcuded) { - SourceLevelDebuggerPreambleTest::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThenCorrectSizeIsInlcudedTest(); -} - -using ThreadArbitrationGen9 = PreambleFixture; -GEN9TEST_F(ThreadArbitrationGen9, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsNotSet) { - DebugManagerStateRestore dbgRestore; - debugManager.flags.ForcePreemptionMode.set(static_cast(PreemptionMode::Disabled)); - typedef Gen9Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef Gen9Family::PIPE_CONTROL PIPE_CONTROL; - LinearStream &cs = linearStream; - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - MockDevice mockDevice; - PreambleHelper::programPreamble(&linearStream, mockDevice, l3Config, nullptr, false); - - parseCommands(cs); - - auto ppC = find(cmdList.begin(), cmdList.end()); - ASSERT_EQ(cmdList.end(), ppC); - - auto itorLRI = reverseFind(cmdList.rbegin(), cmdList.rend()); - ASSERT_NE(cmdList.rend(), itorLRI); - - const auto &lri = *reinterpret_cast(*itorLRI); - EXPECT_NE(0xE404u, lri.getRegisterOffset()); - EXPECT_NE(0x100u, lri.getDataDword()); - - MockDevice device; - EXPECT_EQ(0u, PreambleHelper::getAdditionalCommandsSize(device)); -} - -GEN9TEST_F(ThreadArbitrationGen9, whenThreadArbitrationPolicyIsProgrammedThenCorrectValuesAreSet) { - DebugManagerStateRestore dbgRestore; - debugManager.flags.ForcePreemptionMode.set(static_cast(PreemptionMode::Disabled)); - typedef Gen9Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - typedef Gen9Family::PIPE_CONTROL PIPE_CONTROL; - LinearStream &cs = linearStream; - MockDevice mockDevice; - StreamProperties streamProperties{}; - streamProperties.stateComputeMode.threadArbitrationPolicy.set(ThreadArbitrationPolicy::RoundRobin); - EncodeComputeMode::programComputeModeCommand(linearStream, streamProperties.stateComputeMode, mockDevice.getRootDeviceEnvironment()); - - parseCommands(cs); - - auto ppC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(ppC, cmdList.end()); - - auto itorLRI = reverseFind(cmdList.rbegin(), cmdList.rend()); - ASSERT_NE(cmdList.rend(), itorLRI); - - const auto &lri = *reinterpret_cast(*itorLRI); - EXPECT_EQ(0xE404u, lri.getRegisterOffset()); - EXPECT_EQ(0x100u, lri.getDataDword()); - - MockDevice device; - EXPECT_EQ(0u, PreambleHelper::getAdditionalCommandsSize(device)); -} diff --git a/shared/test/unit_test/gen9/sampler_tests_gen9.cpp b/shared/test/unit_test/gen9/sampler_tests_gen9.cpp deleted file mode 100644 index 4c81435d79..0000000000 --- a/shared/test/unit_test/gen9/sampler_tests_gen9.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/mocks/mock_execution_environment.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include - -using namespace NEO; - -using Gen9SamplerTest = ::testing::Test; - -GEN9TEST_F(Gen9SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) { - using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE; - MockExecutionEnvironment mockExecutionEnvironment{}; - auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - auto &productHelper = rootDeviceEnvironment.getHelper(); - - auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState; - auto stateWithAppendedParams = FamilyType::cmdInitSamplerState; - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); - productHelper.adjustSamplerState(&stateWithAppendedParams, *defaultHwInfo); - EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0); -} diff --git a/shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp b/shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp deleted file mode 100644 index 54a729a013..0000000000 --- a/shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/helpers/simd_helper_tests.inl" - -using namespace NEO; - -using TestSimdConfigSet = ::testing::Test; - -GEN9TEST_F(TestSimdConfigSet, GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturnedGen9) { - GivenSimdSizeWhenGetSimdConfigCalledThenCorrectEnumReturned::testBodyImpl(); -} \ No newline at end of file diff --git a/shared/test/unit_test/gen9/sip_tests_gen9.cpp b/shared/test/unit_test/gen9/sip_tests_gen9.cpp deleted file mode 100644 index c10b50457d..0000000000 --- a/shared/test/unit_test/gen9/sip_tests_gen9.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/built_ins/sip.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/helpers/test_files.h" -#include "shared/test/common/libult/global_environment.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "gtest/gtest.h" - -using namespace NEO; - -namespace SipKernelTests { -typedef ::testing::Test gen9SipTests; - -GEN9TEST_F(gen9SipTests, givenDebugCsrSipKernelWithLocalMemoryWhenAskedForDebugSurfaceBtiAndSizeThenBtiIsZeroAndSizeGreaterThanZero) { - auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - EXPECT_NE(nullptr, mockDevice); - - auto &builtins = *mockDevice->getBuiltIns(); - auto &sipKernel = builtins.getSipKernel(SipKernelType::dbgCsrLocal, *mockDevice); - - EXPECT_NE(nullptr, &sipKernel); - EXPECT_EQ(SipKernelType::dbgCsrLocal, sipKernel.getType()); -} -} // namespace SipKernelTests diff --git a/shared/test/unit_test/gen9/skl/CMakeLists.txt b/shared/test/unit_test/gen9/skl/CMakeLists.txt deleted file mode 100644 index 9a6378efe2..0000000000 --- a/shared/test/unit_test/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(NEO_CORE_tests_gen9_skl_excludes ${CMAKE_CURRENT_SOURCE_DIR}/excludes_skl.cpp) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_tests_excludes ${NEO_CORE_tests_gen9_skl_excludes}) - target_sources(neo_shared_tests PRIVATE - ${NEO_CORE_tests_gen9_skl_excludes} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/device_tests_skl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_product_helper_skl.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/skl/device_tests_skl.cpp b/shared/test/unit_test/gen9/skl/device_tests_skl.cpp deleted file mode 100644 index f58e406afb..0000000000 --- a/shared/test/unit_test/gen9/skl/device_tests_skl.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/hw_test.h" - -using namespace NEO; - -using DeviceSklTest = Test; - -SKLTEST_F(DeviceSklTest, givenSklDeviceWhenAskedForProflingTimerResolutionThen83IsReturned) { - auto resolution = pDevice->getProfilingTimerResolution(); - EXPECT_DOUBLE_EQ(83.333, resolution); -} diff --git a/shared/test/unit_test/gen9/skl/excludes_skl.cpp b/shared/test/unit_test/gen9/skl/excludes_skl.cpp deleted file mode 100644 index 02867666cd..0000000000 --- a/shared/test/unit_test/gen9/skl/excludes_skl.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test_base.h" diff --git a/shared/test/unit_test/gen9/skl/linux/CMakeLists.txt b/shared/test/unit_test/gen9/skl/linux/CMakeLists.txt deleted file mode 100644 index 85e9122ae9..0000000000 --- a/shared/test/unit_test/gen9/skl/linux/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_skl.cpp - ) -endif() diff --git a/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp b/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp deleted file mode 100644 index f93689b4eb..0000000000 --- a/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" - -#include "hw_cmds.h" - -using namespace NEO; - -struct SklProductHelperLinux : ProductHelperTestLinux { - void SetUp() override { - ProductHelperTestLinux::SetUp(); - } -}; - -SKLTEST_F(SklProductHelperLinux, WhenConfiguringHwInfoThenInformationIsCorrect) { - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - // constant sysInfo/ftr flags - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.VEBoxInfo.Instances.Bits.VEBox0Enabled); - EXPECT_EQ(1u, outHwInfo.gtSystemInfo.VDBoxInfo.Instances.Bits.VDBox0Enabled); - EXPECT_TRUE(outHwInfo.gtSystemInfo.VEBoxInfo.IsValid); - EXPECT_TRUE(outHwInfo.gtSystemInfo.VDBoxInfo.IsValid); - - pInHwInfo.platform.usDeviceID = 0x1902; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x1917; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x0903; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - pInHwInfo.platform.usDeviceID = 0x0903; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); - - auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; - EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); - EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); - EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); -} - -SKLTEST_F(SklProductHelperLinux, GivenWaFlagsWhenConfiguringHwInfoThenInformationIsCorrect) { - - pInHwInfo.platform.usRevId = 1; - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - - pInHwInfo.platform.usRevId = 0; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waCompressedResourceRequiresConstVA21); - - pInHwInfo.platform.usRevId = 5; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waCompressedResourceRequiresConstVA21); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waDisablePerCtxtPreemptionGranularityControl); - - pInHwInfo.platform.usRevId = 6; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waCompressedResourceRequiresConstVA21); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waDisablePerCtxtPreemptionGranularityControl); - EXPECT_EQ(0u, outHwInfo.workaroundTable.flags.waCSRUncachable); -} - -SKLTEST_F(SklProductHelperLinux, WhenConfiguringHwInfoThenEdramInformationIsCorrect) { - - int ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL(0u, outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(0u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x1926; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x1927; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x192D; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((64u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x193B; - - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((128u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); - - pInHwInfo.platform.usDeviceID = 0x193D; - ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment()); - EXPECT_EQ(0, ret); - EXPECT_EQ_VAL((128u * 1024u), outHwInfo.gtSystemInfo.EdramSizeInKb); - EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram); -} - -template -class SklHwInfoTests : public ::testing::Test { -}; -typedef ::testing::Types sklTestTypes; -TYPED_TEST_SUITE(SklHwInfoTests, sklTestTypes); -TYPED_TEST(SklHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->prepareRootDeviceEnvironments(1); - executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - - DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - - const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo; - - EXPECT_EQ(ret, 0); - EXPECT_GT(gtSystemInfo.EUCount, 0u); - EXPECT_GT(gtSystemInfo.ThreadCount, 0u); - EXPECT_GT(gtSystemInfo.SliceCount, 0u); - EXPECT_GT(gtSystemInfo.SubSliceCount, 0u); - EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u); - EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); - EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated); -} - -TYPED_TEST(SklHwInfoTests, givenGTSystemInfoTypeWhenConfigureHardwareCustomThenSliceCountDontChange) { - HardwareInfo hwInfo = *defaultHwInfo; - auto osInterface = std::unique_ptr(new OSInterface()); - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - - TypeParam::setupHardwareInfo(&hwInfo, false, nullptr); - auto sliceCount = gtSystemInfo.SliceCount; - - auto productHelper = ProductHelper::create(PRODUCT_FAMILY::IGFX_SKYLAKE); - - productHelper->configureHardwareCustom(&hwInfo, osInterface.get()); - EXPECT_EQ(gtSystemInfo.SliceCount, sliceCount); -} diff --git a/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp b/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp deleted file mode 100644 index 08e36070eb..0000000000 --- a/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/execution_environment/execution_environment.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/os_interface/product_helper_tests.h" - -#include "aubstream/product_family.h" -#include "platforms.h" - -using namespace NEO; -using SklProductHelper = ProductHelperTest; - -SKLTEST_F(SklProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - - GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; - gtSystemInfo = {0}; - - uint64_t config = 0xdeadbeef; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); - EXPECT_EQ(0u, gtSystemInfo.SliceCount); - EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); - EXPECT_EQ(0u, gtSystemInfo.EUCount); -} - -SKLTEST_F(SklProductHelper, givenSklProductHelperWhenIsInitBuiltinAsyncSupportedThenReturnTrue) { - EXPECT_TRUE(productHelper->isInitBuiltinAsyncSupported(*defaultHwInfo)); -} - -SKLTEST_F(SklProductHelper, givenBoolWhenCallSklHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { - uint64_t configs[] = { - 0x100030008, - 0x200030008, - 0x300030008, - 0x100020006, - 0x100030006}; - bool boolValue[]{ - true, false}; - - HardwareInfo hwInfo = *defaultHwInfo; - GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - FeatureTable &featureTable = hwInfo.featureTable; - WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - PLATFORM &pPlatform = hwInfo.platform; - - for (auto &config : configs) { - for (auto setParamBool : boolValue) { - - gtSystemInfo = {0}; - featureTable = {}; - workaroundTable = {}; - pPlatform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); - - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); - EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidThreadLevelPreempt); - EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); - EXPECT_EQ(setParamBool, featureTable.flags.ftrSVM); - EXPECT_EQ(setParamBool, featureTable.flags.ftrIA32eGfxPTEs); - EXPECT_EQ(setParamBool, featureTable.flags.ftrDisplayYTiling); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrUserModeTranslationTable); - EXPECT_EQ(setParamBool, featureTable.flags.ftrFbc); - EXPECT_EQ(setParamBool, featureTable.flags.ftrTileY); - - EXPECT_EQ(setParamBool, workaroundTable.flags.waSendMIFLUSHBeforeVFE); - EXPECT_EQ(setParamBool, workaroundTable.flags.waDisableLSQCROPERFforOCL); - EXPECT_EQ(setParamBool, workaroundTable.flags.waMsaa8xTileYDepthPitchAlignment); - EXPECT_EQ(setParamBool, workaroundTable.flags.waLosslessCompressionSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.waFbcLinearSurfaceStride); - EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface); - EXPECT_EQ(setParamBool, workaroundTable.flags.waEncryptedEdramOnlyPartials); - EXPECT_EQ(setParamBool, workaroundTable.flags.waDisableEdramForDisplayRT); - EXPECT_EQ(setParamBool, workaroundTable.flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads); - EXPECT_EQ(false, workaroundTable.flags.waCompressedResourceRequiresConstVA21); - EXPECT_EQ(false, workaroundTable.flags.waDisablePerCtxtPreemptionGranularityControl); - EXPECT_EQ(false, workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption); - EXPECT_EQ(false, workaroundTable.flags.waCSRUncachable); - - pPlatform.usRevId = 1; - workaroundTable = {}; - featureTable = {}; - - hardwareInfoSetup[productFamily](&hwInfo, true, config, nullptr); - - EXPECT_EQ(true, workaroundTable.flags.waCompressedResourceRequiresConstVA21); - EXPECT_EQ(true, workaroundTable.flags.waDisablePerCtxtPreemptionGranularityControl); - EXPECT_EQ(true, workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption); - EXPECT_EQ(true, workaroundTable.flags.waCSRUncachable); - } - } -} - -SKLTEST_F(SklProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCorrectMatchIsFound) { - EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::SKL); -} - -SKLTEST_F(SklProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) { - EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); -} - -SKLTEST_F(SklProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) { - EXPECT_EQ(aub_stream::ProductFamily::Skl, productHelper->getAubStreamProductFamily()); -} - -SKLTEST_F(SklProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { - EXPECT_TRUE(productHelper->getScmPropertyThreadArbitrationPolicySupport()); - EXPECT_FALSE(productHelper->getScmPropertyCoherencyRequiredSupport()); - EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport()); - EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport()); - EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport()); - - EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); - - EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport()); - - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport()); - EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport()); - - EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableEuFusionSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport()); - EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport()); - - EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport()); - EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport()); -} diff --git a/shared/test/unit_test/gen9/test_command_encoder_gen9.cpp b/shared/test/unit_test/gen9/test_command_encoder_gen9.cpp deleted file mode 100644 index 1832221c23..0000000000 --- a/shared/test/unit_test/gen9/test_command_encoder_gen9.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/cmdcontainer.h" -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/gen_common/reg_configs_common.h" -#include "shared/source/helpers/blit_commands_helper.h" -#include "shared/source/indirect_heap/heap_size.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using CommandEncoderTest = Test; - -GEN9TEST_F(CommandEncoderTest, WhenProgrammingThenLoadRegisterImmIsUsed) { - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EncodeL3State::encode(cmdContainer, false); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - auto itorLRI = find(commands.begin(), commands.end()); - ASSERT_NE(itorLRI, commands.end()); -} - -GEN9TEST_F(CommandEncoderTest, givenNoSlmThenCorrectMmioIsSet) { - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EncodeL3State::encode(cmdContainer, false); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - auto itorLRI = find(commands.begin(), commands.end()); - ASSERT_NE(itorLRI, commands.end()); - auto cmd = genCmdCast(*itorLRI); - auto isL3Configurable = (PreambleHelper::getL3Config(pDevice->getHardwareInfo(), true) != PreambleHelper::getL3Config(pDevice->getHardwareInfo(), false)); - auto expectedData = isL3Configurable ? 0x80000340u : 0x60000321u; - EXPECT_EQ(cmd->getRegisterOffset(), 0x7034u); - EXPECT_EQ(cmd->getDataDword(), expectedData); -} - -GEN9TEST_F(CommandEncoderTest, givenSlmThenCorrectMmioIsSet) { - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - EncodeL3State::encode(cmdContainer, true); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - auto itorLRI = find(commands.begin(), commands.end()); - ASSERT_NE(itorLRI, commands.end()); - auto cmd = genCmdCast(*itorLRI); - EXPECT_EQ(cmd->getRegisterOffset(), 0x7034u); - EXPECT_EQ(cmd->getDataDword(), 0x60000321u); -} - -using Gen9CommandEncodeTest = testing::Test; - -GEN9TEST_F(Gen9CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) { - EXPECT_FALSE(BlitCommandsHelper::miArbCheckWaRequired()); -} diff --git a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp b/shared/test/unit_test/gen9/test_device_caps_gen9.cpp deleted file mode 100644 index a69353497e..0000000000 --- a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen9DeviceCaps = Test; - -GEN9TEST_F(Gen9DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsSupported) { - EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); -} - -GEN9TEST_F(Gen9DeviceCaps, WhenCheckingCompressionThenItIsDisabled) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedImages); -} - -GEN9TEST_F(Gen9DeviceCaps, givenHwInfoWhenRequestedComputeUnitsUsedForScratchThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - auto &gfxCoreHelper = getHelper(); - - uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice * - hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount; - - EXPECT_EQ(expectedValue, gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment())); - EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch); -} - -GEN9TEST_F(Gen9DeviceCaps, givenHwInfoWhenRequestedMaxFrontEndThreadsThenReturnValidValue) { - const auto &hwInfo = pDevice->getHardwareInfo(); - - EXPECT_EQ(GfxCoreHelper::getMaxThreadsForVfe(hwInfo), pDevice->getDeviceInfo().maxFrontEndThreads); -} - -GEN9TEST_F(Gen9DeviceCaps, givenHwInfoWhenSlmSizeIsRequiredThenReturnCorrectValue) { - EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckSupportCacheFlushAfterWalkerThenFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckBlitterOperationsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingImageSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsImages); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingMediaBlockSupportThenReturnTrue) { - EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsMediaBlock); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingFloatAtomicsSupportThenReturnFalse) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsFloatAtomics); -} - -GEN9TEST_F(Gen9DeviceCaps, givenGen9WhenCheckingCxlTypeThenReturnZero) { - EXPECT_EQ(0u, pDevice->getHardwareInfo().capabilityTable.cxlType); -} \ No newline at end of file diff --git a/shared/test/unit_test/gen9/test_encode_math_gen9.cpp b/shared/test/unit_test/gen9/test_encode_math_gen9.cpp deleted file mode 100644 index d1c306e9f7..0000000000 --- a/shared/test/unit_test/gen9/test_encode_math_gen9.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2020-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_container/command_encoder.h" -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/register_offsets.h" -#include "shared/source/indirect_heap/heap_size.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/fixtures/device_fixture.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using CommandEncoderMathTestGen9 = Test; - -GEN9TEST_F(CommandEncoderMathTestGen9, WhenAppendsAGreaterThanThenPredicateCorrectlySet) { - using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM; - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - using MI_LOAD_REGISTER_REG = typename FamilyType::MI_LOAD_REGISTER_REG; - using MI_MATH = typename FamilyType::MI_MATH; - using MI_MATH_ALU_INST_INLINE = typename FamilyType::MI_MATH_ALU_INST_INLINE; - - CommandContainer cmdContainer; - cmdContainer.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false); - - EncodeMathMMIO::encodeGreaterThanPredicate(cmdContainer, 0xDEADBEEFCAF0u, 17u, false); - - GenCmdList commands; - CmdParse::parseCommandBuffer(commands, ptrOffset(cmdContainer.getCommandStream()->getCpuBase(), 0), cmdContainer.getCommandStream()->getUsed()); - - auto itor = commands.begin(); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMEM = genCmdCast(*itor); - EXPECT_EQ(cmdMEM->getRegisterAddress(), RegisterOffsets::csGprR0); - EXPECT_EQ(cmdMEM->getMemoryAddress(), 0xDEADBEEFCAF0u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdIMM = genCmdCast(*itor); - EXPECT_EQ(cmdIMM->getRegisterOffset(), RegisterOffsets::csGprR1); - EXPECT_EQ(cmdIMM->getDataDword(), 17u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdMATH = genCmdCast(*itor); - EXPECT_EQ(cmdMATH->DW0.BitField.DwordLength, 3u); - - itor = find(itor, commands.end()); - ASSERT_NE(itor, commands.end()); - - auto cmdREG = genCmdCast(*itor); - EXPECT_EQ(cmdREG->getSourceRegisterAddress(), RegisterOffsets::csGprR2); - EXPECT_EQ(cmdREG->getDestinationRegisterAddress(), RegisterOffsets::csPredicateResult); - - auto cmdALU = reinterpret_cast(cmdMATH + 3); - EXPECT_EQ(cmdALU->DW0.BitField.ALUOpcode, - static_cast(AluRegisters::opcodeSub)); -} diff --git a/shared/test/unit_test/gen9/test_preamble_gen9.cpp b/shared/test/unit_test/gen9/test_preamble_gen9.cpp deleted file mode 100644 index d025d10b96..0000000000 --- a/shared/test/unit_test/gen9/test_preamble_gen9.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (C) 2018-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/preemption.h" -#include "shared/source/command_stream/stream_properties.h" -#include "shared/source/command_stream/thread_arbitration_policy.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/gen9/reg_configs.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/helpers/preamble.h" -#include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "shared/test/common/fixtures/preamble_fixture.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" - -using namespace NEO; - -using Gen9Slm = PreambleFixture; - -GEN9TEST_F(Gen9Slm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueAreProgrammed) { - using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM; - LinearStream &cs = linearStream; - uint32_t l3Config = PreambleHelper::getL3Config(*defaultHwInfo, true); - - PreambleHelper::programL3(&cs, l3Config, false); - - parseCommands(cs); - - auto itorLRI = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorLRI); - - const auto &lri = *reinterpret_cast(*itorLRI); - auto registerOffset = L3CNTLRegisterOffset::registerOffset; - EXPECT_EQ(registerOffset, lri.getRegisterOffset()); - EXPECT_EQ(1u, lri.getDataDword() & 1); -} - -using Gen9L3Config = PreambleFixture; - -GEN9TEST_F(Gen9L3Config, GivenNoSlmWhenProgrammingL3ThenProgrammingIsCorrect) { - bool slmUsed = false; - uint32_t l3Config = 0; - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x80000340u, l3Config); - - uint32_t errorDetectionBehaviorControlBit = 1 << 9; - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x80000340u, l3Config); - - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); -} - -GEN9TEST_F(Gen9L3Config, GivenSlmWhenProgrammingL3ThenProgrammingIsCorrect) { - bool slmUsed = true; - uint32_t l3Config = 0; - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x60000321u, l3Config); - - uint32_t errorDetectionBehaviorControlBit = 1 << 9; - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); - - l3Config = getL3ConfigHelper(slmUsed); - EXPECT_EQ(0x60000321u, l3Config); - - EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); -} - -using ThreadArbitration = PreambleFixture; -GEN9TEST_F(ThreadArbitration, GivenDefaultWhenProgrammingPreambleThenArbitrationPolicyIsRoundRobin) { - auto &gfxCoreHelper = getHelper(); - EXPECT_EQ(ThreadArbitrationPolicy::RoundRobin, gfxCoreHelper.getDefaultThreadArbitrationPolicy()); -} - -GEN9TEST_F(ThreadArbitration, whenGetSupportedThreadArbitrationPoliciesIsCalledThenAgeBasedAndRoundRobinAreReturned) { - auto supportedPolicies = PreambleHelper::getSupportedThreadArbitrationPolicies(); - - EXPECT_EQ(2u, supportedPolicies.size()); - EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(), - supportedPolicies.end(), - ThreadArbitrationPolicy::AgeBased)); - EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(), - supportedPolicies.end(), - ThreadArbitrationPolicy::RoundRobin)); -} - -GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsCorrect) { - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - testWaTable->flags.waSendMIFLUSHBeforeVFE = 0; - LinearStream &cs = linearStream; - auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::renderCompute); - StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); - - parseCommands(cs); - - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - const auto &pc = *reinterpret_cast(*itorPC); - EXPECT_FALSE(pc.getRenderTargetCacheFlushEnable()); - EXPECT_FALSE(pc.getDepthCacheFlushEnable()); - EXPECT_FALSE(pc.getDcFlushEnable()); - EXPECT_EQ(1u, pc.getCommandStreamerStallEnable()); -} - -GEN9TEST_F(PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCorrect) { - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - testWaTable->flags.waSendMIFLUSHBeforeVFE = 1; - LinearStream &cs = linearStream; - auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::renderCompute); - StreamProperties emptyProperties{}; - PreambleHelper::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 168u, emptyProperties); - - parseCommands(cs); - - auto itorPC = find(cmdList.begin(), cmdList.end()); - ASSERT_NE(cmdList.end(), itorPC); - - const auto &pc = *reinterpret_cast(*itorPC); - EXPECT_TRUE(pc.getRenderTargetCacheFlushEnable()); - EXPECT_TRUE(pc.getDepthCacheFlushEnable()); - EXPECT_TRUE(pc.getDcFlushEnable()); - EXPECT_EQ(1u, pc.getCommandStreamerStallEnable()); -} - -using Gen9PreamblePipelineSelect = PreambleFixture; -GEN9TEST_F(Gen9PreamblePipelineSelect, WhenPreambleRetrievesPipelineSelectSizeThenValueIsCorrect) { - using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT; - size_t actualVal = PreambleHelper::getCmdSizeForPipelineSelect(pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(sizeof(PIPELINE_SELECT), actualVal); -} diff --git a/shared/test/unit_test/gen9/test_preemption_gen9.cpp b/shared/test/unit_test/gen9/test_preemption_gen9.cpp deleted file mode 100644 index cda31e330b..0000000000 --- a/shared/test/unit_test/gen9/test_preemption_gen9.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2018-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/built_ins/sip.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/gen9/hw_cmds_base.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/mocks/mock_command_stream_receiver.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/unit_test/fixtures/preemption_fixture.h" - -#include "patch_shared.h" - -using namespace NEO; - -template <> -PreemptionTestHwDetails getPreemptionTestHwDetails() { - PreemptionTestHwDetails ret; - ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false); - ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false); - ret.modeToRegValueMap[PreemptionMode::MidThread] = DwordBuilder::build(2, true, false) | DwordBuilder::build(1, true, false); - ret.defaultRegValue = ret.modeToRegValueMap[PreemptionMode::MidBatch]; - ret.regAddress = 0x2580u; - return ret; -} - -using Gen9PreemptionTests = DevicePreemptionTests; - -GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNotProgramPreamble) { - device->setPreemptionMode(PreemptionMode::ThreadGroup); - - size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize(*device, false); - EXPECT_EQ(0U, requiredSize); - - LinearStream cmdStream{nullptr, 0}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr); - EXPECT_EQ(0U, cmdStream.getUsed()); -} - -GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIsProgrammed) { - using STATE_SIP = typename FamilyType::STATE_SIP; - - device->setPreemptionMode(PreemptionMode::MidThread); - executionEnvironment->DisableMidThreadPreemption = 0; - - size_t minCsrSize = device->getHardwareInfo().gtSystemInfo.CsrSizeInMb * MemoryConstants::megaByte; - uint64_t minCsrAlignment = 2 * 256 * MemoryConstants::kiloByte; - MockGraphicsAllocation csrSurface((void *)minCsrAlignment, minCsrSize); - - size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize(*device, false); - size_t expectedPreambleSize = sizeof(STATE_SIP); - EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize); - - StackVec streamStorage(requiredCmdStreamSize); - ASSERT_LE(requiredCmdStreamSize, streamStorage.size()); - - LinearStream cmdStream{streamStorage.begin(), streamStorage.size()}; - PreemptionHelper::programStateSip(cmdStream, *device, nullptr); - - HardwareParse hwParsePreamble; - hwParsePreamble.parseCommands(cmdStream); - - auto stateSipCmd = hwParsePreamble.getCommand(); - ASSERT_NE(nullptr, stateSipCmd); - EXPECT_EQ(SipKernel::getSipKernel(*device, nullptr).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer()); -} - -GEN9TEST_F(Gen9PreemptionTests, givenMidBatchPreemptionWhenProgrammingWaCmdsBeginThenExpectNoCmds) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::MidBatch); - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN9TEST_F(Gen9PreemptionTests, givenThreadGroupPreemptionNoWaSetWhenProgrammingWaCmdsBeginThenExpectNoCmd) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN9TEST_F(Gen9PreemptionTests, givenThreadGroupPreemptionWaSetWhenProgrammingWaCmdsBeginThenExpectCmd) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t expectedSize = 2 * sizeof(MI_LOAD_REGISTER_IMM); - device->setPreemptionMode(PreemptionMode::ThreadGroup); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionNoWaSetWhenProgrammingWaCmdsBeginThenExpectNoCmd) { - size_t expectedSize = 0; - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = false; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionWaSetWhenProgrammingWaCmdsBeginThenExpectCmd) { - typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - size_t expectedSize = 2 * sizeof(MI_LOAD_REGISTER_IMM); - device->setPreemptionMode(PreemptionMode::MidThread); - device->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waModifyVFEStateAfterGPGPUPreemption = true; - size_t size = PreemptionHelper::getPreemptionWaCsSize(*device); - EXPECT_EQ(expectedSize, size); -} - -GEN9TEST_F(Gen9PreemptionTests, givenInterfaceDescriptorDataWhenAnyPreemptionModeThenNoChange) { - using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; - - INTERFACE_DESCRIPTOR_DATA idd; - INTERFACE_DESCRIPTOR_DATA iddArg; - int ret; - - idd = FamilyType::cmdInitInterfaceDescriptorData; - iddArg = FamilyType::cmdInitInterfaceDescriptorData; - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::Disabled); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidBatch); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::ThreadGroup); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); - - PreemptionHelper::programInterfaceDescriptorDataPreemption(&iddArg, PreemptionMode::MidThread); - ret = memcmp(&idd, &iddArg, sizeof(INTERFACE_DESCRIPTOR_DATA)); - EXPECT_EQ(0, ret); -} - -GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionModeWhenStateSipIsProgrammedThenSipEqualsSipAllocationGpuAddressToPatch) { - using STATE_SIP = typename FamilyType::STATE_SIP; - auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - - mockDevice->setPreemptionMode(PreemptionMode::MidThread); - auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize(*mockDevice, false); - - StackVec preemptionBuffer; - preemptionBuffer.resize(cmdSizePreemptionMidThread); - LinearStream preemptionStream(&*preemptionBuffer.begin(), preemptionBuffer.size()); - - PreemptionHelper::programStateSip(preemptionStream, *mockDevice, nullptr); - - HardwareParse hwParserOnlyPreemption; - hwParserOnlyPreemption.parseCommands(preemptionStream, 0); - auto cmd = hwParserOnlyPreemption.getCommand(); - EXPECT_NE(nullptr, cmd); - - EXPECT_EQ(SipKernel::getSipKernel(*mockDevice, nullptr).getSipAllocation()->getGpuAddressToPatch(), cmd->getSystemInstructionPointer()); -} diff --git a/shared/test/unit_test/gen9/test_sample_gen9.cpp b/shared/test/unit_test/gen9/test_sample_gen9.cpp deleted file mode 100644 index 6ad8904356..0000000000 --- a/shared/test/unit_test/gen9/test_sample_gen9.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/hw_test.h" - -using namespace NEO; - -using Gen9OnlyTest = ::testing::Test; - -GEN9TEST_F(Gen9OnlyTest, WhenGettingRenderCoreFamilyThenGen9CoreIsReturned) { - EXPECT_EQ(IGFX_GEN9_CORE, defaultHwInfo->platform.eRenderCoreFamily); -} diff --git a/shared/test/unit_test/gen9/windows/CMakeLists.txt b/shared/test/unit_test/gen9/windows/CMakeLists.txt deleted file mode 100644 index ed5ab9f553..0000000000 --- a/shared/test/unit_test/gen9/windows/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (C) 2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(WIN32) - target_sources(neo_shared_tests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/gmm_callbacks_tests_gen9.cpp - ) - add_subdirectories() -endif() diff --git a/shared/test/unit_test/gen9/windows/gmm_callbacks_tests_gen9.cpp b/shared/test/unit_test/gen9/windows/gmm_callbacks_tests_gen9.cpp deleted file mode 100644 index 560871554d..0000000000 --- a/shared/test/unit_test/gen9/windows/gmm_callbacks_tests_gen9.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/source/helpers/windows/gmm_callbacks.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -typedef ::testing::Test Gen9GmmCallbacksTests; - -GEN9TEST_F(Gen9GmmCallbacksTests, GivenDefaultWhenNotifyingAubCaptureThenDeviceCallbackIsNotSupported) { - EXPECT_EQ(0, DeviceCallbacks::notifyAubCapture(nullptr, 0, 0, false)); -} - -GEN9TEST_F(Gen9GmmCallbacksTests, GivenDefaultWhenWritingL3AddressThenTtCallbackIsNotSupported) { - EXPECT_EQ(0, TTCallbacks::writeL3Address(nullptr, 1, 2)); -} diff --git a/target_aub_tests/gen11/CMakeLists.txt b/target_aub_tests/gen11/CMakeLists.txt deleted file mode 100644 index deee292038..0000000000 --- a/target_aub_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2019-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - add_subdirectories() -endif() diff --git a/target_aub_tests/gen11/icllp/CMakeLists.txt b/target_aub_tests/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 5409f6edef..0000000000 --- a/target_aub_tests/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ICLLP) - set(aub_test_config "icllp/1/8/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_aub_test_target.cmake) -endif() diff --git a/target_aub_tests/gen8/CMakeLists.txt b/target_aub_tests/gen8/CMakeLists.txt deleted file mode 100644 index faba1c0828..0000000000 --- a/target_aub_tests/gen8/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - add_subdirectories() -endif() diff --git a/target_aub_tests/gen8/bdw/CMakeLists.txt b/target_aub_tests/gen8/bdw/CMakeLists.txt deleted file mode 100644 index bccb122390..0000000000 --- a/target_aub_tests/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - set(aub_test_config "bdw/1/3/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_aub_test_target.cmake) -endif() diff --git a/target_aub_tests/gen9/CMakeLists.txt b/target_aub_tests/gen9/CMakeLists.txt deleted file mode 100644 index 576c812d5c..0000000000 --- a/target_aub_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - add_subdirectories() -endif() diff --git a/target_aub_tests/gen9/bxt/CMakeLists.txt b/target_aub_tests/gen9/bxt/CMakeLists.txt deleted file mode 100644 index 71d4c2ee0c..0000000000 --- a/target_aub_tests/gen9/bxt/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BXT) - set(aub_test_config "bxt/1/3/6/0") - include(${NEO_SOURCE_DIR}/cmake/run_aub_test_target.cmake) -endif() diff --git a/target_aub_tests/gen9/skl/CMakeLists.txt b/target_aub_tests/gen9/skl/CMakeLists.txt deleted file mode 100644 index 4cb2d54cc6..0000000000 --- a/target_aub_tests/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2018-2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(aub_test_config "skl/1/3/8/9") - include(${NEO_SOURCE_DIR}/cmake/run_aub_test_target.cmake) -endif() diff --git a/target_unit_tests/gen11/CMakeLists.txt b/target_unit_tests/gen11/CMakeLists.txt deleted file mode 100644 index f0d6cef0f7..0000000000 --- a/target_unit_tests/gen11/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN11) - add_subdirectories() -endif() diff --git a/target_unit_tests/gen11/ehl/CMakeLists.txt b/target_unit_tests/gen11/ehl/CMakeLists.txt deleted file mode 100644 index 267c136236..0000000000 --- a/target_unit_tests/gen11/ehl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_EHL) - set(unit_test_config "ehl/1/4/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen11/icllp/CMakeLists.txt b/target_unit_tests/gen11/icllp/CMakeLists.txt deleted file mode 100644 index 7e6ca5b3c8..0000000000 --- a/target_unit_tests/gen11/icllp/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ICLLP) - set(unit_test_config "icllp/1/8/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen11/lkf/CMakeLists.txt b/target_unit_tests/gen11/lkf/CMakeLists.txt deleted file mode 100644 index f73571a673..0000000000 --- a/target_unit_tests/gen11/lkf/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_LKF) - set(unit_test_config "lkf/1/8/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen8/CMakeLists.txt b/target_unit_tests/gen8/CMakeLists.txt deleted file mode 100644 index 0265f5a14f..0000000000 --- a/target_unit_tests/gen8/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN8) - add_subdirectories() -endif() diff --git a/target_unit_tests/gen8/bdw/CMakeLists.txt b/target_unit_tests/gen8/bdw/CMakeLists.txt deleted file mode 100644 index 5f28804d78..0000000000 --- a/target_unit_tests/gen8/bdw/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BDW) - set(unit_test_config "bdw/1/3/8/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen9/CMakeLists.txt b/target_unit_tests/gen9/CMakeLists.txt deleted file mode 100644 index ccdc6fabb6..0000000000 --- a/target_unit_tests/gen9/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GEN9) - add_subdirectories() -endif() diff --git a/target_unit_tests/gen9/bxt/CMakeLists.txt b/target_unit_tests/gen9/bxt/CMakeLists.txt deleted file mode 100644 index d69cdbdd70..0000000000 --- a/target_unit_tests/gen9/bxt/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_BXT) - set(unit_test_config "bxt/1/3/6/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen9/cfl/CMakeLists.txt b/target_unit_tests/gen9/cfl/CMakeLists.txt deleted file mode 100644 index 6e7549ffed..0000000000 --- a/target_unit_tests/gen9/cfl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_CFL) - set(unit_test_config "cfl/1/3/6/9") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen9/glk/CMakeLists.txt b/target_unit_tests/gen9/glk/CMakeLists.txt deleted file mode 100644 index 8ee10a904c..0000000000 --- a/target_unit_tests/gen9/glk/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_GLK) - set(unit_test_config "glk/1/3/6/0") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen9/kbl/CMakeLists.txt b/target_unit_tests/gen9/kbl/CMakeLists.txt deleted file mode 100644 index 4f4b7ffa9c..0000000000 --- a/target_unit_tests/gen9/kbl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_KBL) - set(unit_test_config "kbl/1/3/6/9") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif() diff --git a/target_unit_tests/gen9/skl/CMakeLists.txt b/target_unit_tests/gen9/skl/CMakeLists.txt deleted file mode 100644 index 338a2181a6..0000000000 --- a/target_unit_tests/gen9/skl/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_SKL) - set(unit_test_config "skl/1/3/8/9") - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif()