Exemple #1
0
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc(ID3D10ShaderResourceView *iface,
        D3D10_SHADER_RESOURCE_VIEW_DESC *desc)
{
    struct d3d10_shader_resource_view *view = impl_from_ID3D10ShaderResourceView(iface);

    TRACE("iface %p, desc %p.\n", iface, desc);

    *desc = view->desc;
}
Exemple #2
0
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef(ID3D10ShaderResourceView *iface)
{
    struct d3d10_shader_resource_view *This = impl_from_ID3D10ShaderResourceView(iface);
    ULONG refcount = InterlockedIncrement(&This->refcount);

    TRACE("%p increasing refcount to %u.\n", This, refcount);

    return refcount;
}
Exemple #3
0
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetResource(ID3D10ShaderResourceView *iface,
        ID3D10Resource **resource)
{
    struct d3d10_shader_resource_view *view = impl_from_ID3D10ShaderResourceView(iface);

    TRACE("iface %p, resource %p.\n", iface, resource);

    *resource = view->resource;
    ID3D10Resource_AddRef(*resource);
}
Exemple #4
0
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release(ID3D10ShaderResourceView *iface)
{
    struct d3d10_shader_resource_view *This = impl_from_ID3D10ShaderResourceView(iface);
    ULONG refcount = InterlockedDecrement(&This->refcount);

    TRACE("%p decreasing refcount to %u.\n", This, refcount);

    if (!refcount)
    {
        HeapFree(GetProcessHeap(), 0, This);
    }

    return refcount;
}