Files
test/intern/cycles/kernel/osl/compat.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
567 B
C
Raw Normal View History

/* SPDX-FileCopyrightText: 2011-2023 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include <OSL/oslconfig.h>
CCL_NAMESPACE_BEGIN
#if OSL_LIBRARY_VERSION_CODE >= 11302
typedef OSL::ustringhash OSLUStringHash;
typedef OSL::ustringrep OSLUStringRep;
static inline OSL::ustring to_ustring(OSLUStringHash h)
{
return OSL::ustring::from_hash(h.hash());
}
#else
typedef OSL::ustring OSLUStringHash;
typedef OSL::ustring OSLUStringRep;
static inline OSL::ustring to_ustring(OSLUStringHash h)
{
return h;
}
#endif
CCL_NAMESPACE_END