Lines Matching refs:tex_obj
804 struct texture_object *tex_obj, VkImageTiling tiling,
812 tex_obj->tex_width = tex_width;
813 tex_obj->tex_height = tex_height;
839 vkCreateImage(demo->device, &image_create_info, NULL, &tex_obj->image);
842 vkGetImageMemoryRequirements(demo->device, tex_obj->image, &mem_reqs);
851 err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &tex_obj->mem);
855 err = vkBindImageMemory(demo->device, tex_obj->image, tex_obj->mem, 0);
868 vkGetImageSubresourceLayout(demo->device, tex_obj->image, &subres,
871 err = vkMapMemory(demo->device, tex_obj->mem, 0,
881 vkUnmapMemory(demo->device, tex_obj->mem);
884 tex_obj->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
885 tex_obj->image, VK_IMAGE_ASPECT_COLOR_BIT,
886 VK_IMAGE_LAYOUT_PREINITIALIZED, tex_obj->imageLayout,
893 struct texture_object *tex_obj) {
895 vkDestroyImage(demo->device, tex_obj->image, NULL);
896 vkFreeMemory(demo->device, tex_obj->mem, NULL);