VkOffset2D dest_offset_0,
VkOffset2D dest_offset_1,
VkRect2D dest_box,
- VkFilter blit_filter)
+ VkSampler sampler)
{
struct radv_device *device = cmd_buffer->device;
uint32_t src_width = radv_minify(src_iview->image->info.width, src_iview->base_mip);
VK_SHADER_STAGE_VERTEX_BIT, 0, 20,
vertex_push_constants);
- VkSampler sampler;
- radv_CreateSampler(radv_device_to_handle(device),
- &(VkSamplerCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
- .magFilter = blit_filter,
- .minFilter = blit_filter,
- .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
- .addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
- .addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
- }, &cmd_buffer->pool->alloc, &sampler);
-
VkFramebuffer fb;
radv_CreateFramebuffer(radv_device_to_handle(device),
&(VkFramebufferCreateInfo) {
/* TODO: above comment is not valid for at least descriptor sets/pools,
* as we may not free them till after execution finishes. Check others. */
- radv_DestroySampler(radv_device_to_handle(device), sampler,
- &cmd_buffer->pool->alloc);
radv_DestroyFramebuffer(radv_device_to_handle(device), fb,
&cmd_buffer->pool->alloc);
}
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
RADV_FROM_HANDLE(radv_image, src_image, srcImage);
RADV_FROM_HANDLE(radv_image, dest_image, destImage);
+ struct radv_device *device = cmd_buffer->device;
struct radv_meta_saved_state saved_state;
bool old_predicating;
+ VkSampler sampler;
/* From the Vulkan 1.0 spec:
*
assert(src_image->info.samples == 1);
assert(dest_image->info.samples == 1);
+ radv_CreateSampler(radv_device_to_handle(device),
+ &(VkSamplerCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
+ .magFilter = filter,
+ .minFilter = filter,
+ .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
+ .addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
+ .addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
+ }, &cmd_buffer->pool->alloc, &sampler);
+
radv_meta_save(&saved_state, cmd_buffer,
RADV_META_SAVE_GRAPHICS_PIPELINE |
RADV_META_SAVE_CONSTANTS |
dest_image, &dest_iview, destImageLayout,
dest_offset_0, dest_offset_1,
dest_box,
- filter);
+ sampler);
}
}
cmd_buffer->state.predicating = old_predicating;
radv_meta_restore(&saved_state, cmd_buffer);
+
+ radv_DestroySampler(radv_device_to_handle(device), sampler,
+ &cmd_buffer->pool->alloc);
}
void