Home | History | Annotate | Download | only in vulkan

Lines Matching refs:image

56    VkImage image;
61 dump_image_init(struct anv_device *device, struct dump_image *image,
67 image->filename = filename;
68 image->extent = (VkExtent2D) { width, height };
82 }, NULL, &image->image);
86 anv_GetImageMemoryRequirements(vk_device, image->image, &reqs);
93 }, NULL, &image->memory);
96 result = anv_BindImageMemory(vk_device, image->image, image->memory, 0);
101 dump_image_finish(struct anv_device *device, struct dump_image *image)
105 anv_DestroyImage(vk_device, image->image, NULL);
106 anv_FreeMemory(vk_device, image->memory, NULL);
110 dump_image_do_blit(struct anv_device *device, struct dump_image *image,
131 .image = anv_image_to_handle(src),
141 /* We need to do a blit so the image needs to be declared as sampled. The
150 image->image, VK_IMAGE_LAYOUT_GENERAL, 1,
160 { image->extent.width, image->extent.height, 1 },
170 { image->extent.width, image->extent.height, 1 },
188 .image = image->image,
200 dump_image_write_to_ppm(struct anv_device *device, struct dump_image *image)
206 anv_GetImageMemoryRequirements(vk_device, image->image, &reqs);
209 result = anv_MapMemory(vk_device, image->memory, 0, reqs.size, 0, (void **)&map);
213 anv_GetImageSubresourceLayout(vk_device, image->image,
222 FILE *file = fopen(image->filename, "wb");
225 uint8_t *row = malloc(image->extent.width * 3);
228 fprintf(file, "P6\n%d %d\n255\n", image->extent.width, image->extent.height);
229 for (unsigned y = 0; y < image->extent.height; y++) {
230 for (unsigned x = 0; x < image->extent.width; x++) {
235 fwrite(row, 3, image->extent.width, file);
242 anv_UnmapMemory(vk_device, image->memory);
247 struct anv_image *image, unsigned miplevel,
261 const uint32_t width = anv_minify(image->extent.width, miplevel);
262 const uint32_t height = anv_minify(image->extent.height, miplevel);
293 dump_image_do_blit(device, &dump, anv_cmd_buffer_from_handle(cmd), image,
396 dump_add_image(struct anv_cmd_buffer *cmd_buffer, struct anv_image *image,
400 const uint32_t width = anv_minify(image->extent.width, miplevel);
401 const uint32_t height = anv_minify(image->extent.height, miplevel);
406 dump_image_do_blit(cmd_buffer->device, dump, cmd_buffer, image,
425 for_each_bit(b, iview->image->aspects) {
439 dump_add_image(cmd_buffer, (struct anv_image *)iview->image, aspect,