Add new function append3dStateBtd

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2022-02-02 17:40:00 +00:00
committed by Compute-Runtime-Automation
parent 1671e0a1a7
commit dd63f1d2f9
4 changed files with 8 additions and 2 deletions

View File

@@ -384,6 +384,7 @@ struct EncodeMiArbCheck {
template <typename GfxFamily>
struct EncodeEnableRayTracing {
static void programEnableRayTracing(LinearStream &commandStream, GraphicsAllocation &backBuffer);
static void append3dStateBtd(void *ptr3dStateBtd);
};
template <typename GfxFamily>

View File

@@ -841,4 +841,7 @@ inline void EncodeStoreMemory<Family>::programStoreDataImm(LinearStream &command
workloadPartitionOffset);
}
template <typename GfxFamily>
void EncodeEnableRayTracing<GfxFamily>::append3dStateBtd(void *ptr3dStateBtd) {}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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<GfxFamily>::programEnableRayTracing(LinearStream &co
auto cmd = GfxFamily::cmd3dStateBtd;
cmd.getBtdStateBody().setPerDssMemoryBackedBufferSize(static_cast<typename GfxFamily::_3DSTATE_BTD_BODY::PER_DSS_MEMORY_BACKED_BUFFER_SIZE>(RayTracingHelper::getMemoryBackedFifoSizeToPatch()));
cmd.getBtdStateBody().setMemoryBackedBufferBasePointer(backBuffer.getGpuAddress());
append3dStateBtd(&cmd);
*commandStream.getSpaceForCmd<typename GfxFamily::_3DSTATE_BTD>() = cmd;
}