Function create

Summary

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

(1) static SharedPtr create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)

(2) static SharedPtr create(ConstBufferSharedPtrRef pBuffer, uint32_t firstElement, uint32_t elementCount)

(3) static SharedPtr create(Dimension dimension)

Function overload

Synopsis

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

static SharedPtr create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)

Description

No description yet.

Source

Lines 507-514 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 164 in Source/Falcor/Core/API/ResourceViews.h.

UnorderedAccessView::SharedPtr UnorderedAccessView::create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
{
    assert(pTexture);
    D3D12_UNORDERED_ACCESS_VIEW_DESC desc = createDsvRtvUavDescCommon<D3D12_UNORDERED_ACCESS_VIEW_DESC>(pTexture.get(), mipLevel, firstArraySlice, arraySize);
    Resource::ApiHandle resHandle = pTexture->getApiHandle();
    return SharedPtr(new UnorderedAccessView(pTexture, createUavDescriptor(desc, resHandle, nullptr), mipLevel, firstArraySlice, arraySize));
}

Synopsis

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

static SharedPtr create(ConstBufferSharedPtrRef pBuffer, uint32_t firstElement, uint32_t elementCount)

Description

No description yet.

Source

Lines 516-528 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 165 in Source/Falcor/Core/API/ResourceViews.h.

UnorderedAccessView::SharedPtr UnorderedAccessView::create(ConstBufferSharedPtrRef pBuffer, uint32_t firstElement, uint32_t elementCount)
{
    assert(pBuffer);
    D3D12_UNORDERED_ACCESS_VIEW_DESC desc = createBufferUavDesc(pBuffer.get(), firstElement, elementCount);
    Resource::ApiHandle resHandle = pBuffer->getApiHandle();
    Resource::ApiHandle counterHandle = nullptr;
    if (pBuffer->getUAVCounter())
    {
        counterHandle = pBuffer->getUAVCounter()->getApiHandle();
    }
    return SharedPtr(new UnorderedAccessView(pBuffer, createUavDescriptor(desc, resHandle, counterHandle), firstElement, elementCount));
}

Synopsis

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

static SharedPtr create(Dimension dimension)

Description

No description yet.

Source

Lines 530-538 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 166 in Source/Falcor/Core/API/ResourceViews.h.

UnorderedAccessView::SharedPtr UnorderedAccessView::create(Dimension dimension)
{
    // Create a null view of the specified dimension.
    D3D12_UNORDERED_ACCESS_VIEW_DESC desc = {};
    desc.Format = DXGI_FORMAT_R32_UINT;
    desc.ViewDimension = getViewDimension<decltype(desc.ViewDimension)>(dimension);
    return SharedPtr(new UnorderedAccessView(std::weak_ptr<Resource>(), createUavDescriptor(desc, nullptr, nullptr), 0, 0));
}





Add Discussion as Guest

Log in