.count = 1,
.pBinding = (VkDescriptorSetLayoutBinding[]) {
{
- .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
+ .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
.arraySize = 1,
.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
.pImmutableSamplers = NULL
struct anv_image *dest_image,
struct anv_image_view *dest_iview,
VkOffset3D dest_offset,
- VkExtent3D dest_extent)
+ VkExtent3D dest_extent,
+ VkTexFilter blit_filter)
{
struct anv_device *device = cmd_buffer->device;
VkDescriptorPool dummy_desc_pool = { .handle = 1 };
sizeof(struct anv_vue_header),
});
+ VkSampler sampler;
+ ANV_CALL(CreateSampler)(anv_device_to_handle(device),
+ &(VkSamplerCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
+ .magFilter = blit_filter,
+ .minFilter = blit_filter,
+ }, &sampler);
+
VkDescriptorSet set;
anv_AllocDescriptorSets(anv_device_to_handle(device), dummy_desc_pool,
VK_DESCRIPTOR_SET_USAGE_ONE_SHOT,
.destBinding = 0,
.destArrayElement = 0,
.count = 1,
- .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
+ .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
.pDescriptors = (VkDescriptorInfo[]) {
{
.imageView = anv_image_view_to_handle(src_iview),
- .imageLayout = VK_IMAGE_LAYOUT_GENERAL
+ .imageLayout = VK_IMAGE_LAYOUT_GENERAL,
+ .sampler = sampler,
},
}
}
* descriptor sets, etc. has been used. We are free to delete it.
*/
anv_descriptor_set_destroy(device, anv_descriptor_set_from_handle(set));
+ anv_DestroySampler(anv_device_to_handle(device), sampler);
anv_DestroyFramebuffer(anv_device_to_handle(device), fb);
}
anv_image_from_handle(dest_image),
&dest_iview,
(VkOffset3D) { 0, 0, 0 },
- (VkExtent3D) { width, height, 1 });
+ (VkExtent3D) { width, height, 1 },
+ VK_TEX_FILTER_NEAREST);
anv_DestroyImage(vk_device, src_image);
anv_DestroyImage(vk_device, dest_image);
pRegions[r].extent,
dest_image, &dest_iview,
dest_offset,
- pRegions[r].extent);
+ pRegions[r].extent,
+ VK_TEX_FILTER_NEAREST);
}
meta_finish_blit(cmd_buffer, &saved_state);
pRegions[r].srcExtent,
dest_image, &dest_iview,
dest_offset,
- pRegions[r].destExtent);
+ pRegions[r].destExtent,
+ filter);
}
meta_finish_blit(cmd_buffer, &saved_state);
dest_image,
&dest_iview,
dest_offset,
- pRegions[r].imageExtent);
+ pRegions[r].imageExtent,
+ VK_TEX_FILTER_NEAREST);
anv_DestroyImage(vk_device, srcImage);
}
anv_image_from_handle(destImage),
&dest_iview,
(VkOffset3D) { 0, 0, 0 },
- pRegions[r].imageExtent);
+ pRegions[r].imageExtent,
+ VK_TEX_FILTER_NEAREST);
anv_DestroyImage(vk_device, destImage);
}