mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Cleanup includes 39
Cleaned up files: shared/source/command_container/command_encoder.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8d66517c79
commit
49837b7bb5
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/helpers/cache_flush_xehp_and_later.inl"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_container/cmdcontainer.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/device/device.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#include "shared/source/command_stream/scratch_space_controller.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/cache_policy.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/cache_flush_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
|
||||
#include "opencl/extensions/public/cl_ext_private.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw_base.inl"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "shared/source/helpers/flat_batch_buffer_helper.h"
|
||||
#include "shared/source/helpers/flush_stamp.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/surface.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
#include "shared/source/helpers/completion_stamp.h"
|
||||
#include "shared/source/helpers/map_operation_type.h"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/helpers/timestamp_packet_container.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/source/utilities/iflist.h"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/bit_helpers.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/aux_translation.h"
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/memory_manager/surface.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_stream/scratch_space_controller.h"
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/helpers/timestamp_packet_container.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/utilities/arrayref.h"
|
||||
#include "shared/test/common/mocks/mock_csr.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/image/image_surface_state.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/image/image_surface_state.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#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/hw_helper.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "opencl/test/unit_test/helpers/hardware_commands_helper_tests.h"
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/address_patch.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
|
||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/test/common/mocks/mock_csr.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/program/kernel_info.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/address_patch.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/array_count.h"
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/state_base_address.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/state_base_address.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2019-2022 Intel Corporation
|
||||
# Copyright (C) 2019-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -15,6 +15,7 @@ set(NEO_CORE_COMMAND_CONTAINER
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/encode_alu_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/encode_compute_mode_bdw_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/encode_compute_mode_tgllp_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/encode_surface_state.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/encode_surface_state_args_base.h
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "shared/source/command_container/cmdcontainer.h"
|
||||
#include "shared/source/command_container/encode_alu_helper.h"
|
||||
#include "shared/source/debugger/debugger.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/source/kernel/kernel_arg_descriptor.h"
|
||||
|
||||
@@ -332,46 +331,6 @@ struct EncodeStoreMMIO {
|
||||
static void appendFlags(MI_STORE_REGISTER_MEM *storeRegMem, bool workloadPartition);
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeSurfaceState {
|
||||
using R_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename R_SURFACE_STATE::SURFACE_FORMAT;
|
||||
using AUXILIARY_SURFACE_MODE = typename R_SURFACE_STATE::AUXILIARY_SURFACE_MODE;
|
||||
using COHERENCY_TYPE = typename R_SURFACE_STATE::COHERENCY_TYPE;
|
||||
|
||||
static void encodeBuffer(EncodeSurfaceStateArgs &args);
|
||||
static void encodeExtraBufferParams(EncodeSurfaceStateArgs &args);
|
||||
static void encodeImplicitScalingParams(const EncodeSurfaceStateArgs &args);
|
||||
static void encodeExtraCacheSettings(R_SURFACE_STATE *surfaceState, const EncodeSurfaceStateArgs &args);
|
||||
static void appendBufferSurfaceState(EncodeSurfaceStateArgs &args);
|
||||
|
||||
static constexpr uintptr_t getSurfaceBaseAddressAlignmentMask() {
|
||||
return ~(getSurfaceBaseAddressAlignment() - 1);
|
||||
}
|
||||
|
||||
static constexpr uintptr_t getSurfaceBaseAddressAlignment() { return 4; }
|
||||
|
||||
static void getSshAlignedPointer(uintptr_t &ptr, size_t &offset);
|
||||
static bool doBindingTablePrefetch();
|
||||
static bool isBindingTablePrefetchPreferred();
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, size_t bindingTableCount,
|
||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||
size_t numberOfBindingTableStates, size_t offsetOfBindingTable);
|
||||
|
||||
static void appendImageCompressionParams(R_SURFACE_STATE *surfaceState, GraphicsAllocation *allocation, GmmHelper *gmmHelper,
|
||||
bool imageFromBuffer, GMM_YUV_PLANE_ENUM plane);
|
||||
static void setCoherencyType(R_SURFACE_STATE *surfaceState, COHERENCY_TYPE coherencyType);
|
||||
static void setBufferAuxParamsForCCS(R_SURFACE_STATE *surfaceState);
|
||||
static void setImageAuxParamsForCCS(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static bool isAuxModeEnabled(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void setAuxParamsForMCSCCS(R_SURFACE_STATE *surfaceState);
|
||||
static void setClearColorParams(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void setFlagsForMediaCompression(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void disableCompressionFlags(R_SURFACE_STATE *surfaceState);
|
||||
static void appendParamsForImageFromBuffer(R_SURFACE_STATE *surfaceState);
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeComputeMode {
|
||||
static size_t getCmdSizeForComputeMode(const HardwareInfo &hwInfo, bool hasSharedHandles, bool isRcs);
|
||||
@@ -383,21 +342,6 @@ struct EncodeComputeMode {
|
||||
static void adjustPipelineSelect(CommandContainer &container, const NEO::KernelDescriptor &kernelDescriptor);
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeWA {
|
||||
static void encodeAdditionalPipelineSelect(LinearStream &stream, const PipelineSelectArgs &args, bool is3DPipeline,
|
||||
const HardwareInfo &hwInfo, bool isRcs);
|
||||
static size_t getAdditionalPipelineSelectSize(Device &device, bool isRcs);
|
||||
|
||||
static void addPipeControlPriorToNonPipelinedStateCommand(LinearStream &commandStream, PipeControlArgs args,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs);
|
||||
static void setAdditionalPipeControlFlagsForNonPipelineStateCommand(PipeControlArgs &args);
|
||||
|
||||
static void addPipeControlBeforeStateBaseAddress(LinearStream &commandStream, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlushRequired);
|
||||
|
||||
static void adjustCompressionFormatForPlanarImage(uint32_t &compressionFormat, GMM_YUV_PLANE_ENUM plane);
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeSempahore {
|
||||
using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/debugger/debugger_l0.h"
|
||||
#include "shared/source/device/device.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/definitions/encode_surface_state_args_base.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
79
shared/source/command_container/encode_surface_state.h
Normal file
79
shared/source/command_container/encode_surface_state.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
|
||||
namespace NEO {
|
||||
class Device;
|
||||
class Gmm;
|
||||
class GmmHelper;
|
||||
class GraphicsAllocation;
|
||||
class IndirectHeap;
|
||||
class LinearStream;
|
||||
struct EncodeSurfaceStateArgs;
|
||||
struct HardwareInfo;
|
||||
struct PipeControlArgs;
|
||||
struct PipelineSelectArgs;
|
||||
struct RootDeviceEnvironment;
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeSurfaceState {
|
||||
using R_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename R_SURFACE_STATE::SURFACE_FORMAT;
|
||||
using AUXILIARY_SURFACE_MODE = typename R_SURFACE_STATE::AUXILIARY_SURFACE_MODE;
|
||||
using COHERENCY_TYPE = typename R_SURFACE_STATE::COHERENCY_TYPE;
|
||||
|
||||
static void encodeBuffer(EncodeSurfaceStateArgs &args);
|
||||
static void encodeExtraBufferParams(EncodeSurfaceStateArgs &args);
|
||||
static void encodeImplicitScalingParams(const EncodeSurfaceStateArgs &args);
|
||||
static void encodeExtraCacheSettings(R_SURFACE_STATE *surfaceState, const EncodeSurfaceStateArgs &args);
|
||||
static void appendBufferSurfaceState(EncodeSurfaceStateArgs &args);
|
||||
|
||||
static constexpr uintptr_t getSurfaceBaseAddressAlignmentMask() {
|
||||
return ~(getSurfaceBaseAddressAlignment() - 1);
|
||||
}
|
||||
|
||||
static constexpr uintptr_t getSurfaceBaseAddressAlignment() { return 4; }
|
||||
|
||||
static void getSshAlignedPointer(uintptr_t &ptr, size_t &offset);
|
||||
static bool doBindingTablePrefetch();
|
||||
static bool isBindingTablePrefetchPreferred();
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, size_t bindingTableCount,
|
||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||
size_t numberOfBindingTableStates, size_t offsetOfBindingTable);
|
||||
|
||||
static void appendImageCompressionParams(R_SURFACE_STATE *surfaceState, GraphicsAllocation *allocation, GmmHelper *gmmHelper,
|
||||
bool imageFromBuffer, GMM_YUV_PLANE_ENUM plane);
|
||||
static void setCoherencyType(R_SURFACE_STATE *surfaceState, COHERENCY_TYPE coherencyType);
|
||||
static void setBufferAuxParamsForCCS(R_SURFACE_STATE *surfaceState);
|
||||
static void setImageAuxParamsForCCS(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static bool isAuxModeEnabled(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void setAuxParamsForMCSCCS(R_SURFACE_STATE *surfaceState);
|
||||
static void setClearColorParams(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void setFlagsForMediaCompression(R_SURFACE_STATE *surfaceState, Gmm *gmm);
|
||||
static void disableCompressionFlags(R_SURFACE_STATE *surfaceState);
|
||||
static void appendParamsForImageFromBuffer(R_SURFACE_STATE *surfaceState);
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct EncodeWA {
|
||||
static void encodeAdditionalPipelineSelect(LinearStream &stream, const PipelineSelectArgs &args, bool is3DPipeline,
|
||||
const HardwareInfo &hwInfo, bool isRcs);
|
||||
static size_t getAdditionalPipelineSelectSize(Device &device, bool isRcs);
|
||||
|
||||
static void addPipeControlPriorToNonPipelinedStateCommand(LinearStream &commandStream, PipeControlArgs args,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs);
|
||||
static void setAdditionalPipeControlFlagsForNonPipelineStateCommand(PipeControlArgs &args);
|
||||
|
||||
static void addPipeControlBeforeStateBaseAddress(LinearStream &commandStream, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlushRequired);
|
||||
|
||||
static void adjustCompressionFormatForPlanarImage(uint32_t &compressionFormat, GMM_YUV_PLANE_ENUM plane);
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||
#include "shared/source/command_stream/experimental_command_buffer.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||
#include "shared/source/command_stream/device_command_stream.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
|
||||
@@ -78,16 +78,6 @@ class TimestampPackets : public TagTypeBase {
|
||||
static_assert(((4 * TimestampPacketSizeControl::preferredPacketCount) * sizeof(uint32_t)) == sizeof(TimestampPackets<uint32_t>),
|
||||
"This structure is consumed by GPU and has to follow specific restrictions for padding and size");
|
||||
|
||||
struct TimestampPacketDependencies : public NonCopyableClass {
|
||||
TimestampPacketContainer cacheFlushNodes;
|
||||
TimestampPacketContainer previousEnqueueNodes;
|
||||
TimestampPacketContainer barrierNodes;
|
||||
TimestampPacketContainer auxToNonAuxNodes;
|
||||
TimestampPacketContainer nonAuxToAuxNodes;
|
||||
|
||||
void moveNodesToNewContainer(TimestampPacketContainer ×tampPacketContainer);
|
||||
};
|
||||
|
||||
struct TimestampPacketHelper {
|
||||
static uint64_t getContextEndGpuAddress(const TagNodeBase ×tampPacketNode) {
|
||||
return timestampPacketNode.getGpuAddress() + timestampPacketNode.getContextEndOffset();
|
||||
|
||||
@@ -30,4 +30,14 @@ class TimestampPacketContainer : public NonCopyableClass {
|
||||
StackVec<TagNodeBase *, 32u> timestampPacketNodes;
|
||||
};
|
||||
|
||||
struct TimestampPacketDependencies : public NonCopyableClass {
|
||||
TimestampPacketContainer cacheFlushNodes;
|
||||
TimestampPacketContainer previousEnqueueNodes;
|
||||
TimestampPacketContainer barrierNodes;
|
||||
TimestampPacketContainer auxToNonAuxNodes;
|
||||
TimestampPacketContainer nonAuxToAuxNodes;
|
||||
|
||||
void moveNodesToNewContainer(TimestampPacketContainer ×tampPacketContainer);
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/command_container/cmdcontainer.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.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"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/bindless_heaps_helper.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h"
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_container/walker_partition_xehp_and_later.h"
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/bindless_heaps_helper.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/mocks/mock_debugger.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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/test_macros/header/per_product_test_definitions.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/image/image_surface_state_fixture.h"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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/test_macros/header/per_product_test_definitions.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#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"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||
|
||||
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "shared/test/unit_test/helpers/state_base_address_tests.h"
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/image/image_surface_state_fixture.h"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.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"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.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"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
|
||||
Reference in New Issue
Block a user