mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
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:
committed by
Compute-Runtime-Automation
parent
baab16c394
commit
259883c9c7
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user