i965: Drop unused alignment parameter from brw_bo_alloc().

brw_bo_alloc no longer uses this parameter, so there's no point.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Kenneth Graunke 2018-03-26 15:58:05 -07:00
parent 07ec3a2e0f
commit 037d738a23
14 changed files with 25 additions and 26 deletions

View File

@ -827,7 +827,7 @@ blorp_get_client_bo(struct brw_context *brw,
* data which we need to copy into a BO.
*/
struct brw_bo *bo =
brw_bo_alloc(brw->bufmgr, "tmp_tex_subimage_src", size, 64);
brw_bo_alloc(brw->bufmgr, "tmp_tex_subimage_src", size);
if (bo == NULL) {
perf_debug("intel_texsubimage: temp bo creation failed: size = %u\n",
size);

View File

@ -428,7 +428,7 @@ err:
struct brw_bo *
brw_bo_alloc(struct brw_bufmgr *bufmgr,
const char *name, uint64_t size, uint64_t alignment)
const char *name, uint64_t size)
{
return bo_alloc_internal(bufmgr, name, size, 0, I915_TILING_NONE, 0);
}

View File

@ -175,7 +175,7 @@ struct brw_bo {
* using brw_bo_map() to be used by the CPU.
*/
struct brw_bo *brw_bo_alloc(struct brw_bufmgr *bufmgr, const char *name,
uint64_t size, uint64_t alignment);
uint64_t size);
/**
* Allocate a tiled buffer object.

View File

@ -1236,8 +1236,7 @@ brw_begin_perf_query(struct gl_context *ctx,
}
obj->oa.bo =
brw_bo_alloc(brw->bufmgr, "perf. query OA MI_RPC bo",
MI_RPC_BO_SIZE, 64);
brw_bo_alloc(brw->bufmgr, "perf. query OA MI_RPC bo", MI_RPC_BO_SIZE);
#ifdef DEBUG
/* Pre-filling the BO helps debug whether writes landed. */
void *map = brw_bo_map(brw, obj->oa.bo, MAP_WRITE);
@ -1293,7 +1292,7 @@ brw_begin_perf_query(struct gl_context *ctx,
obj->pipeline_stats.bo =
brw_bo_alloc(brw->bufmgr, "perf. query pipeline stats bo",
STATS_BO_SIZE, 64);
STATS_BO_SIZE);
/* Take starting snapshots. */
snapshot_statistics_registers(brw, obj, 0);

View File

@ -572,7 +572,7 @@ brw_init_pipe_control(struct brw_context *brw,
* the gen6 workaround because it involves actually writing to
* the buffer, and the kernel doesn't let us write to the batch.
*/
brw->workaround_bo = brw_bo_alloc(brw->bufmgr, "workaround", 4096, 4096);
brw->workaround_bo = brw_bo_alloc(brw->bufmgr, "workaround", 4096);
if (brw->workaround_bo == NULL)
return -ENOMEM;

View File

@ -342,7 +342,7 @@ brw_get_scratch_bo(struct brw_context *brw,
}
if (!old_bo) {
*scratch_bo = brw_bo_alloc(brw->bufmgr, "scratch bo", size, 4096);
*scratch_bo = brw_bo_alloc(brw->bufmgr, "scratch bo", size);
}
}
@ -437,7 +437,7 @@ brw_alloc_stage_scratch(struct brw_context *brw,
stage_state->scratch_bo =
brw_bo_alloc(brw->bufmgr, "shader scratch space",
per_thread_size * thread_count, 4096);
per_thread_size * thread_count);
}
void brwInitFragProgFuncs( struct dd_function_table *functions )
@ -466,7 +466,7 @@ brw_init_shader_time(struct brw_context *brw)
const int max_entries = 2048;
brw->shader_time.bo =
brw_bo_alloc(brw->bufmgr, "shader time",
max_entries * BRW_SHADER_TIME_STRIDE * 3, 4096);
max_entries * BRW_SHADER_TIME_STRIDE * 3);
brw->shader_time.names = rzalloc_array(brw, const char *, max_entries);
brw->shader_time.ids = rzalloc_array(brw, int, max_entries);
brw->shader_time.types = rzalloc_array(brw, enum shader_time_shader_type,

View File

@ -221,7 +221,7 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
perf_debug("Copying to larger program cache: %u kB -> %u kB\n",
(unsigned) cache->bo->size / 1024, new_size / 1024);
new_bo = brw_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
new_bo = brw_bo_alloc(brw->bufmgr, "program cache", new_size);
if (can_do_exec_capture(brw->screen))
new_bo->kflags = EXEC_OBJECT_CAPTURE;
@ -388,7 +388,7 @@ brw_init_caches(struct brw_context *brw)
cache->items =
calloc(cache->size, sizeof(struct brw_cache_item *));
cache->bo = brw_bo_alloc(brw->bufmgr, "program cache", 16384, 64);
cache->bo = brw_bo_alloc(brw->bufmgr, "program cache", 16384);
if (can_do_exec_capture(brw->screen))
cache->bo->kflags = EXEC_OBJECT_CAPTURE;

View File

@ -287,7 +287,7 @@ brw_begin_query(struct gl_context *ctx, struct gl_query_object *q)
* the system was doing other work, such as running other applications.
*/
brw_bo_unreference(query->bo);
query->bo = brw_bo_alloc(brw->bufmgr, "timer query", 4096, 4096);
query->bo = brw_bo_alloc(brw->bufmgr, "timer query", 4096);
brw_write_timestamp(brw, query->bo, 0);
break;
@ -449,7 +449,7 @@ ensure_bo_has_space(struct gl_context *ctx, struct brw_query_object *query)
brw_queryobj_get_results(ctx, query);
}
query->bo = brw_bo_alloc(brw->bufmgr, "query", 4096, 1);
query->bo = brw_bo_alloc(brw->bufmgr, "query", 4096);
query->last_index = 0;
}
}
@ -529,7 +529,7 @@ brw_query_counter(struct gl_context *ctx, struct gl_query_object *q)
assert(q->Target == GL_TIMESTAMP);
brw_bo_unreference(query->bo);
query->bo = brw_bo_alloc(brw->bufmgr, "timestamp query", 4096, 4096);
query->bo = brw_bo_alloc(brw->bufmgr, "timestamp query", 4096);
brw_write_timestamp(brw, query->bo, 0);
query->flushed = false;

View File

@ -329,7 +329,7 @@ gen6_begin_query(struct gl_context *ctx, struct gl_query_object *q)
/* Since we're starting a new query, we need to throw away old results. */
brw_bo_unreference(query->bo);
query->bo = brw_bo_alloc(brw->bufmgr, "query results", 4096, 4096);
query->bo = brw_bo_alloc(brw->bufmgr, "query results", 4096);
/* For ARB_query_buffer_object: The result is not available */
set_query_availability(brw, query, false);

View File

@ -195,9 +195,9 @@ brw_new_transform_feedback(struct gl_context *ctx, GLuint name)
_mesa_init_transform_feedback_object(&brw_obj->base, name);
brw_obj->offset_bo =
brw_bo_alloc(brw->bufmgr, "transform feedback offsets", 16, 64);
brw_bo_alloc(brw->bufmgr, "transform feedback offsets", 16);
brw_obj->prim_count_bo =
brw_bo_alloc(brw->bufmgr, "xfb primitive counts", 16384, 64);
brw_bo_alloc(brw->bufmgr, "xfb primitive counts", 16384);
return &brw_obj->base;
}

View File

@ -191,7 +191,7 @@ recreate_growing_buffer(struct brw_context *brw,
struct intel_batchbuffer *batch = &brw->batch;
struct brw_bufmgr *bufmgr = screen->bufmgr;
grow->bo = brw_bo_alloc(bufmgr, name, size, 4096);
grow->bo = brw_bo_alloc(bufmgr, name, size);
grow->bo->kflags = can_do_exec_capture(screen) ? EXEC_OBJECT_CAPTURE : 0;
grow->partial_bo = NULL;
grow->partial_bo_map = NULL;
@ -352,7 +352,7 @@ grow_buffer(struct brw_context *brw,
finish_growing_bos(grow);
}
struct brw_bo *new_bo = brw_bo_alloc(bufmgr, bo->name, new_size, bo->align);
struct brw_bo *new_bo = brw_bo_alloc(bufmgr, bo->name, new_size);
/* Copy existing data to the new larger buffer */
grow->partial_bo_map = grow->map;

View File

@ -96,7 +96,7 @@ alloc_buffer_object(struct brw_context *brw,
*/
size += 64 * 32; /* max read length of 64 256-bit units */
}
intel_obj->buffer = brw_bo_alloc(brw->bufmgr, "bufferobj", size, 64);
intel_obj->buffer = brw_bo_alloc(brw->bufmgr, "bufferobj", size);
/* the buffer might be bound as a uniform buffer, need to update it
*/
@ -290,7 +290,7 @@ brw_buffer_subdata(struct gl_context *ctx,
intel_obj->valid_data_start,
intel_obj->valid_data_end);
struct brw_bo *temp_bo =
brw_bo_alloc(brw->bufmgr, "subdata temp", size, 64);
brw_bo_alloc(brw->bufmgr, "subdata temp", size);
brw_bo_subdata(temp_bo, 0, size, data);
@ -462,7 +462,7 @@ brw_map_buffer_range(struct gl_context *ctx,
intel_obj->map_extra[index] = (uintptr_t) offset % alignment;
intel_obj->range_map_bo[index] =
brw_bo_alloc(brw->bufmgr, "BO blit temp",
length + intel_obj->map_extra[index], alignment);
length + intel_obj->map_extra[index]);
void *map = brw_bo_map(brw, intel_obj->range_map_bo[index], access);
obj->Mappings[index].Pointer = map + intel_obj->map_extra[index];
return obj->Mappings[index].Pointer;

View File

@ -1906,11 +1906,11 @@ intel_detect_pipelined_register(struct intel_screen *screen,
bool success = false;
/* Create a zero'ed temporary buffer for reading our results */
results = brw_bo_alloc(screen->bufmgr, "registers", 4096, 0);
results = brw_bo_alloc(screen->bufmgr, "registers", 4096);
if (results == NULL)
goto err;
bo = brw_bo_alloc(screen->bufmgr, "batchbuffer", 4096, 0);
bo = brw_bo_alloc(screen->bufmgr, "batchbuffer", 4096);
if (bo == NULL)
goto err_results;

View File

@ -86,7 +86,7 @@ brw_upload_space(struct brw_uploader *upload,
assert((upload->bo == NULL) == (upload->map == NULL));
if (!upload->bo) {
upload->bo = brw_bo_alloc(upload->bufmgr, "streamed data",
MAX2(upload->default_size, size), 4096);
MAX2(upload->default_size, size));
upload->map = brw_bo_map(NULL, upload->bo,
MAP_READ | MAP_WRITE |
MAP_PERSISTENT | MAP_ASYNC);