https://github.com/shader-slang/slang
Raw File
Tip revision: e59516fa8c3a16eb7b99a928c5b85b97bf44fd72 authored by Yong He on 01 February 2022, 00:26:03 UTC
Revise entrypoint renaming interface. (#2113)
Tip revision: e59516f
slang-type-system-shared.cpp
#include "slang-type-system-shared.h"

#include "../core/slang-common.h"

namespace Slang
{
    TextureFlavor TextureFlavor::create(SlangResourceShape shape, SlangResourceAccess access)
    {
        TextureFlavor rs;
        rs.flavor = uint16_t(shape | (access << 8));
        return rs;
    }

    TextureFlavor TextureFlavor::create(SlangResourceShape shape, SlangResourceAccess access, int flags)
    {
        SLANG_ASSERT((flags & ~int(SLANG_RESOURCE_EXT_SHAPE_MASK)) == 0);
        TextureFlavor rs;
        rs.flavor = uint16_t(shape | (access << 8) | flags);
        return rs;
    }
}
back to top