mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Cleaned up files: shared/source/helpers/blit_commands_helper.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
/*
|
|
* Copyright (C) 2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/helpers/common_types.h"
|
|
#include "shared/source/helpers/vec.h"
|
|
|
|
#include <functional>
|
|
|
|
namespace NEO {
|
|
|
|
class GraphicsAllocation;
|
|
|
|
enum class BlitOperationResult {
|
|
Unsupported,
|
|
Fail,
|
|
Success,
|
|
GpuHang
|
|
};
|
|
|
|
namespace BlitHelperFunctions {
|
|
using BlitMemoryToAllocationFunc = std::function<BlitOperationResult(const Device &device,
|
|
GraphicsAllocation *memory,
|
|
size_t offset,
|
|
const void *hostPtr,
|
|
const Vec3<size_t> &size)>;
|
|
extern BlitMemoryToAllocationFunc blitMemoryToAllocation;
|
|
} // namespace BlitHelperFunctions
|
|
|
|
struct BlitHelper {
|
|
static BlitOperationResult blitMemoryToAllocation(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr,
|
|
const Vec3<size_t> &size);
|
|
static BlitOperationResult blitMemoryToAllocationBanks(const Device &device, GraphicsAllocation *memory, size_t offset, const void *hostPtr,
|
|
const Vec3<size_t> &size, DeviceBitfield memoryBanks);
|
|
};
|
|
|
|
} // namespace NEO
|