Lines Matching refs:prsc
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()
87 u_minify(prsc->depth0, i), in v3d_debug_resource_layout()
99 struct pipe_resource *prsc = &rsc->base; in v3d_resource_bo_alloc() local
100 struct pipe_screen *pscreen = prsc->screen; in v3d_resource_bo_alloc()
174 struct pipe_resource *prsc, in v3d_map_usage_prep() argument
178 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_map_usage_prep()
186 if (prsc->bind & PIPE_BIND_VERTEX_BUFFER) in v3d_map_usage_prep()
188 if (prsc->bind & PIPE_BIND_CONSTANT_BUFFER) in v3d_map_usage_prep()
190 if (prsc->bind & PIPE_BIND_SAMPLER_VIEW) in v3d_map_usage_prep()
196 v3d_flush_jobs_reading_resource(v3d, prsc, in v3d_map_usage_prep()
206 v3d_flush_jobs_reading_resource(v3d, prsc, in v3d_map_usage_prep()
210 v3d_flush_jobs_writing_resource(v3d, prsc, in v3d_map_usage_prep()
224 struct pipe_resource *prsc, in v3d_resource_transfer_map() argument
230 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_resource_transfer_map()
233 enum pipe_format format = prsc->format; in v3d_resource_transfer_map()
237 assert(prsc->nr_samples <= 1); in v3d_resource_transfer_map()
244 !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) && in v3d_resource_transfer_map()
245 prsc->last_level == 0 && in v3d_resource_transfer_map()
246 prsc->width0 == box->width && in v3d_resource_transfer_map()
247 prsc->height0 == box->height && in v3d_resource_transfer_map()
248 prsc->depth0 == box->depth && in v3d_resource_transfer_map()
249 prsc->array_size == 1 && in v3d_resource_transfer_map()
254 v3d_map_usage_prep(pctx, prsc, usage); in v3d_resource_transfer_map()
266 pipe_resource_reference(&ptrans->resource, prsc); in v3d_resource_transfer_map()
343 struct pipe_resource *prsc, in v3d_texture_subdata() argument
351 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_texture_subdata()
356 return u_default_texture_subdata(pctx, prsc, level, usage, box, in v3d_texture_subdata()
364 v3d_map_usage_prep(pctx, prsc, usage | (PIPE_MAP_WRITE | in v3d_texture_subdata()
388 struct pipe_resource *prsc) in v3d_resource_destroy() argument
391 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_resource_destroy()
403 struct pipe_resource *prsc, in v3d_resource_get_handle() argument
408 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_resource_get_handle()
501 struct pipe_resource *prsc = &rsc->base; in v3d_setup_slices() local
502 uint32_t width = prsc->width0; in v3d_setup_slices()
503 uint32_t height = prsc->height0; in v3d_setup_slices()
504 uint32_t depth = prsc->depth0; in v3d_setup_slices()
518 uint32_t block_width = util_format_get_blockwidth(prsc->format); in v3d_setup_slices()
519 uint32_t block_height = util_format_get_blockheight(prsc->format); in v3d_setup_slices()
520 bool msaa = prsc->nr_samples > 1; in v3d_setup_slices()
530 assert(prsc->array_size != 0); in v3d_setup_slices()
531 assert(prsc->depth0 != 0); in v3d_setup_slices()
533 for (int i = prsc->last_level; i >= 0; i--) { in v3d_setup_slices()
559 if (prsc->target == PIPE_TEXTURE_1D) in v3d_setup_slices()
646 for (int i = 0; i <= prsc->last_level; i++) in v3d_setup_slices()
654 if (prsc->target != PIPE_TEXTURE_3D) { in v3d_setup_slices()
657 rsc->size += rsc->cube_map_stride * (prsc->array_size - 1); in v3d_setup_slices()
664 v3d_layer_offset(struct pipe_resource *prsc, uint32_t level, uint32_t layer) in v3d_layer_offset() argument
666 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_layer_offset()
669 if (prsc->target == PIPE_TEXTURE_3D) in v3d_layer_offset()
683 struct pipe_resource *prsc = &rsc->base; in v3d_resource_setup() local
685 *prsc = *tmpl; in v3d_resource_setup()
687 pipe_reference_init(&prsc->reference, 1); in v3d_resource_setup()
688 prsc->screen = pscreen; in v3d_resource_setup()
690 if (prsc->nr_samples <= 1 || in v3d_resource_setup()
692 util_format_is_depth_or_stencil(prsc->format)) { in v3d_resource_setup()
693 rsc->cpp = util_format_get_blocksize(prsc->format); in v3d_resource_setup()
694 if (screen->devinfo.ver < 40 && prsc->nr_samples > 1) in v3d_resource_setup()
695 rsc->cpp *= prsc->nr_samples; in v3d_resource_setup()
697 assert(v3d_rt_format_supported(&screen->devinfo, prsc->format)); in v3d_resource_setup()
699 v3d_get_rt_format(&screen->devinfo, prsc->format); in v3d_resource_setup()
734 struct pipe_resource *prsc = &rsc->base; in v3d_resource_create_with_modifiers() local
780 rsc->internal_format = prsc->format; in v3d_resource_create_with_modifiers()
796 .target = prsc->target, in v3d_resource_create_with_modifiers()
822 return prsc; in v3d_resource_create_with_modifiers()
828 return prsc; in v3d_resource_create_with_modifiers()
830 v3d_resource_destroy(pscreen, prsc); in v3d_resource_create_with_modifiers()
850 struct pipe_resource *prsc = &rsc->base; in v3d_resource_from_handle() local
890 rsc->internal_format = prsc->format; in v3d_resource_from_handle()
921 renderonly_create_gpu_import_for_resource(prsc, in v3d_resource_from_handle()
937 prsc->width0, prsc->height0, in v3d_resource_from_handle()
938 util_format_short_name(prsc->format), in v3d_resource_from_handle()
947 return prsc; in v3d_resource_from_handle()
950 v3d_resource_destroy(pscreen, prsc); in v3d_resource_from_handle()
1108 v3d_resource_get_internal_format(struct pipe_resource *prsc) in v3d_resource_get_internal_format() argument
1110 return v3d_resource(prsc)->internal_format; in v3d_resource_get_internal_format()
1114 v3d_resource_set_stencil(struct pipe_resource *prsc, in v3d_resource_set_stencil() argument
1117 v3d_resource(prsc)->separate_stencil = v3d_resource(stencil); in v3d_resource_set_stencil()
1121 v3d_resource_get_stencil(struct pipe_resource *prsc) in v3d_resource_get_stencil() argument
1123 struct v3d_resource *rsc = v3d_resource(prsc); in v3d_resource_get_stencil()