sampler.c revision a956c473406f6ddd9799f7deeba54d3dc684b1db
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * Copyright 2012 Henri Verbeet for CodeWeavers
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * This library is free software; you can redistribute it and/or
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * modify it under the terms of the GNU Lesser General Public
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * License as published by the Free Software Foundation; either
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * version 2.1 of the License, or (at your option) any later version.
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * This library is distributed in the hope that it will be useful,
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * Lesser General Public License for more details.
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * You should have received a copy of the GNU Lesser General Public
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * License along with this library; if not, write to the Free Software
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsyncULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync ULONG refcount = InterlockedIncrement(&sampler->refcount);
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync TRACE("%p increasing refcount to %u.\n", sampler, refcount);
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsyncULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync ULONG refcount = InterlockedDecrement(&sampler->refcount);
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsync TRACE("%p decreasing refcount to %u.\n", sampler, refcount);
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsyncvoid * CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
b56ca3f25c9c141f3c0855b656f8f64bbfa19496vboxsyncstatic void wined3d_sampler_init(struct wined3d_sampler *sampler, void *parent)
91b827c98a305956e75cb1618af6ae17e450fb88vboxsyncHRESULT CDECL wined3d_sampler_create(void *parent, struct wined3d_sampler **sampler)
91b827c98a305956e75cb1618af6ae17e450fb88vboxsync TRACE("parent %p, sampler %p.\n", parent, sampler);
91b827c98a305956e75cb1618af6ae17e450fb88vboxsync if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))