Function operator()

Synopsis

#include <Source/Falcor/Core/API/FBO.h>

std::size_t operator()(const Desc &d) const

Description

No description yet.

Source

Lines 171-190 in Source/Falcor/Core/API/FBO.cpp. Line 252 in Source/Falcor/Core/API/FBO.h.

size_t Fbo::DescHash::operator()(const Fbo::Desc& d) const
{
    size_t hash = 0;
    std::hash<uint32_t> u32hash;
    std::hash<bool> bhash;
    for (uint32_t i = 0; i < getMaxColorTargetCount(); i++)
    {
        uint32_t format = (uint32_t)d.getColorTargetFormat(i);
        format <<= i;
        hash |= u32hash(format) >> i;
        hash |= bhash(d.isColorTargetUav(i)) << i;
    }
    uint32_t format = (uint32_t)d.getDepthStencilFormat();
    hash |= u32hash(format);
    hash |= bhash(d.isDepthStencilUav());
    hash |= u32hash(d.getSampleCount());
    return hash;
}





Add Discussion as Guest

Log in