From dd63f1d2f9340a198d19beee8023f0154edffafb Mon Sep 17 00:00:00 2001 From: Katarzyna Cencelewska Date: Wed, 2 Feb 2022 17:40:00 +0000 Subject: [PATCH] Add new function append3dStateBtd Signed-off-by: Katarzyna Cencelewska --- shared/source/command_container/command_encoder.h | 1 + shared/source/command_container/command_encoder.inl | 3 +++ .../command_encoder_raytracing_xehp_and_later.inl | 2 +- .../command_encoder_xe_hpg_core_and_later.inl | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 9921c0e50c..b98c3a45b3 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -384,6 +384,7 @@ struct EncodeMiArbCheck { template struct EncodeEnableRayTracing { static void programEnableRayTracing(LinearStream &commandStream, GraphicsAllocation &backBuffer); + static void append3dStateBtd(void *ptr3dStateBtd); }; template diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 49baf3513e..12f5e0548c 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -841,4 +841,7 @@ inline void EncodeStoreMemory::programStoreDataImm(LinearStream &command workloadPartitionOffset); } +template +void EncodeEnableRayTracing::append3dStateBtd(void *ptr3dStateBtd) {} + } // namespace NEO diff --git a/shared/source/command_container/command_encoder_raytracing_xehp_and_later.inl b/shared/source/command_container/command_encoder_raytracing_xehp_and_later.inl index c7616b2b63..956c6b497c 100644 --- a/shared/source/command_container/command_encoder_raytracing_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_raytracing_xehp_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/source/command_container/command_encoder_xe_hpg_core_and_later.inl b/shared/source/command_container/command_encoder_xe_hpg_core_and_later.inl index d2bddceaaa..2f237ef6fe 100644 --- a/shared/source/command_container/command_encoder_xe_hpg_core_and_later.inl +++ b/shared/source/command_container/command_encoder_xe_hpg_core_and_later.inl @@ -1,11 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_container/command_encoder.h" +#include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" #include "hw_cmds.h" @@ -25,6 +26,7 @@ void EncodeEnableRayTracing::programEnableRayTracing(LinearStream &co auto cmd = GfxFamily::cmd3dStateBtd; cmd.getBtdStateBody().setPerDssMemoryBackedBufferSize(static_cast(RayTracingHelper::getMemoryBackedFifoSizeToPatch())); cmd.getBtdStateBody().setMemoryBackedBufferBasePointer(backBuffer.getGpuAddress()); + append3dStateBtd(&cmd); *commandStream.getSpaceForCmd() = cmd; }