performance: do not capture and mutate stateful arguments in default mode

Related-To: NEO-13916

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-07-18 12:04:04 +00:00
committed by Compute-Runtime-Automation
parent baab16c394
commit 259883c9c7
4 changed files with 32 additions and 18 deletions

View File

@@ -421,7 +421,7 @@ ze_result_t Variable::setBufferVariable(size_t size, const void *argVal) {
}
if (argValue != nullptr) {
cmdList->setBufferSurfaceState(reinterpret_cast<void *>(gpuAddress), newBufferAlloc, this);
mutateStatefulBufferArg(gpuAddress, newBufferAlloc);
desc.state = State::initialized;
}
updateAllocationResidency(oldBufferAlloc, newBufferAlloc);

View File

@@ -45,6 +45,7 @@ struct InterfaceVariableDescriptor {
bool isConstSize = false;
bool isStageCommit = false;
bool immediateValueChunks = false;
bool api = false;
};
enum VariableType : uint8_t {
@@ -84,6 +85,7 @@ struct VariableDescriptor {
bool isStageCommit = false;
bool commitRequired = false;
bool immediateValueChunks = false;
bool apiVariable = false;
};
struct Variable : public VariableHandle {
@@ -264,6 +266,7 @@ struct Variable : public VariableHandle {
void setDescExperimentalValues(const InterfaceVariableDescriptor *ifaceVarDesc);
bool hasKernelArgCorrectType(const NEO::ArgDescriptor &arg);
void mutateStatefulBufferArg(GpuAddress bufferGpuAddress, NEO::GraphicsAllocation *bufferAllocation);
ze_result_t setBufferVariable(size_t size, const void *argVal);
ze_result_t setValueVariable(size_t size, const void *argVal);