Files
compute-runtime/opencl/source/mem_obj/buffer_base.inl
Fabian Zwolinski 6fca8ee195 refactor: Remove SourceLevelDebugger
Removed:
- SourceLevelDebugger (with tests)
- DebuggerLibrary
- DebuggerLibraryRestore
- debuggerSupported field from hwInfo.capabilityTable
- HasSourceLevelDebuggerSupport matcher
- ExperimentalEnableSourceLevelDebugger debug var
- EnableMockSourceLevelDebugger debug var
- DebuggerOptDisable debug var
- lib_names.h.in file
- third_party/source_level_debugger/igfx_debug_interchange_types.h

Related-To: NEO-7213
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-08-10 11:14:02 +02:00

56 lines
2.1 KiB
C++

/*
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_container/encode_surface_state.h"
#include "shared/source/command_container/implicit_scaling.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/bit_helpers.h"
#include "shared/source/helpers/populate_factory.h"
#include "opencl/source/mem_obj/buffer.h"
#include "encode_surface_state_args.h"
namespace NEO {
union SURFACE_STATE_BUFFER_LENGTH {
uint32_t length;
struct SurfaceState {
uint32_t width : 7;
uint32_t height : 14;
uint32_t depth : 11;
} surfaceState;
};
template <typename GfxFamily>
void BufferHw<GfxFamily>::setArgStateful(void *memory, bool forceNonAuxMode, bool disableL3, bool alignSizeForAuxTranslation,
bool isReadOnlyArgument, const Device &device, bool useGlobalAtomics, bool areMultipleSubDevicesInContext) {
auto rootDeviceIndex = device.getRootDeviceIndex();
auto graphicsAllocation = multiGraphicsAllocation.getGraphicsAllocation(rootDeviceIndex);
const auto isReadOnly = isValueSet(getFlags(), CL_MEM_READ_ONLY) || isReadOnlyArgument;
auto isDebuggerActive = device.getDebugger() != nullptr;
NEO::EncodeSurfaceStateArgs args;
args.outMemory = memory;
args.graphicsAddress = getBufferAddress(rootDeviceIndex);
args.size = getSurfaceSize(alignSizeForAuxTranslation, rootDeviceIndex);
args.mocs = getMocsValue(disableL3, isReadOnly, rootDeviceIndex);
args.cpuCoherent = true;
args.forceNonAuxMode = forceNonAuxMode;
args.isReadOnly = isReadOnly;
args.numAvailableDevices = device.getNumGenericSubDevices();
args.allocation = graphicsAllocation;
args.gmmHelper = device.getGmmHelper();
args.useGlobalAtomics = useGlobalAtomics;
args.areMultipleSubDevicesInContext = areMultipleSubDevicesInContext;
args.implicitScaling = ImplicitScalingHelper::isImplicitScalingEnabled(device.getDeviceBitfield(), true);
args.isDebuggerActive = isDebuggerActive;
appendSurfaceStateArgs(args);
EncodeSurfaceState<GfxFamily>::encodeBuffer(args);
}
} // namespace NEO