mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
refactor: add new parameter to use dedicated memory to initialize surface state
Related-To: NEO-15374 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
74f04acb88
commit
71659807c4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,6 +18,7 @@ struct EncodeSurfaceStateArgsBase {
|
||||
size_t size = 0u;
|
||||
|
||||
void *outMemory = nullptr;
|
||||
void *inTemplateMemory = nullptr;
|
||||
|
||||
GraphicsAllocation *allocation = nullptr;
|
||||
GmmHelper *gmmHelper = nullptr;
|
||||
|
||||
@@ -684,7 +684,11 @@ template <typename GfxFamily>
|
||||
void GfxCoreHelperHw<GfxFamily>::encodeBufferSurfaceState(EncodeSurfaceStateArgs &args) const {
|
||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
auto surfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(args.outMemory);
|
||||
*surfaceState = GfxFamily::cmdInitRenderSurfaceState;
|
||||
if (args.inTemplateMemory != nullptr) {
|
||||
*surfaceState = *reinterpret_cast<RENDER_SURFACE_STATE *>(args.inTemplateMemory);
|
||||
} else {
|
||||
*surfaceState = GfxFamily::cmdInitRenderSurfaceState;
|
||||
}
|
||||
|
||||
EncodeSurfaceState<GfxFamily>::encodeBuffer(args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user