gallium/radeon: stop using PIPE_BIND_CUSTOM
authorMarek Olšák <marek.olsak@amd.com>
Mon, 24 Oct 2016 21:26:39 +0000 (23:26 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 26 Oct 2016 11:02:58 +0000 (13:02 +0200)
it has no effect whatsoever

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/r600/evergreen_compute.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state_common.c
src/gallium/drivers/radeon/r600_query.c
src/gallium/drivers/radeon/r600_texture.c
src/gallium/drivers/radeon/radeon_video.c
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_pm4.c
src/gallium/drivers/radeonsi/si_state_shaders.c

index fe43f37574998ab42d0ff238ca954951d3ed17cf..f66c9f6de28c4d29003871c9cb12d12c9677ed83 100644 (file)
@@ -87,9 +87,7 @@ struct r600_resource *r600_compute_buffer_alloc_vram(struct r600_screen *screen,
        assert(size);
 
        buffer = pipe_buffer_create((struct pipe_screen*) screen,
-                                   PIPE_BIND_CUSTOM,
-                                   PIPE_USAGE_IMMUTABLE,
-                                   size);
+                                   0, PIPE_USAGE_IMMUTABLE, size);
 
        return (struct r600_resource *)buffer;
 }
@@ -335,7 +333,7 @@ static void evergreen_compute_upload_input(struct pipe_context *ctx,
        if (!shader->kernel_param) {
                /* Add space for the grid dimensions */
                shader->kernel_param = (struct r600_resource *)
-                       pipe_buffer_create(ctx->screen, PIPE_BIND_CUSTOM,
+                       pipe_buffer_create(ctx->screen, 0,
                                        PIPE_USAGE_IMMUTABLE, input_size);
        }
 
index 59a13ec2483571c612ba1fa808a0257b14f6d414..b5e7b7d7223c1d8519ec705910d5249b18bab4ab 100644 (file)
@@ -137,7 +137,7 @@ static int store_shader(struct pipe_context *ctx,
 
        if (shader->bo == NULL) {
                shader->bo = (struct r600_resource*)
-                       pipe_buffer_create(ctx->screen, PIPE_BIND_CUSTOM, PIPE_USAGE_IMMUTABLE, shader->shader.bc.ndw * 4);
+                       pipe_buffer_create(ctx->screen, 0, PIPE_USAGE_IMMUTABLE, shader->shader.bc.ndw * 4);
                if (shader->bo == NULL) {
                        return -ENOMEM;
                }
index 48c544329569af92d2306a634c130269013bf136..60490b0d69511c55b151807b88c75fdaebd0b718 100644 (file)
@@ -1326,14 +1326,14 @@ static void update_gs_block_state(struct r600_context *rctx, unsigned enable)
                if (enable && !rctx->gs_rings.esgs_ring.buffer) {
                        unsigned size = 0x1C000;
                        rctx->gs_rings.esgs_ring.buffer =
-                                       pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM,
+                                       pipe_buffer_create(rctx->b.b.screen, 0,
                                                        PIPE_USAGE_DEFAULT, size);
                        rctx->gs_rings.esgs_ring.buffer_size = size;
 
                        size = 0x4000000;
 
                        rctx->gs_rings.gsvs_ring.buffer =
-                                       pipe_buffer_create(rctx->b.b.screen, PIPE_BIND_CUSTOM,
+                                       pipe_buffer_create(rctx->b.b.screen, 0,
                                                        PIPE_USAGE_DEFAULT, size);
                        rctx->gs_rings.gsvs_ring.buffer_size = size;
                }
index a5c8595ea1233a0011da35adc34e6064daabb92b..047f597a23532f3a776608d491981a5eb5607d7b 100644 (file)
@@ -338,7 +338,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c
         * usage pattern.
         */
        struct r600_resource *buf = (struct r600_resource*)
-               pipe_buffer_create(ctx->b.screen, PIPE_BIND_CUSTOM,
+               pipe_buffer_create(ctx->b.screen, 0,
                                   PIPE_USAGE_STAGING, buf_size);
        if (!buf)
                return NULL;
@@ -1580,7 +1580,7 @@ void r600_query_init_backend_mask(struct r600_common_context *ctx)
 
        /* create buffer for event data */
        buffer = (struct r600_resource*)
-               pipe_buffer_create(ctx->b.screen, PIPE_BIND_CUSTOM,
+               pipe_buffer_create(ctx->b.screen, 0,
                                   PIPE_USAGE_STAGING, ctx->max_db*16);
        if (!buffer)
                goto err;
index db65cd9235b3c48091ff4a29e0fb6b90c4509d1c..bc981da4bedfc8000c4666cc90a0e23abd21bbe6 100644 (file)
@@ -879,8 +879,7 @@ static void r600_texture_allocate_htile(struct r600_common_screen *rscreen,
                return;
 
        rtex->htile_buffer = (struct r600_resource*)
-               r600_aligned_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM,
-                                          PIPE_USAGE_DEFAULT,
+               r600_aligned_buffer_create(&rscreen->b, 0, PIPE_USAGE_DEFAULT,
                                           rtex->surface.htile_size,
                                           rtex->surface.htile_alignment);
        if (rtex->htile_buffer == NULL) {
index b4fd3065428a03164091c162b727d8f26030b42d..59e735b47444cd7ab6a11338706dc1aa11bf9d2a 100644 (file)
@@ -72,7 +72,7 @@ bool rvid_create_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer,
         * non-sub-allocated buffer.
         */
        buffer->res = (struct r600_resource *)
-               pipe_buffer_create(screen, PIPE_BIND_CUSTOM | PIPE_BIND_SHARED,
+               pipe_buffer_create(screen, PIPE_BIND_SHARED,
                                   usage, size);
 
        return buffer->res != NULL;
index 7c11bafcb29a2e7b251b2b21f261ce7ab040a6c0..87ba31659b0f0b707bd02fa5b5fadd603d2ac40d 100644 (file)
@@ -159,7 +159,7 @@ void si_begin_new_cs(struct si_context *ctx)
                /* Create a buffer used for writing trace IDs and initialize it to 0. */
                assert(!ctx->trace_buf);
                ctx->trace_buf = (struct r600_resource*)
-                                pipe_buffer_create(ctx->b.b.screen, PIPE_BIND_CUSTOM,
+                                pipe_buffer_create(ctx->b.b.screen, 0,
                                                    PIPE_USAGE_STAGING, 4);
                if (ctx->trace_buf)
                        pipe_buffer_write_nooverlap(&ctx->b.b, &ctx->trace_buf->b.b,
index ccd7f3fdcdd4934dbeec0ac18666503d30a55972..bf3b442dbccc10c19a493b33b524b469175b430d 100644 (file)
@@ -202,8 +202,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
 
                sctx->ce_suballocator =
                                u_suballocator_create(&sctx->b.b, 1024 * 1024,
-                                                     PIPE_BIND_CUSTOM,
-                                                     PIPE_USAGE_DEFAULT, false);
+                                                     0, PIPE_USAGE_DEFAULT, false);
                if (!sctx->ce_suballocator)
                        goto fail;
        }
@@ -217,7 +216,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
                goto fail;
 
        sctx->border_color_buffer = (struct r600_resource*)
-               pipe_buffer_create(screen, PIPE_BIND_CUSTOM, PIPE_USAGE_DEFAULT,
+               pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT,
                                   SI_MAX_BORDER_COLORS *
                                   sizeof(*sctx->border_color_table));
        if (!sctx->border_color_buffer)
index 8fc5fcc370f35896c3c72e95c1283694441c98f4..6b74e496db6491c4583404bf1744309a7e0d9960 100644 (file)
@@ -406,8 +406,7 @@ si_resource_create_custom(struct pipe_screen *screen,
                          unsigned usage, unsigned size)
 {
        assert(size);
-       return r600_resource(pipe_buffer_create(screen,
-               PIPE_BIND_CUSTOM, usage, size));
+       return r600_resource(pipe_buffer_create(screen, 0, usage, size));
 }
 
 static inline void
index 386d0935e83303824119a164c4f2b9a7f6d0b72d..97b6799f361be6bfd24cf0ce9a662f012badece1 100644 (file)
@@ -190,7 +190,7 @@ void si_pm4_upload_indirect_buffer(struct si_context *sctx,
 
        r600_resource_reference(&state->indirect_buffer, NULL);
        state->indirect_buffer = (struct r600_resource*)
-               pipe_buffer_create(screen, PIPE_BIND_CUSTOM,
+               pipe_buffer_create(screen, 0,
                                   PIPE_USAGE_DEFAULT, aligned_ndw * 4);
        if (!state->indirect_buffer)
                return;
index f59bfcd7d41c30b183a792218c4440db1822598d..3037a04b03c797124aec7de182aedf0472f0f3e3 100644 (file)
@@ -1730,7 +1730,7 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
 
        if (update_esgs) {
                pipe_resource_reference(&sctx->esgs_ring, NULL);
-               sctx->esgs_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM,
+               sctx->esgs_ring = pipe_buffer_create(sctx->b.b.screen, 0,
                                                     PIPE_USAGE_DEFAULT,
                                                     esgs_ring_size);
                if (!sctx->esgs_ring)
@@ -1739,7 +1739,7 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
 
        if (update_gsvs) {
                pipe_resource_reference(&sctx->gsvs_ring, NULL);
-               sctx->gsvs_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM,
+               sctx->gsvs_ring = pipe_buffer_create(sctx->b.b.screen, 0,
                                                     PIPE_USAGE_DEFAULT,
                                                     gsvs_ring_size);
                if (!sctx->gsvs_ring)
@@ -2008,7 +2008,7 @@ static void si_init_tess_factor_ring(struct si_context *sctx)
        }
 
        assert(!sctx->tf_ring);
-       sctx->tf_ring = pipe_buffer_create(sctx->b.b.screen, PIPE_BIND_CUSTOM,
+       sctx->tf_ring = pipe_buffer_create(sctx->b.b.screen, 0,
                                           PIPE_USAGE_DEFAULT,
                                           32768 * sctx->screen->b.info.max_se);
        if (!sctx->tf_ring)
@@ -2016,8 +2016,7 @@ static void si_init_tess_factor_ring(struct si_context *sctx)
 
        assert(((sctx->tf_ring->width0 / 4) & C_030938_SIZE) == 0);
 
-       sctx->tess_offchip_ring = pipe_buffer_create(sctx->b.b.screen,
-                                                    PIPE_BIND_CUSTOM,
+       sctx->tess_offchip_ring = pipe_buffer_create(sctx->b.b.screen, 0,
                                                     PIPE_USAGE_DEFAULT,
                                                     max_offchip_buffers *
                                                     sctx->screen->tess_offchip_block_dw_size * 4);