Lines Matching refs:src_res
8188 struct vrend_resource *src_res, *dst_res; in vrend_renderer_copy_transfer3d() local
8190 src_res = vrend_renderer_ctx_res_lookup(ctx, src_handle); in vrend_renderer_copy_transfer3d()
8193 if (!src_res) { in vrend_renderer_copy_transfer3d()
8203 if (!src_res->iov) { in vrend_renderer_copy_transfer3d()
8213 if (!check_iov_bounds(dst_res, info, src_res->iov, src_res->num_iovs)) { in vrend_renderer_copy_transfer3d()
8240 src_res->iov, in vrend_renderer_copy_transfer3d()
8241 src_res->num_iovs, in vrend_renderer_copy_transfer3d()
8247 return vrend_renderer_transfer_write_iov(ctx, dst_res, src_res->iov, in vrend_renderer_copy_transfer3d()
8248 src_res->num_iovs, info); in vrend_renderer_copy_transfer3d()
8442 struct vrend_resource *src_res, in vrend_resource_buffer_copy() argument
8447 glBindBuffer(GL_COPY_READ_BUFFER, src_res->id); in vrend_resource_buffer_copy()
8455 static void vrend_resource_copy_fallback(struct vrend_resource *src_res, in vrend_resource_copy_fallback() argument
8472 if (src_res->target == GL_TEXTURE_CUBE_MAP) in vrend_resource_copy_fallback()
8475 if (src_res->base.format != dst_res->base.format) { in vrend_resource_copy_fallback()
8476 …vrend_printf( "copy fallback failed due to mismatched formats %d %d\n", src_res->base.format, dst_… in vrend_resource_copy_fallback()
8481 box.depth = vrend_get_texture_depth(src_res, src_level); in vrend_resource_copy_fallback()
8485 …lice_size = util_format_get_nblocks(src_res->base.format, u_minify(src_res->base.width0, src_level… in vrend_resource_copy_fallback()
8486 util_format_get_blocksize(src_res->base.format); in vrend_resource_copy_fallback()
8487 total_size = slice_size * vrend_get_texture_depth(src_res, src_level); in vrend_resource_copy_fallback()
8493 glformat = tex_conv_table[src_res->base.format].glformat; in vrend_resource_copy_fallback()
8494 gltype = tex_conv_table[src_res->base.format].gltype; in vrend_resource_copy_fallback()
8497 glformat = tex_conv_table[src_res->base.format].internalformat; in vrend_resource_copy_fallback()
8506 src_offset = src_res->mipmap_offsets[src_level]; in vrend_resource_copy_fallback()
8510 src_stride = util_format_get_nblocksx(src_res->base.format, in vrend_resource_copy_fallback()
8511 u_minify(src_res->base.width0, src_level)) * elsize; in vrend_resource_copy_fallback()
8512 src_layer_stride = util_format_get_2d_size(src_res->base.format, in vrend_resource_copy_fallback()
8514 u_minify(src_res->base.height0, src_level)); in vrend_resource_copy_fallback()
8515 read_transfer_data(src_res->iov, src_res->num_iovs, tptr, in vrend_resource_copy_fallback()
8516 src_res->base.format, src_offset, in vrend_resource_copy_fallback()
8548 glBindTexture(src_res->target, src_res->id); in vrend_resource_copy_fallback()
8550 read_chunk_size = (src_res->target == GL_TEXTURE_CUBE_MAP) ? slice_size : total_size; in vrend_resource_copy_fallback()
8552 GLenum ctarget = src_res->target == GL_TEXTURE_CUBE_MAP ? in vrend_resource_copy_fallback()
8553 (GLenum)(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i) : src_res->target; in vrend_resource_copy_fallback()
8590 cube_slice = (src_res->target == GL_TEXTURE_CUBE_MAP) ? src_box->z + src_box->depth : cube_slice; in vrend_resource_copy_fallback()
8591 i = (src_res->target == GL_TEXTURE_CUBE_MAP) ? src_box->z : 0; in vrend_resource_copy_fallback()
8636 vrend_copy_sub_image(struct vrend_resource* src_res, struct vrend_resource * dst_res, in vrend_copy_sub_image() argument
8641 GLenum src_target = tgsitargettogltarget(src_res->base.target, src_res->base.nr_samples); in vrend_copy_sub_image()
8649 glCopyImageSubData(src_res->id, src_target, src_level, in vrend_copy_sub_image()
8663 struct vrend_resource *src_res, *dst_res; in vrend_renderer_resource_copy_region() local
8670 src_res = vrend_renderer_ctx_res_lookup(ctx, src_handle); in vrend_renderer_resource_copy_region()
8673 if (!src_res) { in vrend_renderer_resource_copy_region()
8684 util_format_name(src_res->base.format), src_res->base.nr_samples, in vrend_renderer_resource_copy_region()
8691 if (src_res->base.target == PIPE_BUFFER && dst_res->base.target == PIPE_BUFFER) { in vrend_renderer_resource_copy_region()
8695 vrend_resource_buffer_copy(ctx, src_res, dst_res, dstx, in vrend_renderer_resource_copy_region()
8701 format_is_copy_compatible(src_res->base.format,dst_res->base.format, true) && in vrend_renderer_resource_copy_region()
8702 src_res->base.nr_samples == dst_res->base.nr_samples) { in vrend_renderer_resource_copy_region()
8704 vrend_copy_sub_image(src_res, dst_res, src_level, src_box, in vrend_renderer_resource_copy_region()
8709 if (!vrend_format_can_render(src_res->base.format) || in vrend_renderer_resource_copy_region()
8712 vrend_resource_copy_fallback(src_res, dst_res, dst_level, dstx, in vrend_renderer_resource_copy_region()
8723 vrend_fb_bind_texture(src_res, 0, src_level, src_box->z); in vrend_renderer_resource_copy_region()
8736 if (!src_res->y_0_top) { in vrend_renderer_resource_copy_region()
8740 sy1 = src_res->base.height0 - src_box->y - src_box->height; in vrend_renderer_resource_copy_region()
8741 sy2 = src_res->base.height0 - src_box->y; in vrend_renderer_resource_copy_region()
8806 struct vrend_resource *src_res, in vrend_renderer_blit_int() argument
8820 GLuint blitter_views[2] = {src_res->id, dst_res->id}; in vrend_renderer_blit_int()
8825 if (!vrend_format_can_render(src_res->base.format) && in vrend_renderer_blit_int()
8826 !vrend_format_is_ds(src_res->base.format)) in vrend_renderer_blit_int()
8833 if (vrend_format_is_ds(src_res->base.format) && in vrend_renderer_blit_int()
8835 if (src_res->base.format != dst_res->base.format) { in vrend_renderer_blit_int()
8836 if (!(src_res->base.format == PIPE_FORMAT_S8_UINT_Z24_UNORM && in vrend_renderer_blit_int()
8849 src_res->base.nr_samples > 0 && in vrend_renderer_blit_int()
8850 src_res->base.nr_samples != dst_res->base.nr_samples && in vrend_renderer_blit_int()
8867 if (!src_res->y_0_top) { in vrend_renderer_blit_int()
8871 src_y1 = src_res->base.height0 - info->src.box.y - info->src.box.height; in vrend_renderer_blit_int()
8872 src_y2 = src_res->base.height0 - info->src.box.y; in vrend_renderer_blit_int()
8882 (src_res->base.nr_samples > 0) && in vrend_renderer_blit_int()
8890 …dst_res->base.nr_samples, src_res->base.nr_samples, info->src.box.x, info->src.box.x + info->src.b… in vrend_renderer_blit_int()
8900 … vrend_format_replace_emulated(src_res->base.bind, info->src.format))) { in vrend_renderer_blit_int()
8911 blitter_views[0] = vrend_make_view(src_res, info->src.format); in vrend_renderer_blit_int()
8919 vrend_renderer_blit_gl(ctx, src_res, dst_res, blitter_views, info, in vrend_renderer_blit_int()
8954 ((src_res->base.nr_samples > 0) && in vrend_renderer_blit_int()
8955 (src_res->base.nr_samples != dst_res->base.nr_samples)) && in vrend_renderer_blit_int()
8967 args.width = src_res->base.width0; in vrend_renderer_blit_int()
8968 args.height = src_res->base.height0; in vrend_renderer_blit_int()
8969 args.depth = src_res->base.depth0; in vrend_renderer_blit_int()
8971 args.target = src_res->base.target; in vrend_renderer_blit_int()
8972 args.last_level = src_res->base.last_level; in vrend_renderer_blit_int()
8973 args.array_size = src_res->base.array_size; in vrend_renderer_blit_int()
8986 intermediate_copy = src_res; in vrend_renderer_blit_int()
9007 vrend_fb_bind_texture_id(src_res, blitter_views[0], 0, info->src.level, info->src.box.z + i); in vrend_renderer_blit_int()
9010 int level_width = u_minify(src_res->base.width0, info->src.level); in vrend_renderer_blit_int()
9011 int level_height = u_minify(src_res->base.width0, info->src.level); in vrend_renderer_blit_int()
9081 if (blitter_views[0] != src_res->id) in vrend_renderer_blit_int()
9092 struct vrend_resource *src_res, *dst_res; in vrend_renderer_blit() local
9093 src_res = vrend_renderer_ctx_res_lookup(ctx, src_handle); in vrend_renderer_blit()
9096 if (!src_res) { in vrend_renderer_blit()
9126 util_format_name(src_res->base.format), in vrend_renderer_blit()
9128 src_res->base.nr_samples, in vrend_renderer_blit()
9151 src_res->base.nr_samples == dst_res->base.nr_samples && in vrend_renderer_blit()
9156 vrend_copy_sub_image(src_res, dst_res, info->src.level, &info->src.box, in vrend_renderer_blit()
9161 vrend_renderer_blit_int(ctx, src_res, dst_res, info); in vrend_renderer_blit()