/**************************************************************************
*
- * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2006 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
region->bo = buffer;
region->tiling = tiling;
- _DBG("%s <-- %p\n", __FUNCTION__, region);
+ _DBG("%s <-- %p\n", __func__, region);
return region;
}
intel_region_alloc_for_fd(struct intel_screen *screen,
GLuint cpp,
GLuint width, GLuint height, GLuint pitch,
+ GLuint size,
int fd, const char *name)
{
struct intel_region *region;
int ret;
uint32_t bit_6_swizzle, tiling;
- buffer = drm_intel_bo_gem_create_from_prime(screen->bufmgr,
- fd, height * pitch);
+ buffer = drm_intel_bo_gem_create_from_prime(screen->bufmgr, fd, size);
if (buffer == NULL)
return NULL;
ret = drm_intel_bo_get_tiling(buffer, &tiling, &bit_6_swizzle);
void
intel_region_reference(struct intel_region **dst, struct intel_region *src)
{
- _DBG("%s: %p(%d) -> %p(%d)\n", __FUNCTION__,
+ _DBG("%s: %p(%d) -> %p(%d)\n", __func__,
*dst, *dst ? (*dst)->refcount : 0, src, src ? src->refcount : 0);
if (src != *dst) {
struct intel_region *region = *region_handle;
if (region == NULL) {
- _DBG("%s NULL\n", __FUNCTION__);
+ _DBG("%s NULL\n", __func__);
return;
}
- _DBG("%s %p %d\n", __FUNCTION__, region, region->refcount - 1);
+ _DBG("%s %p %d\n", __func__, region, region->refcount - 1);
- ASSERT(region->refcount > 0);
+ assert(region->refcount > 0);
region->refcount--;
if (region->refcount == 0) {