v3d: Stop using spaces in the names of our buffers.
authorEric Anholt <eric@anholt.net>
Mon, 25 Jun 2018 23:08:06 +0000 (16:08 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 27 Jul 2018 19:56:36 +0000 (12:56 -0700)
For CLIF dumping, we need names to not have spaces.  Rather than rewriting
them after the fact, just change the two cases where I had put a space in.

src/gallium/drivers/v3d/v3d_bufmgr.c
src/gallium/drivers/v3d/v3dx_draw.c
src/gallium/drivers/v3d/v3dx_state.c

index ba9aa65ba899c3ac65258f5ff6edbb1a0beebe12..d01b60e32235379be969da1274e4defecd1764d0 100644 (file)
@@ -131,6 +131,10 @@ v3d_bo_alloc(struct v3d_screen *screen, uint32_t size, const char *name)
         struct v3d_bo *bo;
         int ret;
 
+        /* The CLIF dumping requires that there is no whitespace in the name.
+         */
+        assert(!strchr(name, ' '));
+
         size = align(size, 4096);
 
         bo = v3d_bo_from_cache(screen, size, name);
index 13143191d21cb51dedf67c103e296b34b7763bcd..9c533a46255979de1d10c9206c7b9157ceb00e56 100644 (file)
@@ -55,7 +55,7 @@ v3d_start_draw(struct v3d_context *v3d)
         job->submit.bcl_start = job->bcl.bo->offset;
         v3d_job_add_bo(job, job->bcl.bo);
 
-        job->tile_alloc = v3d_bo_alloc(v3d->screen, 1024 * 1024, "tile alloc");
+        job->tile_alloc = v3d_bo_alloc(v3d->screen, 1024 * 1024, "tile_alloc");
         uint32_t tsda_per_tile_size = v3d->screen->devinfo.ver >= 40 ? 256 : 64;
         job->tile_state = v3d_bo_alloc(v3d->screen,
                                        job->draw_tiles_y *
index 4bb90f1a98bcaaebe247c6c393ca4df4638a5eb4..34b845730f6132bbc2bda089e8a7b55965c261db 100644 (file)
@@ -404,7 +404,7 @@ v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements,
         so->default_attribute_values = v3d_bo_alloc(v3d->screen,
                                                     VC5_MAX_ATTRIBUTES *
                                                     4 * sizeof(float),
-                                                    "default attributes");
+                                                    "default_attributes");
         uint32_t *attrs = v3d_bo_map(so->default_attribute_values);
         for (int i = 0; i < VC5_MAX_ATTRIBUTES; i++) {
                 attrs[i * 4 + 0] = 0;