/external/mesa3d/src/gallium/drivers/etnaviv/ |
D | etnaviv_transfer.c | 65 struct etna_resource *rsc = etna_resource(ptrans->resource); in etna_transfer_unmap() local 73 assert(ptrans->level <= rsc->base.last_level); in etna_transfer_unmap() 75 if (rsc->texture && !etna_resource_newer(rsc, etna_resource(rsc->texture))) in etna_transfer_unmap() 76 rsc = etna_resource(rsc->texture); /* switch to using the texture resource */ in etna_transfer_unmap() 82 if (trans->rsc) in etna_transfer_unmap() 83 etna_bo_cpu_fini(etna_resource(trans->rsc)->bo); in etna_transfer_unmap() 86 if (trans->rsc) { in etna_transfer_unmap() 90 etna_copy_resource_box(pctx, ptrans->resource, trans->rsc, ptrans->level, &ptrans->box); in etna_transfer_unmap() 93 struct etna_resource_level *res_level = &rsc->levels[ptrans->level]; in etna_transfer_unmap() 94 void *mapped = etna_bo_map(rsc->bo) + res_level->offset; in etna_transfer_unmap() [all …]
|
D | etnaviv_resource.c | 87 struct etna_resource *rsc) in etna_screen_resource_alloc_ts() argument 92 assert(!rsc->ts_bo); in etna_screen_resource_alloc_ts() 95 pixels = rsc->levels[0].layer_stride / util_format_get_blocksize(rsc->base.format); in etna_screen_resource_alloc_ts() 98 rt_ts_size = ts_layer_stride * rsc->base.array_size; in etna_screen_resource_alloc_ts() 103 rsc, rt_ts_size); in etna_screen_resource_alloc_ts() 113 rsc->ts_bo = rt_ts; in etna_screen_resource_alloc_ts() 114 rsc->levels[0].ts_offset = 0; in etna_screen_resource_alloc_ts() 115 rsc->levels[0].ts_layer_stride = ts_layer_stride; in etna_screen_resource_alloc_ts() 116 rsc->levels[0].ts_size = rt_ts_size; in etna_screen_resource_alloc_ts() 147 setup_miptree(struct etna_resource *rsc, unsigned paddingX, unsigned paddingY, in setup_miptree() argument [all …]
|
D | etnaviv_surface.c | 45 struct etna_resource *rsc = etna_resource(prsc); in etna_create_surface() local 54 assert(layer < rsc->base.array_size); in etna_create_surface() 59 pipe_resource_reference(&surf->base.texture, &rsc->base); in etna_create_surface() 69 !rsc->ts_bo && in etna_create_surface() 70 (rsc->levels[level].padded_width & ETNA_RS_WIDTH_MASK) == 0 && in etna_create_surface() 71 (rsc->levels[level].padded_height & ETNA_RS_HEIGHT_MASK) == 0) { in etna_create_surface() 72 etna_screen_resource_alloc_ts(pctx->screen, rsc); in etna_create_surface() 75 surf->base.texture = &rsc->base; in etna_create_surface() 76 surf->base.format = rsc->base.format; in etna_create_surface() 77 surf->base.width = rsc->levels[level].width; in etna_create_surface() [all …]
|
D | etnaviv_query_hw.c | 48 struct etna_resource *rsc = etna_resource(hq->prsc); in occlusion_start() local 50 .bo = rsc->bo, in occlusion_start() 122 struct etna_resource *rsc; in realloc_query_bo() local 132 rsc = etna_resource(hq->prsc); in realloc_query_bo() 134 etna_bo_cpu_prep(rsc->bo, DRM_ETNA_PREP_WRITE); in realloc_query_bo() 136 map = etna_bo_map(rsc->bo); in realloc_query_bo() 138 etna_bo_cpu_fini(rsc->bo); in realloc_query_bo() 176 struct etna_resource *rsc = etna_resource(hq->prsc); in etna_hw_get_query_result() local 184 if (rsc->status & ETNA_PENDING_WRITE) { in etna_hw_get_query_result() 196 ret = etna_bo_cpu_prep(rsc->bo, DRM_ETNA_PREP_READ | DRM_ETNA_PREP_NOSYNC); in etna_hw_get_query_result() [all …]
|
D | etnaviv_texture.c | 82 struct etna_resource *rsc = etna_resource(pview->texture); in etna_configure_sampler_ts() local 83 struct etna_resource_level *lev = &rsc->levels[0]; in etna_configure_sampler_ts() 84 assert(rsc->ts_bo && lev->ts_valid); in etna_configure_sampler_ts() 88 VIVS_TS_SAMPLER_CONFIG_FORMAT(translate_ts_sampler_format(rsc->base.format)); in etna_configure_sampler_ts() 91 sts->TS_SAMPLER_STATUS_BASE.bo = rsc->ts_bo; in etna_configure_sampler_ts() 120 struct etna_resource *rsc = etna_resource(view->texture); in etna_can_use_sampler_ts() local 121 struct etna_screen *screen = etna_screen(rsc->base.screen); in etna_can_use_sampler_ts() 124 rsc->base.target != PIPE_BUFFER && in etna_can_use_sampler_ts() 125 translate_ts_sampler_format(rsc->base.format) != ETNA_NO_MATCH && in etna_can_use_sampler_ts() 126 view->u.tex.first_level == 0 && MIN2(view->u.tex.last_level, rsc->base.last_level) == 0 && in etna_can_use_sampler_ts() [all …]
|
D | etnaviv_clear_blit.c | 142 struct etna_resource *rsc = etna_resource(prsc); in etna_flush_resource() local 144 if (rsc->external) { in etna_flush_resource() 145 if (etna_resource_older(etna_resource(rsc->external), rsc)) { in etna_flush_resource() 146 etna_copy_resource(pctx, rsc->external, prsc, 0, 0); in etna_flush_resource() 147 etna_resource(rsc->external)->seqno = rsc->seqno; in etna_flush_resource() 149 } else if (etna_resource_needs_flush(rsc)) { in etna_flush_resource() 151 rsc->flush_seqno = rsc->seqno; in etna_flush_resource()
|
/external/mesa3d/src/gallium/drivers/vc5/ |
D | vc5_resource.c | 46 vc5_debug_resource_layout(struct vc5_resource *rsc, const char *caller) in vc5_debug_resource_layout() argument 51 struct pipe_resource *prsc = &rsc->base; in vc5_debug_resource_layout() 56 caller, rsc, in vc5_debug_resource_layout() 59 rsc->bo->offset, in vc5_debug_resource_layout() 60 rsc->bo->offset + rsc->bo->size - 1); in vc5_debug_resource_layout() 74 struct vc5_resource_slice *slice = &rsc->slices[i]; in vc5_debug_resource_layout() 76 int level_width = slice->stride / rsc->cpp; in vc5_debug_resource_layout() 82 caller, rsc, in vc5_debug_resource_layout() 91 rsc->bo->offset + slice->offset); in vc5_debug_resource_layout() 96 vc5_resource_bo_alloc(struct vc5_resource *rsc) in vc5_resource_bo_alloc() argument [all …]
|
D | vc5_rcl.c | 41 struct vc5_resource *rsc = vc5_resource(psurf->texture); in load_general() local 44 if (rsc->separate_stencil && buffer == STENCIL) in load_general() 45 separate_stencil = rsc->separate_stencil; in load_general() 53 load.address = cl_address(rsc->bo, surf->offset); in load_general() 76 &rsc->slices[psurf->u.tex.level]; in load_general() 95 struct vc5_resource *rsc = vc5_resource(psurf->texture); in store_general() local 98 if (rsc->separate_stencil && buffer == STENCIL) { in store_general() 99 separate_stencil = rsc->separate_stencil; in store_general() 102 rsc->writes++; in store_general() 111 store.address = cl_address(rsc->bo, surf->offset); in store_general() [all …]
|
/external/mesa3d/src/gallium/drivers/freedreno/ |
D | freedreno_resource.c | 99 realloc_bo(struct fd_resource *rsc, uint32_t size) in realloc_bo() argument 101 struct fd_screen *screen = fd_screen(rsc->base.screen); in realloc_bo() 109 if (rsc->bo) in realloc_bo() 110 fd_bo_del(rsc->bo); in realloc_bo() 112 rsc->bo = fd_bo_new(screen->dev, size, flags); in realloc_bo() 113 util_range_set_empty(&rsc->valid_buffer_range); in realloc_bo() 114 fd_bc_invalidate_resource(rsc, true); in realloc_bo() 136 fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc, in fd_try_shadow_resource() argument 140 struct pipe_resource *prsc = &rsc->base; in fd_try_shadow_resource() 177 fd_bc_invalidate_resource(rsc, false); in fd_try_shadow_resource() [all …]
|
D | freedreno_resource.h | 120 pending(struct fd_resource *rsc, bool write) in pending() argument 123 if (rsc->write_batch) in pending() 127 if (write && rsc->batch_mask) in pending() 130 if (rsc->stencil && pending(rsc->stencil, write)) in pending() 149 fd_resource_slice(struct fd_resource *rsc, unsigned level) in fd_resource_slice() argument 151 assert(level <= rsc->base.last_level); in fd_resource_slice() 152 return &rsc->slices[level]; in fd_resource_slice() 157 fd_resource_offset(struct fd_resource *rsc, unsigned level, unsigned layer) in fd_resource_offset() argument 159 struct fd_resource_slice *slice = fd_resource_slice(rsc, level); in fd_resource_offset() 161 if (rsc->layer_first) { in fd_resource_offset() [all …]
|
D | freedreno_query_acc.c | 58 struct fd_resource *rsc; in realloc_query_bo() local 67 rsc = fd_resource(aq->prsc); in realloc_query_bo() 69 fd_bo_cpu_prep(rsc->bo, ctx->pipe, DRM_FREEDRENO_PREP_WRITE); in realloc_query_bo() 71 map = fd_bo_map(rsc->bo); in realloc_query_bo() 73 fd_bo_cpu_fini(rsc->bo); in realloc_query_bo() 121 struct fd_resource *rsc = fd_resource(aq->prsc); in fd_acc_get_query_result() local 133 if (pending(rsc, false)) { in fd_acc_get_query_result() 141 fd_batch_flush(rsc->write_batch, false, false); in fd_acc_get_query_result() 145 ret = fd_bo_cpu_prep(rsc->bo, ctx->pipe, in fd_acc_get_query_result() 150 fd_bo_cpu_fini(rsc->bo); in fd_acc_get_query_result() [all …]
|
D | freedreno_batch.c | 182 struct fd_resource *rsc = (struct fd_resource *)entry->key; in batch_reset_resources_locked() local 184 debug_assert(rsc->batch_mask & (1 << batch->idx)); in batch_reset_resources_locked() 185 rsc->batch_mask &= ~(1 << batch->idx); in batch_reset_resources_locked() 186 if (rsc->write_batch == batch) in batch_reset_resources_locked() 187 fd_batch_reference_locked(&rsc->write_batch, NULL); in batch_reset_resources_locked() 387 fd_batch_resource_used(struct fd_batch *batch, struct fd_resource *rsc, bool write) in fd_batch_resource_used() argument 391 if (rsc->stencil) in fd_batch_resource_used() 392 fd_batch_resource_used(batch, rsc->stencil, write); in fd_batch_resource_used() 394 DBG("%p: %s %p", batch, write ? "write" : "read", rsc); in fd_batch_resource_used() 397 rsc->valid = true; in fd_batch_resource_used() [all …]
|
D | freedreno_query_hw.c | 204 struct fd_resource *rsc = fd_resource(period->end->prsc); in fd_hw_get_query_result() local 206 if (pending(rsc, false)) { in fd_hw_get_query_result() 214 fd_batch_flush(rsc->write_batch, false, false); in fd_hw_get_query_result() 218 if (!rsc->bo) in fd_hw_get_query_result() 221 ret = fd_bo_cpu_prep(rsc->bo, ctx->pipe, in fd_hw_get_query_result() 226 fd_bo_cpu_fini(rsc->bo); in fd_hw_get_query_result() 239 struct fd_resource *rsc = fd_resource(start->prsc); in fd_hw_get_query_result() local 241 if (rsc->write_batch) in fd_hw_get_query_result() 242 fd_batch_flush(rsc->write_batch, true, false); in fd_hw_get_query_result() 245 if (!rsc->bo) in fd_hw_get_query_result() [all …]
|
D | freedreno_batch_cache.c | 217 struct fd_resource *rsc = fd_resource(key->surf[idx].texture); in fd_bc_invalidate_batch() local 218 rsc->bc_batch_mask &= ~(1 << batch->idx); in fd_bc_invalidate_batch() 230 fd_bc_invalidate_resource(struct fd_resource *rsc, bool destroy) in fd_bc_invalidate_resource() argument 232 struct fd_screen *screen = fd_screen(rsc->base.screen); in fd_bc_invalidate_resource() 238 foreach_batch(batch, &screen->batch_cache, rsc->batch_mask) { in fd_bc_invalidate_resource() 239 struct set_entry *entry = _mesa_set_search(batch->resources, rsc); in fd_bc_invalidate_resource() 242 rsc->batch_mask = 0; in fd_bc_invalidate_resource() 244 fd_batch_reference_locked(&rsc->write_batch, NULL); in fd_bc_invalidate_resource() 247 foreach_batch(batch, &screen->batch_cache, rsc->bc_batch_mask) in fd_bc_invalidate_resource() 250 rsc->bc_batch_mask = 0; in fd_bc_invalidate_resource() [all …]
|
/external/mesa3d/src/gallium/drivers/vc4/ |
D | vc4_resource.c | 44 vc4_resource_bo_alloc(struct vc4_resource *rsc) in vc4_resource_bo_alloc() argument 46 struct pipe_resource *prsc = &rsc->base; in vc4_resource_bo_alloc() 52 rsc, in vc4_resource_bo_alloc() 53 rsc->slices[0].size, in vc4_resource_bo_alloc() 54 rsc->slices[0].offset, in vc4_resource_bo_alloc() 55 rsc->slices[0].offset + in vc4_resource_bo_alloc() 56 rsc->slices[0].size + in vc4_resource_bo_alloc() 57 rsc->cube_map_stride * (prsc->array_size - 1)); in vc4_resource_bo_alloc() 61 rsc->slices[0].offset + in vc4_resource_bo_alloc() 62 rsc->slices[0].size + in vc4_resource_bo_alloc() [all …]
|
D | vc4_job.c | 114 struct vc4_resource *rsc = vc4_resource(prsc); in vc4_flush_jobs_reading_resource() local 125 if (referenced_bos[i] == rsc->bo) { in vc4_flush_jobs_reading_resource() 141 if (ctex->bo == rsc->bo) { in vc4_flush_jobs_reading_resource() 151 if (ztex->bo == rsc->bo) { in vc4_flush_jobs_reading_resource() 253 struct vc4_resource *rsc = vc4_resource(cbuf->texture); in vc4_get_job_for_fbo() local 254 if (!rsc->writes) in vc4_get_job_for_fbo() 259 struct vc4_resource *rsc = vc4_resource(zsbuf->texture); in vc4_get_job_for_fbo() local 260 if (!rsc->writes) in vc4_get_job_for_fbo() 292 struct vc4_resource *rsc = vc4_resource(psurf->texture); in vc4_submit_setup_rcl_surface() local 293 submit_surf->hindex = vc4_gem_hindex(job, rsc->bo); in vc4_submit_setup_rcl_surface() [all …]
|
/external/mesa3d/src/gallium/drivers/freedreno/a5xx/ |
D | fd5_resource.c | 47 setup_slices(struct fd_resource *rsc, uint32_t alignment, enum pipe_format format) in setup_slices() argument 49 struct pipe_resource *prsc = &rsc->base; in setup_slices() 61 uint32_t layers_in_level = rsc->layer_first ? 1 : prsc->array_size; in setup_slices() 63 heightalign = tile_alignment[rsc->cpp].heightalign; in setup_slices() 66 struct fd_resource_slice *slice = fd_resource_slice(rsc, level); in setup_slices() 71 if (rsc->tile_mode && !linear_level) { in setup_slices() 72 pitchalign = tile_alignment[rsc->cpp].pitchalign; in setup_slices() 105 (level > 1 && rsc->slices[level - 1].size0 > 0xf000))) in setup_slices() 106 slice->size0 = align(blocks * rsc->cpp, alignment); in setup_slices() 107 else if (level == 0 || rsc->layer_first || alignment == 1) in setup_slices() [all …]
|
D | fd5_gmem.c | 56 struct fd_resource *rsc = NULL; in emit_mrt() local 73 rsc = fd_resource(psurf->texture); in emit_mrt() 75 slice = fd_resource_slice(rsc, psurf->u.tex.level); in emit_mrt() 84 offset = fd_resource_offset(rsc, psurf->u.tex.level, in emit_mrt() 88 stride = gmem->bin_w * rsc->cpp; in emit_mrt() 92 stride = slice->pitch * rsc->cpp; in emit_mrt() 96 tile_mode = rsc->tile_mode; in emit_mrt() 112 debug_assert((offset + size) <= fd_bo_size(rsc->bo)); in emit_mrt() 113 OUT_RELOCW(ring, rsc->bo, offset, 0, 0); /* BASE_LO/HI */ in emit_mrt() 138 struct fd_resource *rsc = fd_resource(zsbuf->texture); in emit_zs() local [all …]
|
D | fd5_texture.c | 200 struct fd_resource *rsc = fd_resource(prsc); in fd5_sampler_view_create() local 208 rsc = rsc->stencil; in fd5_sampler_view_create() 209 format = rsc->base.format; in fd5_sampler_view_create() 251 A5XX_TEX_CONST_2_PITCH(elements * rsc->cpp); in fd5_sampler_view_create() 268 format, rsc->slices[lvl].pitch) * rsc->cpp); in fd5_sampler_view_create() 269 so->offset = fd_resource_offset(rsc, lvl, cso->u.tex.first_layer); in fd5_sampler_view_create() 279 A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->layer_size); in fd5_sampler_view_create() 286 A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->layer_size); in fd5_sampler_view_create() 293 A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->layer_size); in fd5_sampler_view_create() 299 A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->slices[lvl].size0); in fd5_sampler_view_create()
|
/external/libaom/libaom/av1/encoder/ |
D | pickrst.c | 120 RestSearchCtxt *rsc = (RestSearchCtxt *)priv; in rsc_on_tile() local 121 set_default_sgrproj(&rsc->sgrproj); in rsc_on_tile() 122 set_default_wiener(&rsc->wiener); in rsc_on_tile() 123 rsc->tile_stripe0 = 0; in rsc_on_tile() 126 static void reset_rsc(RestSearchCtxt *rsc) { in reset_rsc() argument 127 rsc->sse = 0; in reset_rsc() 128 rsc->bits = 0; in reset_rsc() 134 RestSearchCtxt *rsc) { in init_rsc() argument 135 rsc->src = src; in init_rsc() 136 rsc->dst = dst; in init_rsc() [all …]
|
/external/iproute2/tc/ |
D | q_hfsc.c | 147 struct tc_service_curve rsc = {}, fsc = {}, usc = {}; in hfsc_parse_class_opt() local 154 if (hfsc_get_sc(&argc, &argv, &rsc) < 0) { in hfsc_parse_class_opt() 168 if (hfsc_get_sc(&argc, &argv, &rsc) < 0) { in hfsc_parse_class_opt() 172 memcpy(&fsc, &rsc, sizeof(fsc)); in hfsc_parse_class_opt() 208 addattr_l(n, 1024, TCA_HFSC_RSC, &rsc, sizeof(rsc)); in hfsc_parse_class_opt() 233 struct tc_service_curve *rsc = NULL, *fsc = NULL, *usc = NULL; in hfsc_print_class_opt() local 241 if (RTA_PAYLOAD(tb[TCA_HFSC_RSC]) < sizeof(*rsc)) in hfsc_print_class_opt() 244 rsc = RTA_DATA(tb[TCA_HFSC_RSC]); in hfsc_print_class_opt() 260 if (rsc != NULL && fsc != NULL && in hfsc_print_class_opt() 261 memcmp(rsc, fsc, sizeof(*rsc)) == 0) in hfsc_print_class_opt() [all …]
|
/external/mesa3d/src/gallium/drivers/freedreno/a4xx/ |
D | fd4_texture.c | 226 struct fd_resource *rsc = fd_resource(prsc); in fd4_sampler_view_create() local 235 rsc = rsc->stencil; in fd4_sampler_view_create() 236 format = rsc->base.format; in fd4_sampler_view_create() 266 A4XX_TEX_CONST_2_PITCH(elements * rsc->cpp); in fd4_sampler_view_create() 283 format, rsc->slices[lvl].pitch) * rsc->cpp); in fd4_sampler_view_create() 284 so->offset = fd_resource_offset(rsc, lvl, cso->u.tex.first_layer); in fd4_sampler_view_create() 304 A4XX_TEX_CONST_3_LAYERSZ(rsc->layer_size); in fd4_sampler_view_create() 310 A4XX_TEX_CONST_3_LAYERSZ(rsc->layer_size); in fd4_sampler_view_create() 315 A4XX_TEX_CONST_3_LAYERSZ(rsc->slices[lvl].size0); in fd4_sampler_view_create() 316 while (lvl < cso->u.tex.last_level && sz2 != rsc->slices[lvl+1].size0) in fd4_sampler_view_create() [all …]
|
D | fd4_gmem.c | 65 struct fd_resource *rsc = NULL; in emit_mrt() local 75 rsc = fd_resource(psurf->texture); in emit_mrt() 80 if (rsc->stencil) { in emit_mrt() 81 rsc = rsc->stencil; in emit_mrt() 82 pformat = rsc->base.format; in emit_mrt() 87 slice = fd_resource_slice(rsc, psurf->u.tex.level); in emit_mrt() 98 offset = fd_resource_offset(rsc, psurf->u.tex.level, in emit_mrt() 102 stride = bin_w * rsc->cpp; in emit_mrt() 108 stride = slice->pitch * rsc->cpp; in emit_mrt() 124 OUT_RELOCW(ring, rsc->bo, offset, 0, 0); in emit_mrt() [all …]
|
/external/mesa3d/src/gallium/auxiliary/renderonly/ |
D | renderonly.c | 68 renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc, in renderonly_create_kms_dumb_buffer_for_resource() argument 75 .width = rsc->width0, in renderonly_create_kms_dumb_buffer_for_resource() 76 .height = rsc->height0, in renderonly_create_kms_dumb_buffer_for_resource() 77 .bpp = util_format_get_blocksizebits(rsc->format), in renderonly_create_kms_dumb_buffer_for_resource() 124 renderonly_create_gpu_import_for_resource(struct pipe_resource *rsc, in renderonly_create_gpu_import_for_resource() argument 128 struct pipe_screen *screen = rsc->screen; in renderonly_create_gpu_import_for_resource() 140 status = screen->resource_get_handle(screen, NULL, rsc, &handle, in renderonly_create_gpu_import_for_resource()
|
D | renderonly.h | 59 struct renderonly_scanout *(*create_for_resource)(struct pipe_resource *rsc, 70 renderonly_scanout_for_resource(struct pipe_resource *rsc, in renderonly_scanout_for_resource() argument 74 return ro->create_for_resource(rsc, ro, out_handle); in renderonly_scanout_for_resource() 99 renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc, 107 renderonly_create_gpu_import_for_resource(struct pipe_resource *rsc,
|