Lines Matching refs:src
42 struct d3d12_resource *src,
48 ID3D12Resource *src_buf = d3d12_resource_underlying(src, &src_off);
58 return info->src.resource->nr_samples > 1 &&
68 if (util_format_is_depth_or_stencil(info->src.format) &&
73 util_format_get_mask(info->src.format) != info->mask ||
74 util_format_has_alpha1(info->src.format))
85 struct d3d12_resource *src = d3d12_resource(info->src.resource);
87 if (src->dxgi_format != dst->dxgi_format)
90 if (util_format_is_pure_integer(src->base.b.format))
94 if (info->src.box.width != info->dst.box.width ||
95 info->src.box.height != info->dst.box.height)
99 if (info->src.box.width != (int)u_minify(info->src.resource->width0,
100 info->src.level) ||
101 info->src.box.height != (int)u_minify(info->src.resource->height0,
102 info->src.level) ||
116 struct d3d12_resource *src = d3d12_resource(info->src.resource);
119 d3d12_transition_resource_state(ctx, src,
128 d3d12_batch_reference_resource(batch, src, false);
131 DXGI_FORMAT dxgi_format = d3d12_get_resource_srv_format(src->base.b.format, src->base.b.target);
133 assert(src->dxgi_format == dst->dxgi_format);
136 d3d12_resource_resource(src), info->src.level,
141 formats_are_copy_compatible(enum pipe_format src, enum pipe_format dst)
143 if (src == dst)
147 if (util_format_get_depth_only(src) == dst ||
148 util_format_get_depth_only(dst) == src)
183 MAX2(info->src.resource->nr_samples, 1) != MAX2(info->dst.resource->nr_samples, 1)) {
187 if (!formats_are_copy_compatible(info->src.format, info->dst.format))
190 if (util_format_is_depth_or_stencil(info->src.format) && !(info->mask & PIPE_MASK_ZS)) {
194 if (!util_format_is_depth_or_stencil(info->src.format)) {
196 util_format_get_mask(info->src.format) != info->mask)
200 if (abs(info->src.box.height) != info->dst.box.height) {
204 if (info->src.box.height != info->dst.box.height &&
205 (!util_format_is_depth_or_stencil(info->src.format) ||
214 if (!box_fits(&info->src.box, info->src.resource, info->src.level)) {
218 if (info->src.box.width != info->dst.box.width) {
222 if (info->src.box.depth != info->dst.box.depth) {
228 (info->src.resource->bind & PIPE_BIND_DEPTH_STENCIL ||
230 info->src.resource->nr_samples != info->dst.resource->nr_samples) {
237 if (info->src.box.x != 0 ||
238 info->src.box.y != 0 ||
239 info->src.box.z != 0 ||
240 info->src.box.width != (int)u_minify(info->src.resource->width0,
241 info->src.level) ||
242 info->src.box.height != (int)u_minify(info->src.resource->height0,
243 info->src.level) ||
244 info->src.box.depth != (int)u_minify(info->src.resource->depth0,
245 info->src.level))
269 struct d3d12_resource *src,
278 int src_subres_stride = src->base.b.last_level + 1;
281 int src_array_size = src->base.b.array_size;
287 if (src->base.b.target == PIPE_TEXTURE_CUBE)
303 if (src->base.b.format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
304 src->base.b.format == PIPE_FORMAT_S8_UINT_Z24_UNORM ||
320 src_loc.SubresourceIndex = get_subresource_id(src->base.b.target, src_level, src_subres_stride, src_z, &src_z, src_array_size, src->plane_slice) +
322 src_loc.pResource = d3d12_resource_resource(src);
330 psrc_box->width == (int)u_minify(src->base.b.width0, src_level) &&
331 psrc_box->height == (int)u_minify(src->base.b.height0, src_level) &&
332 psrc_box->depth == (int)u_minify(src->base.b.depth0, src_level)) {
338 !util_format_is_depth_or_stencil(src->base.b.format) &&
339 dst->base.b.nr_samples == src->base.b.nr_samples));
347 src_box.right = MIN2(psrc_box->x + psrc_box->width, (int)u_minify(src->base.b.width0, src_level));
349 src_box.bottom = MIN2(psrc_box->y + psrc_box->height, (int)u_minify(src->base.b.height0, src_level));
356 !util_format_is_depth_or_stencil(src->base.b.format))) &&
357 dst->base.b.nr_samples == src->base.b.nr_samples);
370 struct d3d12_resource *src,
377 util_format_name(src->base.b.format), src_level,
398 src, src_level, &src_box, mask);
407 struct d3d12_resource *src,
414 unsigned src_subres = get_subresource_id(src->base.b.target, src_level, src->base.b.last_level + 1,
415 psrc_box->z, nullptr, src->base.b.array_size, src->plane_slice);
423 d3d12_transition_subresources_state(ctx, src, src_subres, 1, 0, 1,
424 d3d12_get_format_start_plane(src->base.b.format),
425 d3d12_get_format_num_planes(src->base.b.format),
437 d3d12_batch_reference_resource(batch, src, false);
440 if (src->base.b.target == PIPE_BUFFER) {
442 src, psrc_box->x, psrc_box->width);
447 src, src_level, psrc_box, mask);
451 src, src_level, psrc_box, mask);
458 return d3d12_resource_resource(d3d12_resource(info->src.resource)) ==
460 info->src.level == info->dst.level;
465 struct d3d12_resource *src,
482 templ.format = src->base.b.format;
487 templ.nr_samples = src->base.b.nr_samples;
488 templ.nr_storage_samples = src->base.b.nr_storage_samples;
491 templ.target = src->base.b.target;
503 src, src_level, ©_src, mask);
528 dst_info.src.level = 0;
529 dst_info.src.resource = create_staging_resource(ctx, d3d12_resource(info->src.resource),
530 info->src.level,
531 &info->src.box,
532 &dst_info.src.box, PIPE_MASK_RGBAZS);
534 pipe_resource_reference(&dst_info.src.resource, NULL);
581 if (!util_format_is_depth_or_stencil(info->src.format) ||
685 txs->src[0].src_type = nir_tex_src_texture_deref;
686 txs->src[0].src = nir_src_for_ssa(tex_deref);
708 tex->src[0].src_type = nir_tex_src_coord;
709 tex->src[0].src = nir_src_for_ssa(nir_channels(&b, nir_f2i32(&b, pos_src), 0x3));
710 tex->src[1].src_type = nir_tex_src_ms_index;
711 tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0)); /* just use first sample */
712 tex->src[2].src_type = nir_tex_src_texture_deref;
713 tex->src[2].src = nir_src_for_ssa(tex_deref);
778 info->src.resource, info->src.level);
779 src_templ.format = util_format_stencil_only(info->src.format);
780 src_view = pctx->create_sampler_view(pctx, info->src.resource, &src_templ);
789 get_stencil_resolve_fs(ctx, info->src.box.height == info->dst.box.height));
862 if (!util_format_is_depth_or_stencil(info->src.format) ||
896 info->src.resource,
897 info->src.level,
898 &info->src.box,
916 util_format_name(info->src.format), info->src.level,
917 info->src.resource->nr_samples,
918 info->src.box.x, info->src.box.y, info->src.box.z,
919 info->src.box.width, info->src.box.height, info->src.box.depth);
942 util_format_short_name(info->src.resource->format),
948 d3d12_resource(info->src.resource),
949 info->src.level, &info->src.box, info->mask);
956 util_format_short_name(info->src.resource->format),
978 struct d3d12_resource *src = d3d12_resource(psrc);
995 if (d3d12_resource_resource(dst) == d3d12_resource_resource(src) && dst_level == src_level) {
996 staging_res = create_staging_resource(ctx, src, src_level, psrc_box, &staging_box, PIPE_MASK_RGBAZS);
997 src = d3d12_resource(staging_res);
1009 src, src_level, src_box, PIPE_MASK_RGBAZS);