i965: Make intel_miptree_map_raw static

This hasn't been used outside intel_mipmap_tree.c since d5d4ba9 started
using meta instead of the blitter for PBO TexSubImage.  While we're
here, remove the unused brw parameter from the function formerly known
as intel_miptree_unmap_raw.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Ian Romanick 2015-09-02 14:43:18 -07:00
parent 68b44dd5b2
commit 31f0967fb5
2 changed files with 17 additions and 19 deletions

View File

@ -47,6 +47,11 @@
#define FILE_DEBUG_FLAG DEBUG_MIPTREE
static void *intel_miptree_map_raw(struct brw_context *brw,
struct intel_mipmap_tree *mt);
static void intel_miptree_unmap_raw(struct intel_mipmap_tree *mt);
static bool
intel_miptree_alloc_mcs(struct brw_context *brw,
struct intel_mipmap_tree *mt,
@ -1398,7 +1403,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
*/
void *data = intel_miptree_map_raw(brw, mt->mcs_mt);
memset(data, 0xff, mt->mcs_mt->total_height * mt->mcs_mt->pitch);
intel_miptree_unmap_raw(brw, mt->mcs_mt);
intel_miptree_unmap_raw(mt->mcs_mt);
mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;
return mt->mcs_mt;
@ -2070,8 +2075,7 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
}
void
intel_miptree_unmap_raw(struct brw_context *brw,
struct intel_mipmap_tree *mt)
intel_miptree_unmap_raw(struct intel_mipmap_tree *mt)
{
drm_intel_bo_unmap(mt->bo);
}
@ -2128,7 +2132,7 @@ intel_miptree_unmap_gtt(struct brw_context *brw,
unsigned int level,
unsigned int slice)
{
intel_miptree_unmap_raw(brw, mt);
intel_miptree_unmap_raw(mt);
}
static void
@ -2189,7 +2193,7 @@ intel_miptree_unmap_blit(struct brw_context *brw,
{
struct gl_context *ctx = &brw->ctx;
intel_miptree_unmap_raw(brw, map->mt);
intel_miptree_unmap_raw(map->mt);
if (map->mode & GL_MAP_WRITE_BIT) {
bool ok = intel_miptree_blit(brw,
@ -2261,7 +2265,7 @@ intel_miptree_map_movntdqa(struct brw_context *brw,
_mesa_streaming_load_memcpy(dst_ptr, src_ptr, width_bytes);
}
intel_miptree_unmap_raw(brw, mt);
intel_miptree_unmap_raw(mt);
}
static void
@ -2310,7 +2314,7 @@ intel_miptree_map_s8(struct brw_context *brw,
}
}
intel_miptree_unmap_raw(brw, mt);
intel_miptree_unmap_raw(mt);
DBG("%s: %d,%d %dx%d from mt %p %d,%d = %p/%d\n", __func__,
map->x, map->y, map->w, map->h,
@ -2346,7 +2350,7 @@ intel_miptree_unmap_s8(struct brw_context *brw,
}
}
intel_miptree_unmap_raw(brw, mt);
intel_miptree_unmap_raw(mt);
}
free(map->buffer);
@ -2400,7 +2404,7 @@ intel_miptree_unmap_etc(struct brw_context *brw,
map->ptr, map->stride,
map->w, map->h, mt->etc_format);
intel_miptree_unmap_raw(brw, mt);
intel_miptree_unmap_raw(mt);
free(map->buffer);
}
@ -2470,8 +2474,8 @@ intel_miptree_map_depthstencil(struct brw_context *brw,
}
}
intel_miptree_unmap_raw(brw, s_mt);
intel_miptree_unmap_raw(brw, z_mt);
intel_miptree_unmap_raw(s_mt);
intel_miptree_unmap_raw(z_mt);
DBG("%s: %d,%d %dx%d from z mt %p %d,%d, s mt %p %d,%d = %p/%d\n",
__func__,
@ -2530,8 +2534,8 @@ intel_miptree_unmap_depthstencil(struct brw_context *brw,
}
}
intel_miptree_unmap_raw(brw, s_mt);
intel_miptree_unmap_raw(brw, z_mt);
intel_miptree_unmap_raw(s_mt);
intel_miptree_unmap_raw(z_mt);
DBG("%s: %d,%d %dx%d from z mt %p (%s) %d,%d, s mt %p %d,%d = %p/%d\n",
__func__,

View File

@ -772,12 +772,6 @@ brw_miptree_layout(struct brw_context *brw,
struct intel_mipmap_tree *mt,
uint32_t layout_flags);
void *intel_miptree_map_raw(struct brw_context *brw,
struct intel_mipmap_tree *mt);
void intel_miptree_unmap_raw(struct brw_context *brw,
struct intel_mipmap_tree *mt);
void
intel_miptree_map(struct brw_context *brw,
struct intel_mipmap_tree *mt,