2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-01-21 02:10:01 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-01-21 02:10:01 +08:00
|
|
|
#include "core/built_ins/sip_kernel_type.h"
|
2019-11-29 22:41:47 +08:00
|
|
|
#include "core/helpers/hw_info.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
class Device;
|
2018-03-08 22:52:08 +08:00
|
|
|
class Program;
|
2018-03-09 18:52:14 +08:00
|
|
|
class GraphicsAllocation;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
const char *getSipKernelCompilerInternalOptions(SipKernelType kernel);
|
|
|
|
|
|
|
|
const char *getSipLlSrc(const Device &device);
|
|
|
|
|
|
|
|
class SipKernel {
|
|
|
|
public:
|
2018-03-06 22:29:06 +08:00
|
|
|
SipKernel(SipKernelType type, Program *sipProgram);
|
2017-12-21 07:45:38 +08:00
|
|
|
SipKernel(const SipKernel &) = delete;
|
|
|
|
SipKernel &operator=(const SipKernel &) = delete;
|
|
|
|
SipKernel(SipKernel &&) = default;
|
|
|
|
SipKernel &operator=(SipKernel &&) = default;
|
2019-12-03 22:57:45 +08:00
|
|
|
virtual ~SipKernel();
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2018-03-08 22:52:08 +08:00
|
|
|
const char *getBinary() const;
|
2018-01-08 10:25:27 +08:00
|
|
|
|
2018-03-08 22:52:08 +08:00
|
|
|
size_t getBinarySize() const;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2018-01-08 10:25:27 +08:00
|
|
|
SipKernelType getType() const {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
2018-03-09 21:40:31 +08:00
|
|
|
static const size_t maxDbgSurfaceSize;
|
|
|
|
|
2019-12-03 22:57:45 +08:00
|
|
|
MOCKABLE_VIRTUAL GraphicsAllocation *getSipAllocation() const;
|
2018-04-06 20:25:22 +08:00
|
|
|
static SipKernelType getSipKernelType(GFXCORE_FAMILY family, bool debuggingActive);
|
2020-01-21 02:10:01 +08:00
|
|
|
static GraphicsAllocation *getSipKernelAllocation(Device &device);
|
2018-03-09 18:52:14 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
protected:
|
|
|
|
SipKernelType type = SipKernelType::COUNT;
|
2018-05-14 17:25:18 +08:00
|
|
|
Program *program = nullptr;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|