Lines Matching defs:region
381 const VkBufferImageCopy2 *region)
384 if (!v3dv_meta_can_use_tlb(image, ®ion->imageOffset, &fb_format))
389 (fb_format, region->imageSubresource.aspectMask,
394 num_layers = region->imageSubresource.layerCount;
396 num_layers = region->imageExtent.depth;
407 const uint32_t width = DIV_ROUND_UP(region->imageExtent.width, block_w);
408 const uint32_t height = DIV_ROUND_UP(region->imageExtent.height, block_h);
419 (job, buffer, image, &framebuffer, region);
434 const VkImageBlit2 *region,
446 const VkBufferImageCopy2 *region)
465 VkImageAspectFlags copy_aspect = region->imageSubresource.aspectMask;
570 /* Obtain the 2D buffer region spec */
572 if (region->bufferRowLength == 0)
573 buf_width = region->imageExtent.width;
575 buf_width = region->bufferRowLength;
577 if (region->bufferImageHeight == 0)
578 buf_height = region->imageExtent.height;
580 buf_height = region->bufferImageHeight;
591 num_layers = region->imageSubresource.layerCount;
593 num_layers = region->imageExtent.depth;
598 * blit region accordingly. Here we are just doing a raw copy of
670 VkDeviceSize buffer_offset = buffer->mem_offset + region->bufferOffset +
691 .mipLevel = region->imageSubresource.mipLevel,
692 .baseArrayLayer = region->imageSubresource.baseArrayLayer + i,
697 DIV_ROUND_UP(region->imageOffset.x, block_width),
698 DIV_ROUND_UP(region->imageOffset.y, block_height),
699 region->imageOffset.z + i,
702 DIV_ROUND_UP(region->imageOffset.x + region->imageExtent.width,
704 DIV_ROUND_UP(region->imageOffset.y + region->imageExtent.height,
706 region->imageOffset.z + i + 1,
718 DIV_ROUND_UP(region->imageExtent.width, block_width),
719 DIV_ROUND_UP(region->imageExtent.height, block_height),
773 const VkImageCopy2 *region)
786 if (region->dstSubresource.aspectMask != ds_aspects)
796 * checking against the region dimensions, which are in units of the source
804 /* Source region must start at (0,0) */
805 if (region->srcOffset.x != 0 || region->srcOffset.y != 0)
809 if (region->dstOffset.x != 0 || region->dstOffset.y != 0)
812 const uint32_t dst_mip_level = region->dstSubresource.mipLevel;
815 if (region->extent.width != dst_width || region->extent.height != dst_height)
826 uint32_t width = DIV_ROUND_UP(region->extent.width, block_w);
827 uint32_t height = DIV_ROUND_UP(region->extent.height, block_h);
856 region->dstSubresource.layerCount :
857 region->extent.depth;
858 const uint32_t src_mip_level = region->srcSubresource.mipLevel;
861 region->srcSubresource.baseArrayLayer : region->srcOffset.z;
863 region->dstSubresource.baseArrayLayer : region->dstOffset.z;
902 const VkImageCopy2 *region)
905 if (!v3dv_meta_can_use_tlb(src, ®ion->srcOffset, &fb_format) ||
906 !v3dv_meta_can_use_tlb(dst, ®ion->dstOffset, &fb_format)) {
916 assert(region->dstSubresource.aspectMask ==
917 region->srcSubresource.aspectMask);
920 (fb_format, region->dstSubresource.aspectMask,
930 region->srcSubresource.layerCount : region->extent.depth) ==
932 region->dstSubresource.layerCount : region->extent.depth));
935 num_layers = region->dstSubresource.layerCount;
937 num_layers = region->extent.depth;
948 const uint32_t width = DIV_ROUND_UP(region->extent.width, block_w);
949 const uint32_t height = DIV_ROUND_UP(region->extent.height, block_h);
959 v3dv_X(job->device, meta_emit_copy_image_rcl)(job, dst, src, &framebuffer, region);
1027 const VkImageCopy2 *region)
1115 * We should take into account that the dimensions of the region provided
1117 * in mind, below we adjust the blit destination region to be consistent with
1118 * the source region for the compatible format, so basically, we apply
1121 * the source), and then we just add the region copy dimensions to that
1122 * (since the region dimensions are already specified in terms of the source
1126 region->srcOffset.x * src_scale_w,
1127 region->srcOffset.y * src_scale_h,
1128 region->srcOffset.z,
1131 src_start.x + region->extent.width * src_scale_w,
1132 src_start.y + region->extent.height * src_scale_h,
1133 src_start.z + region->extent.depth,
1137 region->dstOffset.x * dst_scale_w,
1138 region->dstOffset.y * dst_scale_h,
1139 region->dstOffset.z,
1142 dst_start.x + region->extent.width * src_scale_w,
1143 dst_start.y + region->extent.height * src_scale_h,
1144 dst_start.z + region->extent.depth,
1149 .srcSubresource = region->srcSubresource,
1151 .dstSubresource = region->dstSubresource,
1251 VkBufferCopy2 region = {
1260 src_bo, 0, ®ion);
1308 const VkBufferImageCopy2 *region)
1329 const uint32_t offset_x = region->imageOffset.x;
1330 const uint32_t offset_y = region->imageOffset.y;
1335 if (region->bufferRowLength == 0)
1336 width = region->imageExtent.width;
1338 width = region->bufferRowLength;
1340 if (region->bufferImageHeight == 0)
1341 height = region->imageExtent.height;
1343 height = region->bufferImageHeight;
1348 /* Handle region semantics for compressed images */
1363 const uint32_t mip_level = region->imageSubresource.mipLevel;
1368 num_layers = region->imageSubresource.layerCount;
1370 num_layers = region->imageExtent.depth;
1384 layer = region->imageSubresource.baseArrayLayer + i;
1386 layer = region->imageOffset.z + i;
1389 buffer->mem_offset + region->bufferOffset +
1422 const VkBufferImageCopy2 *region)
1425 if (!v3dv_meta_can_use_tlb(image, ®ion->imageOffset, &fb_format))
1430 (fb_format, region->imageSubresource.aspectMask,
1435 num_layers = region->imageSubresource.layerCount;
1437 num_layers = region->imageExtent.depth;
1448 const uint32_t width = DIV_ROUND_UP(region->imageExtent.width, block_w);
1449 const uint32_t height = DIV_ROUND_UP(region->imageExtent.height, block_h);
1460 (job, image, buffer, &framebuffer, region);
1471 const VkBufferImageCopy2 *region)
1473 if (copy_buffer_to_image_tfu(cmd_buffer, image, buffer, region))
1475 if (copy_buffer_to_image_tlb(cmd_buffer, image, buffer, region))
1756 /* Load the box describing the pixel region we want to copy from the
2025 * image subresource so we can take this from the first region. For 3D
2058 /* We can't pass region->bufferOffset here for the offset field because
2164 * If the we only have one region to copy, then we might be able to
2222 /* For each region */
2225 const VkBufferImageCopy2 *region = ®ions[r];
2227 /* Obtain the 2D buffer region spec */
2229 if (region->bufferRowLength == 0)
2230 buf_width = region->imageExtent.width;
2232 buf_width = region->bufferRowLength;
2234 if (region->bufferImageHeight == 0)
2235 buf_height = region->imageExtent.height;
2237 buf_height = region->bufferImageHeight;
2240 .x = region->imageOffset.x,
2241 .y = region->imageOffset.y,
2242 .width = region->imageExtent.width,
2243 .height = region->imageExtent.height,
2249 .offset = { region->imageOffset.x, region->imageOffset.y },
2250 .extent = { region->imageExtent.width, region->imageExtent.height }
2255 region->bufferOffset / buffer_bpp + l * buf_height * buf_width;
2257 region->imageOffset.x,
2258 region->imageOffset.y,
2259 region->imageOffset.x + region->imageExtent.width - 1,
2260 region->imageOffset.y + region->imageExtent.height - 1,
2271 } /* For each region */
2361 * image subresource so we can take this from the first region.
2378 /* Copy regions by uploading each region to a temporary tiled image using
2382 const VkBufferImageCopy2 *region = ®ions[r];
2384 /* Obtain the 2D buffer region spec */
2386 if (region->bufferRowLength == 0)
2387 buf_width = region->imageExtent.width;
2389 buf_width = region->bufferRowLength;
2391 if (region->bufferImageHeight == 0)
2392 buf_height = region->imageExtent.height;
2394 buf_height = region->bufferImageHeight;
2435 region->bufferOffset + i * buf_height * buf_width * buffer_bpp;
2439 .bufferRowLength = region->bufferRowLength / block_width,
2440 .bufferImageHeight = region->bufferImageHeight / block_height,
2481 { region->imageExtent.width, region->imageExtent.height, 1 },
2485 .mipLevel = region->imageSubresource.mipLevel,
2486 .baseArrayLayer = region->imageSubresource.baseArrayLayer + i,
2491 DIV_ROUND_UP(region->imageOffset.x, block_width),
2492 DIV_ROUND_UP(region->imageOffset.y, block_height),
2493 region->imageOffset.z + i,
2496 DIV_ROUND_UP(region->imageOffset.x + region->imageExtent.width,
2498 DIV_ROUND_UP(region->imageOffset.y + region->imageExtent.height,
2500 region->imageOffset.z + i + 1,
2546 * blit that to our destination region. Because we are going to implement
2659 const VkBufferImageCopy2 *region)
2672 if (region->bufferRowLength == 0)
2673 buffer_width = region->imageExtent.width;
2675 buffer_width = region->bufferRowLength;
2677 if (region->bufferImageHeight == 0)
2678 buffer_height = region->imageExtent.height;
2680 buffer_height = region->bufferImageHeight;
2687 num_layers = region->imageSubresource.layerCount;
2689 num_layers = region->imageExtent.depth;
2703 job->cpu.copy_buffer_to_image.buffer_offset = region->bufferOffset;
2704 job->cpu.copy_buffer_to_image.image_extent = region->imageExtent;
2705 job->cpu.copy_buffer_to_image.image_offset = region->imageOffset;
2707 region->imageSubresource.mipLevel;
2709 region->imageSubresource.baseArrayLayer;
2731 /* The TFU and TLB paths can only copy one region at a time and the region
2746 * subresource of the region.
2813 const VkImageBlit2 *region)
2826 /* Source region must start at (0,0) */
2827 if (region->srcOffsets[0].x != 0 || region->srcOffsets[0].y != 0)
2831 if (region->dstOffsets[0].x != 0 || region->dstOffsets[0].y != 0)
2834 const uint32_t dst_mip_level = region->dstSubresource.mipLevel;
2837 if (region->dstOffsets[1].x < dst_width - 1||
2838 region->dstOffsets[1].y < dst_height - 1) {
2843 if (region->srcOffsets[1].x != region->dstOffsets[1].x ||
2844 region->srcOffsets[1].y != region->dstOffsets[1].y) {
2854 if (region->dstSubresource.aspectMask != ds_aspects)
2868 assert(region->dstSubresource.layerCount ==
2869 region->srcSubresource.layerCount);
2875 compute_blit_3d_layers(region->dstOffsets,
2879 min_dst_layer = region->dstSubresource.baseArrayLayer;
2880 max_dst_layer = min_dst_layer + region->dstSubresource.layerCount;
2887 compute_blit_3d_layers(region->srcOffsets,
2891 min_src_layer = region->srcSubresource.baseArrayLayer;
2892 max_src_layer = min_src_layer + region->srcSubresource.layerCount;
2902 const uint32_t src_mip_level = region->srcSubresource.mipLevel;
3799 const VkImageBlit2 *region,
3832 if (region->srcSubresource.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) {
3837 if (region->srcSubresource.aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) {
3866 * we choose to specify the destination blit region based on the size
3877 region->dstSubresource.mipLevel);
3880 region->dstSubresource.mipLevel);
3883 u_minify(src->vk.extent.width, region->srcSubresource.mipLevel);
3885 u_minify(src->vk.extent.height, region->srcSubresource.mipLevel);
3887 u_minify(src->vk.extent.depth, region->srcSubresource.mipLevel);
3891 compute_blit_box(region->dstOffsets,
3898 compute_blit_box(region->srcOffsets,
3907 min_dst_layer = region->dstSubresource.baseArrayLayer;
3908 max_dst_layer = min_dst_layer + region->dstSubresource.layerCount;
3910 compute_blit_3d_layers(region->dstOffsets,
3919 min_src_layer = region->srcSubresource.baseArrayLayer;
3920 max_src_layer = min_src_layer + region->srcSubresource.layerCount;
3922 compute_blit_3d_layers(region->srcOffsets,
4045 .aspectMask = region->dstSubresource.aspectMask,
4046 .baseMipLevel = region->dstSubresource.mipLevel,
4104 .aspectMask = region->srcSubresource.aspectMask,
4105 .baseMipLevel = region->srcSubresource.mipLevel,
4144 /* If the region we are about to blit is tile-aligned, then we can
4257 const VkImageResolve2 *region)
4259 if (!v3dv_meta_can_use_tlb(src, ®ion->srcOffset, NULL) ||
4260 !v3dv_meta_can_use_tlb(dst, ®ion->dstOffset, NULL)) {
4271 num_layers = region->dstSubresource.layerCount;
4273 num_layers = region->extent.depth;
4283 const uint32_t width = DIV_ROUND_UP(region->extent.width, block_w);
4284 const uint32_t height = DIV_ROUND_UP(region->extent.height, block_h);
4288 (fb_format, region->srcSubresource.aspectMask,
4300 &framebuffer, region);
4310 const VkImageResolve2 *region)
4314 .srcSubresource = region->srcSubresource,
4316 region->srcOffset,
4318 region->srcOffset.x + region->extent.width,
4319 region->srcOffset.y + region->extent.height,
4322 .dstSubresource = region->dstSubresource,
4324 region->dstOffset,
4326 region->dstOffset.x + region->extent.width,
4327 region->dstOffset.y + region->extent.height,