region->bo = buffer;
region->tiling = tiling;
- _DBG("%s <-- %p\n", __FUNCTION__, region);
+ _DBG("%s <-- %p\n", __func__, region);
return region;
}
int ret;
uint32_t bit_6_swizzle, tiling;
- buffer = intel_bo_gem_create_from_name(screen->bufmgr, name, handle);
+ buffer = drm_intel_bo_gem_create_from_name(screen->bufmgr, name, handle);
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);
region->refcount--;
*/
void
intel_region_get_tile_masks(struct intel_region *region,
- uint32_t *mask_x, uint32_t *mask_y,
- bool map_stencil_as_y_tiled)
+ uint32_t *mask_x, uint32_t *mask_y)
{
int cpp = region->cpp;
uint32_t tiling = region->tiling;
- if (map_stencil_as_y_tiled)
- tiling = I915_TILING_Y;
-
switch (tiling) {
default:
assert(false);
*/
uint32_t
intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
- uint32_t y, bool map_stencil_as_y_tiled)
+ uint32_t y)
{
int cpp = region->cpp;
uint32_t pitch = region->pitch;
uint32_t tiling = region->tiling;
- if (map_stencil_as_y_tiled) {
- tiling = I915_TILING_Y;
-
- /* When mapping a W-tiled stencil buffer as Y-tiled, each 64-high W-tile
- * gets transformed into a 32-high Y-tile. Accordingly, the pitch of
- * the resulting region is twice the pitch of the original region, since
- * each row in the Y-tiled view corresponds to two rows in the actual
- * W-tiled surface. So we need to correct the pitch before computing
- * the offsets.
- */
- pitch *= 2;
- }
-
switch (tiling) {
default:
assert(false);