2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-02-22 16:28:27 +08:00
|
|
|
* Copyright (C) 2017-2020 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-22 16:28:27 +08:00
|
|
|
#include "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);
|
|
|
|
|
|
|
|
void setPipeArg(void *memory, uint32_t patchSize);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Pipe(Context *context,
|
|
|
|
cl_mem_flags flags,
|
|
|
|
cl_uint packetSize,
|
|
|
|
cl_uint maxPackets,
|
|
|
|
const cl_pipe_properties *properties,
|
|
|
|
void *memoryStorage,
|
|
|
|
GraphicsAllocation *gfxAllocation);
|
|
|
|
|
|
|
|
cl_uint pipePacketSize;
|
|
|
|
cl_uint pipeMaxPackets;
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|