Since #118841 there are more cases where Cycles would check for the graphics interop support. This could lead to a crash when graphics interop functions are called without having active graphics context. This change makes it so there is no graphics interop calls when doing headless render. In order to achieve this the device creation is now aware of the headless mode. Pull Request: https://projects.blender.org/blender/blender/pulls/122844
29 lines
566 B
C++
29 lines
566 B
C++
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#pragma once
|
|
|
|
#include "util/string.h"
|
|
#include "util/vector.h"
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
class Device;
|
|
class DeviceInfo;
|
|
class Profiler;
|
|
class Stats;
|
|
|
|
bool device_cuda_init();
|
|
|
|
Device *device_cuda_create(const DeviceInfo &info,
|
|
Stats &stats,
|
|
Profiler &profiler,
|
|
bool headless);
|
|
|
|
void device_cuda_info(vector<DeviceInfo> &devices);
|
|
|
|
string device_cuda_capabilities();
|
|
|
|
CCL_NAMESPACE_END
|