2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2019-03-26 18:59:46 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/mem_obj/buffer.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
class Pipe : public MemObj {
|
|
|
|
public:
|
|
|
|
static const size_t intelPipeHeaderReservedSpace = 128;
|
|
|
|
static const cl_ulong maskMagic = 0xFFFFFFFFFFFFFFFFLL;
|
|
|
|
static const cl_ulong objectMagic = MemObj::objectMagic | 0x03;
|
|
|
|
static Pipe *create(
|
|
|
|
Context *context,
|
|
|
|
cl_mem_flags flags,
|
|
|
|
cl_uint packetSize,
|
|
|
|
cl_uint maxPackets,
|
|
|
|
const cl_pipe_properties *properties,
|
|
|
|
cl_int &errcodeRet);
|
|
|
|
|
|
|
|
~Pipe() override;
|
|
|
|
|
|
|
|
cl_int getPipeInfo(cl_image_info paramName,
|
|
|
|
size_t paramValueSize,
|
|
|
|
void *paramValue,
|
|
|
|
size_t *paramValueSizeRet);
|
|
|
|
|
2020-06-24 17:01:35 +08:00
|
|
|
void setPipeArg(void *memory, uint32_t patchSize, uint32_t rootDeviceIndex);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
Pipe(Context *context,
|
|
|
|
cl_mem_flags flags,
|
|
|
|
cl_uint packetSize,
|
|
|
|
cl_uint maxPackets,
|
|
|
|
const cl_pipe_properties *properties,
|
|
|
|
void *memoryStorage,
|
2020-07-20 17:08:15 +08:00
|
|
|
MultiGraphicsAllocation multiGraphicsAllocation);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
cl_uint pipePacketSize;
|
|
|
|
cl_uint pipeMaxPackets;
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|