/external/mesa3d/src/gallium/drivers/freedreno/ |
D | freedreno_resource.c | 72 struct pipe_resource *prsc = &rsc->base; in rebind_resource_in_ctx() local 81 if (vb->vb[i].buffer.resource == prsc) in rebind_resource_in_ctx() 102 if (cb->cb[i].buffer == prsc) { in rebind_resource_in_ctx() 115 if (tex->textures[i] && (tex->textures[i]->texture == prsc)) { in rebind_resource_in_ctx() 129 if (si->si[i].resource == prsc) { in rebind_resource_in_ctx() 143 if (sb->sb[i].buffer == prsc) { in rebind_resource_in_ctx() 181 struct pipe_resource *prsc = &rsc->base; in realloc_bo() local 185 COND(prsc->bind & PIPE_BIND_SCANOUT, DRM_FREEDRENO_GEM_SCANOUT); in realloc_bo() 196 prsc->width0, prsc->height0, prsc->depth0, rsc->layout.cpp, prsc->bind); in realloc_bo() 243 struct pipe_resource *prsc = &rsc->base; in fd_try_shadow_resource() local [all …]
|
D | freedreno_resource.h | 169 fd_resource_set_usage(struct pipe_resource *prsc, enum fd_dirty_3d_state usage) in fd_resource_set_usage() argument 171 if (!prsc) in fd_resource_set_usage() 173 struct fd_resource *rsc = fd_resource(prsc); in fd_resource_set_usage() 246 fd_resource_level_linear(const struct pipe_resource *prsc, int level) in fd_resource_level_linear() argument 248 struct fd_screen *screen = fd_screen(prsc->screen); in fd_resource_level_linear() 251 return fdl_level_linear(&fd_resource_const(prsc)->layout, level); in fd_resource_level_linear() 255 fd_resource_tile_mode(struct pipe_resource *prsc, int level) in fd_resource_tile_mode() argument 257 return fdl_tile_mode(&fd_resource(prsc)->layout, level); in fd_resource_tile_mode() 270 fd_resource_nr_samples(struct pipe_resource *prsc) in fd_resource_nr_samples() argument 272 return MAX2(1, prsc->nr_samples); in fd_resource_nr_samples() [all …]
|
/external/mesa3d/src/gallium/drivers/freedreno/a6xx/ |
D | fd6_resource.c | 148 struct pipe_resource *prsc = &rsc->base; in fd6_setup_slices() local 156 fdl6_layout(&rsc->layout, prsc->format, fd_resource_nr_samples(prsc), in fd6_setup_slices() 157 prsc->width0, prsc->height0, prsc->depth0, in fd6_setup_slices() 158 prsc->last_level + 1, prsc->array_size, in fd6_setup_slices() 159 prsc->target == PIPE_TEXTURE_3D, in fd6_setup_slices() 168 struct pipe_resource *prsc = &rsc->base; in fill_ubwc_buffer_sizes() local 175 if ((prsc->depth0 != 1) || (prsc->array_size != 1) || (prsc->last_level != 0)) in fill_ubwc_buffer_sizes() 177 if (prsc->target != PIPE_TEXTURE_2D) in fill_ubwc_buffer_sizes() 179 if (!ok_ubwc_format(rsc, prsc->format)) in fill_ubwc_buffer_sizes() 185 if (!fdl6_layout(&rsc->layout, prsc->format, fd_resource_nr_samples(prsc), in fill_ubwc_buffer_sizes() [all …]
|
D | fd6_image.c | 39 struct pipe_resource *prsc; member 60 struct pipe_resource *prsc = pimg->resource; in translate_image() local 61 struct fd_resource *rsc = fd_resource(prsc); in translate_image() 63 if (!prsc) { in translate_image() 68 img->prsc = prsc; in translate_image() 71 img->type = fd6_tex_type(prsc->target); in translate_image() 80 if (prsc->target == PIPE_BUFFER) { in translate_image() 104 switch (prsc->target) { in translate_image() 122 img->depth = u_minify(prsc->depth0, lvl); in translate_image() 129 img->width = u_minify(prsc->width0, lvl); in translate_image() [all …]
|
/external/mesa3d/src/gallium/drivers/v3d/ |
D | v3d_resource.c | 48 struct pipe_resource *prsc = &rsc->base; in v3d_debug_resource_layout() local 50 if (prsc->target == PIPE_BUFFER) { in v3d_debug_resource_layout() 54 util_format_short_name(prsc->format), in v3d_debug_resource_layout() 55 prsc->width0, prsc->height0, in v3d_debug_resource_layout() 70 for (int i = 0; i <= prsc->last_level; i++) { in v3d_debug_resource_layout() 76 u_minify(util_next_power_of_two(prsc->depth0), i); in v3d_debug_resource_layout() 82 util_format_short_name(prsc->format), in v3d_debug_resource_layout() 83 prsc->width0, prsc->height0, in v3d_debug_resource_layout() 85 u_minify(prsc->width0, i), in v3d_debug_resource_layout() 86 u_minify(prsc->height0, i), in v3d_debug_resource_layout() [all …]
|
D | v3d_job.c | 52 const struct pipe_resource *prsc = entry->key; in v3d_job_free() local 54 _mesa_hash_table_remove_key(v3d->write_jobs, prsc); in v3d_job_free() 135 v3d_job_add_write_resource(struct v3d_job *job, struct pipe_resource *prsc) in v3d_job_add_write_resource() argument 145 _mesa_set_add(job->write_prscs, prsc); in v3d_job_add_write_resource() 146 _mesa_hash_table_insert(v3d->write_jobs, prsc, job); in v3d_job_add_write_resource() 161 v3d_job_add_tf_write_resource(struct v3d_job *job, struct pipe_resource *prsc) in v3d_job_add_tf_write_resource() argument 163 v3d_job_add_write_resource(job, prsc); in v3d_job_add_tf_write_resource() 168 _mesa_set_add(job->tf_write_prscs, prsc); in v3d_job_add_tf_write_resource() 173 struct pipe_resource *prsc) in v3d_job_writes_resource_from_tf() argument 181 return _mesa_set_search(job->tf_write_prscs, prsc) != NULL; in v3d_job_writes_resource_from_tf() [all …]
|
D | v3dx_state.c | 833 struct pipe_resource *prsc, in v3d_setup_texture_shader_state() argument 837 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_setup_texture_shader_state() 838 int msaa_scale = prsc->nr_samples > 1 ? 2 : 1; in v3d_setup_texture_shader_state() 840 tex->image_width = prsc->width0 * msaa_scale; in v3d_setup_texture_shader_state() 841 tex->image_height = prsc->height0 * msaa_scale; in v3d_setup_texture_shader_state() 847 if (prsc->target == PIPE_TEXTURE_1D || in v3d_setup_texture_shader_state() 848 prsc->target == PIPE_TEXTURE_1D_ARRAY) { in v3d_setup_texture_shader_state() 856 if (prsc->target == PIPE_TEXTURE_3D) { in v3d_setup_texture_shader_state() 857 tex->image_depth = prsc->depth0; in v3d_setup_texture_shader_state() 872 v3d_layer_offset(prsc, 0, first_layer)); in v3d_setup_texture_shader_state() [all …]
|
/external/mesa3d/src/gallium/auxiliary/util/ |
D | u_transfer_helper.c | 42 static inline bool handle_transfer(struct pipe_resource *prsc) in handle_transfer() argument 44 struct u_transfer_helper *helper = prsc->screen->transfer_helper; in handle_transfer() 48 helper->vtbl->get_internal_format(prsc); in handle_transfer() 49 if (internal_format != prsc->format) in handle_transfer() 53 if (helper->msaa_map && (prsc->nr_samples > 1)) in handle_transfer() 90 struct pipe_resource *prsc; in u_transfer_helper_resource_create() local 99 prsc = helper->vtbl->resource_create(pscreen, &t); in u_transfer_helper_resource_create() 100 if (!prsc) in u_transfer_helper_resource_create() 103 prsc->format = format; /* frob the format back to the "external" format */ in u_transfer_helper_resource_create() 109 helper->vtbl->resource_destroy(pscreen, prsc); in u_transfer_helper_resource_create() [all …]
|
D | u_transfer_helper.h | 60 struct pipe_resource *prsc); 63 struct pipe_resource *prsc, 88 enum pipe_format (*get_internal_format)(struct pipe_resource *prsc); 97 void (*set_stencil)(struct pipe_resource *prsc, struct pipe_resource *stencil); 98 struct pipe_resource *(*get_stencil)(struct pipe_resource *prsc); 105 struct pipe_resource *prsc); 108 struct pipe_resource *prsc, 134 struct pipe_resource *prsc,
|
/external/mesa3d/src/gallium/drivers/vc4/ |
D | vc4_resource.c | 44 struct pipe_resource *prsc = &rsc->base; in vc4_resource_bo_alloc() local 45 struct pipe_screen *pscreen = prsc->screen; in vc4_resource_bo_alloc() 55 rsc->cube_map_stride * (prsc->array_size - 1)); in vc4_resource_bo_alloc() 61 rsc->cube_map_stride * (prsc->array_size - 1), in vc4_resource_bo_alloc() 100 struct pipe_resource *prsc, in vc4_resource_transfer_map() argument 106 struct vc4_resource *rsc = vc4_resource(prsc); in vc4_resource_transfer_map() 109 enum pipe_format format = prsc->format; in vc4_resource_transfer_map() 117 !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) && in vc4_resource_transfer_map() 118 prsc->last_level == 0 && in vc4_resource_transfer_map() 119 prsc->width0 == box->width && in vc4_resource_transfer_map() [all …]
|
D | vc4_state.c | 550 vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, in vc4_create_sampler_view() argument 554 struct vc4_resource *rsc = vc4_resource(prsc); in vc4_create_sampler_view() 562 pipe_resource_reference(&so->base.texture, prsc); in vc4_create_sampler_view() 579 .target = prsc->target, in vc4_create_sampler_view() 580 .format = prsc->format, in vc4_create_sampler_view() 581 .width0 = u_minify(prsc->width0, in vc4_create_sampler_view() 583 .height0 = u_minify(prsc->height0, in vc4_create_sampler_view() 587 .nr_samples = prsc->nr_samples, in vc4_create_sampler_view() 593 prsc = vc4_resource_create(pctx->screen, &tmpl); in vc4_create_sampler_view() 594 if (!prsc) { in vc4_create_sampler_view() [all …]
|
/external/mesa3d/src/gallium/drivers/freedreno/a5xx/ |
D | fd5_resource.c | 60 struct pipe_resource *prsc = &rsc->base; in fd5_setup_slices() local 65 fdl5_layout(&rsc->layout, prsc->format, fd_resource_nr_samples(prsc), in fd5_setup_slices() 66 prsc->width0, prsc->height0, prsc->depth0, in fd5_setup_slices() 67 prsc->last_level + 1, prsc->array_size, in fd5_setup_slices() 68 prsc->target == PIPE_TEXTURE_3D); in fd5_setup_slices()
|
D | fd5_image.c | 62 struct pipe_resource *prsc = pimg->resource; in translate_image() local 63 struct fd_resource *rsc = fd_resource(prsc); in translate_image() 73 img->type = fd5_tex_type(prsc->target); in translate_image() 78 if (prsc->target == PIPE_BUFFER) { in translate_image() 88 img->width = u_minify(prsc->width0, lvl); in translate_image() 89 img->height = u_minify(prsc->height0, lvl); in translate_image() 93 switch (prsc->target) { in translate_image() 112 img->depth = u_minify(prsc->depth0, lvl); in translate_image()
|
D | fd5_texture.c | 205 fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, in fd5_sampler_view_create() argument 209 struct fd_resource *rsc = fd_resource(prsc); in fd5_sampler_view_create() 222 pipe_reference(NULL, &prsc->reference); in fd5_sampler_view_create() 223 so->base.texture = prsc; in fd5_sampler_view_create() 229 A5XX_TEX_CONST_0_SAMPLES(fd_msaa_samples(prsc->nr_samples)) | in fd5_sampler_view_create() 271 A5XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) | in fd5_sampler_view_create() 272 A5XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl)); in fd5_sampler_view_create() 307 fd_resource_slice(rsc, prsc->last_level)->size0) | in fd5_sampler_view_create() 310 A5XX_TEX_CONST_5_DEPTH(u_minify(prsc->depth0, lvl)); in fd5_sampler_view_create()
|
/external/mesa3d/src/gallium/drivers/freedreno/a4xx/ |
D | fd4_resource.c | 33 struct pipe_resource *prsc = &rsc->base; in fd4_setup_slices() local 34 enum pipe_format format = prsc->format; in fd4_setup_slices() 36 uint32_t width = prsc->width0; in fd4_setup_slices() 37 uint32_t height = prsc->height0; in fd4_setup_slices() 38 uint32_t depth = prsc->depth0; in fd4_setup_slices() 44 if (prsc->target == PIPE_TEXTURE_3D) { in fd4_setup_slices() 46 layers_in_level = prsc->array_size; in fd4_setup_slices() 57 for (level = 0; level <= prsc->last_level; level++) { in fd4_setup_slices() 69 if (prsc->target == PIPE_TEXTURE_3D && in fd4_setup_slices()
|
/external/mesa3d/src/gallium/drivers/freedreno/a3xx/ |
D | fd3_resource.c | 31 struct pipe_resource *prsc = &rsc->base; in setup_slices() local 33 uint32_t width0 = prsc->width0; in setup_slices() 35 if (rsc->layout.tile_mode && prsc->target != PIPE_TEXTURE_CUBE) in setup_slices() 41 for (level = 0; level <= prsc->last_level; level++) { in setup_slices() 44 uint32_t height = u_minify(prsc->height0, level); in setup_slices() 47 if (prsc->target != PIPE_TEXTURE_CUBE) in setup_slices() 60 if (prsc->target == PIPE_TEXTURE_3D && ( in setup_slices() 69 size += slice->size0 * u_minify(prsc->depth0, level) * prsc->array_size; in setup_slices()
|
D | fd3_texture.c | 219 fd3_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, in fd3_sampler_view_create() argument 223 struct fd_resource *rsc = fd_resource(prsc); in fd3_sampler_view_create() 230 pipe_reference(NULL, &prsc->reference); in fd3_sampler_view_create() 231 so->base.texture = prsc; in fd3_sampler_view_create() 237 A3XX_TEX_CONST_0_TYPE(tex_type(prsc->target)) | in fd3_sampler_view_create() 242 if (prsc->target == PIPE_BUFFER || util_format_is_pure_integer(cso->format)) in fd3_sampler_view_create() 247 if (prsc->target == PIPE_BUFFER) { in fd3_sampler_view_create() 261 A3XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) | in fd3_sampler_view_create() 262 A3XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl)); in fd3_sampler_view_create() 268 switch (prsc->target) { in fd3_sampler_view_create() [all …]
|
/external/mesa3d/src/gallium/drivers/etnaviv/ |
D | etnaviv_transfer.c | 63 struct pipe_resource *prsc = ptrans->resource; in etna_patch_data() local 64 struct etna_resource *rsc = etna_resource(prsc); in etna_patch_data() 67 if (likely(!etna_etc2_needs_patching(prsc))) in etna_patch_data() 79 prsc->format, level->patch_offsets); in etna_patch_data() 89 struct pipe_resource *prsc = ptrans->resource; in etna_unpatch_data() local 90 struct etna_resource *rsc = etna_resource(prsc); in etna_unpatch_data() 191 etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc, in etna_transfer_map() argument 199 struct etna_resource *rsc = etna_resource(prsc); in etna_transfer_map() 202 enum pipe_format format = prsc->format; in etna_transfer_map() 215 (prsc->target == PIPE_BUFFER) && in etna_transfer_map() [all …]
|
D | etnaviv_resource.c | 165 struct pipe_resource *prsc = &rsc->base; in setup_miptree() local 167 unsigned width = prsc->width0; in setup_miptree() 168 unsigned height = prsc->height0; in setup_miptree() 169 unsigned depth = prsc->depth0; in setup_miptree() 171 for (level = 0; level <= prsc->last_level; level++) { in setup_miptree() 179 mip->stride = util_format_get_stride(prsc->format, mip->padded_width); in setup_miptree() 181 mip->layer_stride = mip->stride * util_format_get_nblocksy(prsc->format, mip->padded_height); in setup_miptree() 182 mip->size = prsc->array_size * mip->layer_stride; in setup_miptree() 448 etna_resource_changed(struct pipe_screen *pscreen, struct pipe_resource *prsc) in etna_resource_changed() argument 450 etna_resource(prsc)->seqno++; in etna_resource_changed() [all …]
|
D | etnaviv_resource.h | 155 etna_resource_used(struct etna_context *ctx, struct pipe_resource *prsc, 159 resource_read(struct etna_context *ctx, struct pipe_resource *prsc) in resource_read() argument 161 etna_resource_used(ctx, prsc, ETNA_PENDING_READ); in resource_read() 165 resource_written(struct etna_context *ctx, struct pipe_resource *prsc) in resource_written() argument 167 etna_resource_used(ctx, prsc, ETNA_PENDING_WRITE); in resource_written() 176 struct etna_resource *prsc);
|
D | etnaviv_surface.c | 43 etna_render_handle_incompatible(struct pipe_context *pctx, struct pipe_resource *prsc) in etna_render_handle_incompatible() argument 47 struct etna_resource *res = etna_resource(prsc); in etna_render_handle_incompatible() 59 struct pipe_resource templat = *prsc; in etna_render_handle_incompatible() 77 etna_create_surface(struct pipe_context *pctx, struct pipe_resource *prsc, in etna_create_surface() argument 82 struct etna_resource *rsc = etna_render_handle_incompatible(pctx, prsc); in etna_create_surface() 97 pipe_resource_reference(&surf->prsc, prsc); in etna_create_surface() 111 etna_resource_hw_tileable(screen->specs.use_blt, prsc)) { in etna_create_surface() 191 pipe_resource_reference(&etna_surface(psurf)->prsc, NULL); in etna_surface_destroy()
|
D | etnaviv_query_acc.c | 53 pipe_resource_reference(&aq->prsc, NULL); in etna_acc_destroy_query() 65 pipe_resource_reference(&aq->prsc, NULL); in realloc_query_bo() 68 aq->prsc = pipe_buffer_create(&ctx->screen->base, PIPE_BIND_QUERY_BUFFER, in realloc_query_bo() 72 rsc = etna_resource(aq->prsc); in realloc_query_bo() 116 struct etna_resource *rsc = etna_resource(aq->prsc); in etna_acc_get_query_result()
|
D | etnaviv_etc2.c | 35 etna_etc2_needs_patching(const struct pipe_resource *prsc) in etna_etc2_needs_patching() argument 37 const struct etna_screen *screen = etna_screen(prsc->screen); in etna_etc2_needs_patching() 39 if (!util_format_is_etc(prsc->format)) in etna_etc2_needs_patching() 45 switch (prsc->format) { in etna_etc2_needs_patching()
|
/external/mesa3d/src/gallium/drivers/freedreno/a2xx/ |
D | fd2_resource.c | 32 struct pipe_resource *prsc = &rsc->base; in fd2_setup_slices() local 34 uint32_t height0 = util_format_get_nblocksy(format, prsc->height0); in fd2_setup_slices() 40 for (level = 0; level <= prsc->last_level; level++) { in fd2_setup_slices() 52 size += slice->size0 * u_minify(prsc->depth0, level) * prsc->array_size; in fd2_setup_slices()
|
D | fd2_texture.c | 168 fd2_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, in fd2_sampler_view_create() argument 172 struct fd_resource *rsc = fd_resource(prsc); in fd2_sampler_view_create() 179 pipe_reference(NULL, &prsc->reference); in fd2_sampler_view_create() 180 so->base.texture = prsc; in fd2_sampler_view_create() 190 util_format_get_blockwidth(prsc->format)) | in fd2_sampler_view_create() 196 A2XX_SQ_TEX_2_HEIGHT(prsc->height0 - 1) | in fd2_sampler_view_create() 197 A2XX_SQ_TEX_2_WIDTH(prsc->width0 - 1); in fd2_sampler_view_create() 208 so->tex5 = A2XX_SQ_TEX_5_DIMENSION(tex_dimension(prsc->target)); in fd2_sampler_view_create()
|