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