cmd_buffer->state.dirty |= state->dynamic_mask;
}
-static VkImageViewType
-meta_blit_get_src_image_view_type(const struct anv_image *src_image)
+VkImageViewType
+anv_meta_get_view_type(const struct anv_image *image)
{
- switch (src_image->type) {
- case VK_IMAGE_TYPE_1D:
- return VK_IMAGE_VIEW_TYPE_1D;
- case VK_IMAGE_TYPE_2D:
- return VK_IMAGE_VIEW_TYPE_2D;
- case VK_IMAGE_TYPE_3D:
- return VK_IMAGE_VIEW_TYPE_3D;
+ switch (image->type) {
+ case VK_IMAGE_TYPE_1D: return VK_IMAGE_VIEW_TYPE_1D;
+ case VK_IMAGE_TYPE_2D: return VK_IMAGE_VIEW_TYPE_2D;
+ case VK_IMAGE_TYPE_3D: return VK_IMAGE_VIEW_TYPE_3D;
default:
- assert(!"bad VkImageType");
- return 0;
+ unreachable("bad VkImageViewType");
}
}
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
.attachmentCount = 1,
.pAttachments = &(VkAttachmentDescription) {
- .sType = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION,
.format = VK_FORMAT_UNDEFINED, /* Our shaders don't care */
.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD,
.storeOp = VK_ATTACHMENT_STORE_OP_STORE,
},
.subpassCount = 1,
.pSubpasses = &(VkSubpassDescription) {
- .sType = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION,
.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
- .inputCount = 0,
- .colorCount = 1,
+ .inputAttachmentCount = 0,
+ .colorAttachmentCount = 1,
.pColorAttachments = &(VkAttachmentReference) {
.attachment = 0,
.layout = VK_IMAGE_LAYOUT_GENERAL,
},
.pResolveAttachments = NULL,
- .depthStencilAttachment = (VkAttachmentReference) {
+ .pDepthStencilAttachment = &(VkAttachmentReference) {
.attachment = VK_ATTACHMENT_UNUSED,
.layout = VK_IMAGE_LAYOUT_GENERAL,
},
- .preserveCount = 1,
+ .preserveAttachmentCount = 1,
.pPreserveAttachments = &(VkAttachmentReference) {
.attachment = 0,
.layout = VK_IMAGE_LAYOUT_GENERAL,
},
},
.dependencyCount = 0,
- }, &device->meta_state.blit.render_pass);
+ }, NULL, &device->meta_state.blit.render_pass);
/* We don't use a vertex shader for clearing, but instead build and pass
* the VUEs directly to the rasterization backend. However, we do need
* to provide GLSL source for the vertex shader so that the compiler
* does not dead-code our inputs.
*/
- struct anv_shader_module vsm = {
+ struct anv_shader_module vs = {
.nir = build_nir_vertex_shader(false),
};
- struct anv_shader_module fsm_2d = {
+ struct anv_shader_module fs_2d = {
.nir = build_nir_copy_fragment_shader(GLSL_SAMPLER_DIM_2D),
};
- struct anv_shader_module fsm_3d = {
+ struct anv_shader_module fs_3d = {
.nir = build_nir_copy_fragment_shader(GLSL_SAMPLER_DIM_3D),
};
- VkShader vs;
- anv_CreateShader(anv_device_to_handle(device),
- &(VkShaderCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
- .module = anv_shader_module_to_handle(&vsm),
- .pName = "main",
- }, &vs);
-
- VkShader fs_2d;
- anv_CreateShader(anv_device_to_handle(device),
- &(VkShaderCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
- .module = anv_shader_module_to_handle(&fsm_2d),
- .pName = "main",
- }, &fs_2d);
-
- VkShader fs_3d;
- anv_CreateShader(anv_device_to_handle(device),
- &(VkShaderCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
- .module = anv_shader_module_to_handle(&fsm_3d),
- .pName = "main",
- }, &fs_3d);
-
VkPipelineVertexInputStateCreateInfo vi_create_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
- .bindingCount = 2,
+ .vertexBindingDescriptionCount = 2,
.pVertexBindingDescriptions = (VkVertexInputBindingDescription[]) {
{
.binding = 0,
- .strideInBytes = 0,
+ .stride = 0,
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
{
.binding = 1,
- .strideInBytes = 5 * sizeof(float),
+ .stride = 5 * sizeof(float),
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
},
- .attributeCount = 3,
+ .vertexAttributeDescriptionCount = 3,
.pVertexAttributeDescriptions = (VkVertexInputAttributeDescription[]) {
{
/* VUE Header */
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_UINT,
- .offsetInBytes = 0
+ .offset = 0
},
{
/* Position */
.location = 1,
.binding = 1,
.format = VK_FORMAT_R32G32_SFLOAT,
- .offsetInBytes = 0
+ .offset = 0
},
{
/* Texture Coordinate */
.location = 2,
.binding = 1,
.format = VK_FORMAT_R32G32B32_SFLOAT,
- .offsetInBytes = 8
+ .offset = 8
}
}
};
VkDescriptorSetLayoutCreateInfo ds_layout_info = {
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
- .count = 1,
+ .bindingCount = 1,
.pBinding = (VkDescriptorSetLayoutBinding[]) {
{
+ .binding = 0,
.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
- .arraySize = 1,
+ .descriptorCount = 1,
.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
.pImmutableSamplers = NULL
},
}
};
anv_CreateDescriptorSetLayout(anv_device_to_handle(device), &ds_layout_info,
- &device->meta_state.blit.ds_layout);
+ NULL, &device->meta_state.blit.ds_layout);
anv_CreatePipelineLayout(anv_device_to_handle(device),
&(VkPipelineLayoutCreateInfo) {
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
- .descriptorSetCount = 1,
+ .setLayoutCount = 1,
.pSetLayouts = &device->meta_state.blit.ds_layout,
},
- &device->meta_state.blit.pipeline_layout);
+ NULL, &device->meta_state.blit.pipeline_layout);
VkPipelineShaderStageCreateInfo pipeline_shader_stages[] = {
{
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
- .stage = VK_SHADER_STAGE_VERTEX,
- .shader = vs,
+ .stage = VK_SHADER_STAGE_VERTEX_BIT,
+ .module = anv_shader_module_to_handle(&vs),
+ .pName = "main",
.pSpecializationInfo = NULL
}, {
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
- .stage = VK_SHADER_STAGE_FRAGMENT,
- .shader = VK_NULL_HANDLE, /* TEMPLATE VALUE! FILL ME IN! */
+ .stage = VK_SHADER_STAGE_FRAGMENT_BIT,
+ .module = VK_NULL_HANDLE, /* TEMPLATE VALUE! FILL ME IN! */
+ .pName = "main",
.pSpecializationInfo = NULL
},
};
.viewportCount = 1,
.scissorCount = 1,
},
- .pRasterState = &(VkPipelineRasterStateCreateInfo) {
- .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO,
- .depthClipEnable = true,
+ .pRasterizationState = &(VkPipelineRasterizationStateCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
.rasterizerDiscardEnable = false,
.polygonMode = VK_POLYGON_MODE_FILL,
.cullMode = VK_CULL_MODE_NONE,
},
.pMultisampleState = &(VkPipelineMultisampleStateCreateInfo) {
.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
- .rasterSamples = 1,
+ .rasterizationSamples = 1,
.sampleShadingEnable = false,
.pSampleMask = (VkSampleMask[]) { UINT32_MAX },
},
.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
.attachmentCount = 1,
.pAttachments = (VkPipelineColorBlendAttachmentState []) {
- { .channelWriteMask = VK_CHANNEL_A_BIT |
- VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT },
+ { .colorWriteMask =
+ VK_COLOR_COMPONENT_A_BIT |
+ VK_COLOR_COMPONENT_R_BIT |
+ VK_COLOR_COMPONENT_G_BIT |
+ VK_COLOR_COMPONENT_B_BIT },
}
},
.pDynamicState = &(VkPipelineDynamicStateCreateInfo) {
.use_rectlist = true
};
- pipeline_shader_stages[1].shader = fs_2d;
+ pipeline_shader_stages[1].module = anv_shader_module_to_handle(&fs_2d);
anv_graphics_pipeline_create(anv_device_to_handle(device),
&vk_pipeline_info, &anv_pipeline_info,
- &device->meta_state.blit.pipeline_2d_src);
+ NULL, &device->meta_state.blit.pipeline_2d_src);
- pipeline_shader_stages[1].shader = fs_3d;
+ pipeline_shader_stages[1].module = anv_shader_module_to_handle(&fs_3d);
anv_graphics_pipeline_create(anv_device_to_handle(device),
&vk_pipeline_info, &anv_pipeline_info,
- &device->meta_state.blit.pipeline_3d_src);
-
- anv_DestroyShader(anv_device_to_handle(device), vs);
- anv_DestroyShader(anv_device_to_handle(device), fs_2d);
- anv_DestroyShader(anv_device_to_handle(device), fs_3d);
- ralloc_free(vsm.nir);
- ralloc_free(fsm_2d.nir);
- ralloc_free(fsm_3d.nir);
+ NULL, &device->meta_state.blit.pipeline_3d_src);
+
+ ralloc_free(vs.nir);
+ ralloc_free(fs_2d.nir);
+ ralloc_free(fs_3d.nir);
}
static void
struct anv_image_view *dest_iview,
VkOffset3D dest_offset,
VkExtent3D dest_extent,
- VkTexFilter blit_filter)
+ VkFilter blit_filter)
{
struct anv_device *device = cmd_buffer->device;
VkDescriptorPool dummy_desc_pool = (VkDescriptorPool)1;
},
};
+ anv_state_clflush(vb_state);
+
struct anv_buffer vertex_buffer = {
.device = device,
.size = vb_size,
.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
.magFilter = blit_filter,
.minFilter = blit_filter,
- }, &sampler);
+ }, &cmd_buffer->pool->alloc, &sampler);
VkDescriptorSet set;
- anv_AllocDescriptorSets(anv_device_to_handle(device), dummy_desc_pool,
- VK_DESCRIPTOR_SET_USAGE_ONE_SHOT,
- 1, &device->meta_state.blit.ds_layout, &set);
+ anv_AllocateDescriptorSets(anv_device_to_handle(device),
+ &(VkDescriptorSetAllocateInfo) {
+ .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
+ .descriptorPool = dummy_desc_pool,
+ .setLayoutCount = 1,
+ .pSetLayouts = &device->meta_state.blit.ds_layout
+ }, &set);
anv_UpdateDescriptorSets(anv_device_to_handle(device),
1, /* writeCount */
(VkWriteDescriptorSet[]) {
{
.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
- .destSet = set,
- .destBinding = 0,
- .destArrayElement = 0,
- .count = 1,
+ .dstSet = set,
+ .dstBinding = 0,
+ .dstArrayElement = 0,
+ .descriptorCount = 1,
.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
- .pDescriptors = (VkDescriptorInfo[]) {
+ .pImageInfo = (VkDescriptorImageInfo[]) {
{
+ .sampler = sampler,
.imageView = anv_image_view_to_handle(src_iview),
.imageLayout = VK_IMAGE_LAYOUT_GENERAL,
- .sampler = sampler,
},
}
}
.width = dest_iview->extent.width,
.height = dest_iview->extent.height,
.layers = 1
- }, &fb);
+ }, &cmd_buffer->pool->alloc, &fb);
ANV_CALL(CmdBeginRenderPass)(anv_cmd_buffer_to_handle(cmd_buffer),
&(VkRenderPassBeginInfo) {
anv_CmdSetViewport(anv_cmd_buffer_to_handle(cmd_buffer), 1,
&(VkViewport) {
- .originX = 0.0f,
- .originY = 0.0f,
+ .x = 0.0f,
+ .y = 0.0f,
.width = dest_iview->extent.width,
.height = dest_iview->extent.height,
.minDepth = 0.0f,
* 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_DestroySampler(anv_device_to_handle(device), sampler,
+ &cmd_buffer->pool->alloc);
+ anv_DestroyFramebuffer(anv_device_to_handle(device), fb,
+ &cmd_buffer->pool->alloc);
}
static void
.depth = 1,
},
.mipLevels = 1,
- .arraySize = 1,
+ .arrayLayers = 1,
.samples = 1,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = 0,
VkImage src_image;
image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT;
- anv_CreateImage(vk_device, &image_info, &src_image);
+ anv_CreateImage(vk_device, &image_info,
+ &cmd_buffer->pool->alloc, &src_image);
VkImage dest_image;
image_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
- anv_CreateImage(vk_device, &image_info, &dest_image);
+ anv_CreateImage(vk_device, &image_info,
+ &cmd_buffer->pool->alloc, &dest_image);
/* We could use a vk call to bind memory, but that would require
* creating a dummy memory object etc. so there's really no point.
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1,
+ .layerCount = 1,
},
},
cmd_buffer);
&dest_iview,
(VkOffset3D) { 0, 0, 0 },
(VkExtent3D) { width, height, 1 },
- VK_TEX_FILTER_NEAREST);
+ VK_FILTER_NEAREST);
- anv_DestroyImage(vk_device, src_image);
- anv_DestroyImage(vk_device, dest_image);
+ anv_DestroyImage(vk_device, src_image, &cmd_buffer->pool->alloc);
+ anv_DestroyImage(vk_device, dest_image, &cmd_buffer->pool->alloc);
}
void anv_CmdCopyBuffer(
ANV_FROM_HANDLE(anv_image, src_image, srcImage);
ANV_FROM_HANDLE(anv_image, dest_image, destImage);
- const VkImageViewType src_iview_type =
- meta_blit_get_src_image_view_type(src_image);
-
struct anv_meta_saved_state saved_state;
meta_prepare_blit(cmd_buffer, &saved_state);
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
- .viewType = src_iview_type,
+ .viewType = anv_meta_get_view_type(src_image),
.format = src_image->format->vk_format,
.subresourceRange = {
.aspectMask = pRegions[r].srcSubresource.aspectMask,
.baseMipLevel = pRegions[r].srcSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = pRegions[r].srcSubresource.baseArrayLayer,
- .arraySize = pRegions[r].dstSubresource.layerCount,
+ .layerCount = pRegions[r].dstSubresource.layerCount,
},
},
cmd_buffer);
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = destImage,
- .viewType = VK_IMAGE_VIEW_TYPE_2D,
+ .viewType = anv_meta_get_view_type(dest_image),
.format = dest_image->format->vk_format,
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = pRegions[r].dstSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = dest_base_array_slice + slice,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
dest_image, &dest_iview,
dest_offset,
pRegions[r].extent,
- VK_TEX_FILTER_NEAREST);
+ VK_FILTER_NEAREST);
}
}
VkImageLayout destImageLayout,
uint32_t regionCount,
const VkImageBlit* pRegions,
- VkTexFilter filter)
+ VkFilter filter)
{
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
ANV_FROM_HANDLE(anv_image, src_image, srcImage);
ANV_FROM_HANDLE(anv_image, dest_image, destImage);
- const VkImageViewType src_iview_type =
- meta_blit_get_src_image_view_type(src_image);
-
struct anv_meta_saved_state saved_state;
- anv_finishme("respect VkTexFilter");
+ anv_finishme("respect VkFilter");
meta_prepare_blit(cmd_buffer, &saved_state);
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
- .viewType = src_iview_type,
+ .viewType = anv_meta_get_view_type(src_image),
.format = src_image->format->vk_format,
.subresourceRange = {
.aspectMask = pRegions[r].srcSubresource.aspectMask,
.baseMipLevel = pRegions[r].srcSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = pRegions[r].srcSubresource.baseArrayLayer,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = destImage,
- .viewType = VK_IMAGE_VIEW_TYPE_2D,
+ .viewType = anv_meta_get_view_type(dest_image),
.format = dest_image->format->vk_format,
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = pRegions[r].dstSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = dest_array_slice,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
make_image_for_buffer(VkDevice vk_device, VkBuffer vk_buffer, VkFormat format,
VkImageUsageFlags usage,
VkImageType image_type,
+ const VkAllocationCallbacks *alloc,
const VkBufferImageCopy *copy)
{
ANV_FROM_HANDLE(anv_buffer, buffer, vk_buffer);
.format = format,
.extent = extent,
.mipLevels = 1,
- .arraySize = 1,
+ .arrayLayers = 1,
.samples = 1,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = usage,
.flags = 0,
- }, &vk_image);
+ }, alloc, &vk_image);
assert(result == VK_SUCCESS);
ANV_FROM_HANDLE(anv_image, image, vk_image);
struct anv_image *src_image =
make_image_for_buffer(vk_device, srcBuffer, proxy_format,
VK_IMAGE_USAGE_SAMPLED_BIT,
- dest_image->type, &pRegions[r]);
+ dest_image->type, &cmd_buffer->pool->alloc,
+ &pRegions[r]);
const uint32_t dest_base_array_slice =
meta_blit_get_dest_view_base_array_slice(dest_image,
.subresourceRange = {
.aspectMask = proxy_aspect,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1,
+ .layerCount = 1,
},
},
cmd_buffer);
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = anv_image_to_handle(dest_image),
- .viewType = VK_IMAGE_VIEW_TYPE_2D,
+ .viewType = anv_meta_get_view_type(dest_image),
.format = proxy_format,
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = pRegions[r].imageSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = dest_base_array_slice + slice,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
&dest_iview,
dest_offset,
pRegions[r].imageExtent,
- VK_TEX_FILTER_NEAREST);
+ VK_FILTER_NEAREST);
/* Once we've done the blit, all of the actual information about
* the image is embedded in the command buffer so we can just
src_image->extent.height * 4;
}
- anv_DestroyImage(vk_device, anv_image_to_handle(src_image));
+ anv_DestroyImage(vk_device, anv_image_to_handle(src_image),
+ &cmd_buffer->pool->alloc);
}
meta_finish_blit(cmd_buffer, &saved_state);
VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
struct anv_meta_saved_state saved_state;
- const VkImageViewType src_iview_type =
- meta_blit_get_src_image_view_type(src_image);
-
meta_prepare_blit(cmd_buffer, &saved_state);
for (unsigned r = 0; r < regionCount; r++) {
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
- .viewType = src_iview_type,
+ .viewType = anv_meta_get_view_type(src_image),
.format = src_image->format->vk_format,
.subresourceRange = {
.aspectMask = pRegions[r].imageSubresource.aspectMask,
.baseMipLevel = pRegions[r].imageSubresource.mipLevel,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = pRegions[r].imageSubresource.baseArrayLayer,
- .arraySize = pRegions[r].imageSubresource.layerCount,
+ .layerCount = pRegions[r].imageSubresource.layerCount,
},
},
cmd_buffer);
struct anv_image *dest_image =
make_image_for_buffer(vk_device, destBuffer, dest_format,
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
- src_image->type, &pRegions[r]);
+ src_image->type, &cmd_buffer->pool->alloc,
+ &pRegions[r]);
unsigned num_slices;
if (src_image->type == VK_IMAGE_TYPE_3D) {
.subresourceRange = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = 0,
- .mipLevels = 1,
+ .levelCount = 1,
.baseArrayLayer = 0,
- .arraySize = 1
+ .layerCount = 1
},
},
cmd_buffer);
&dest_iview,
(VkOffset3D) { 0, 0, 0 },
pRegions[r].imageExtent,
- VK_TEX_FILTER_NEAREST);
+ VK_FILTER_NEAREST);
/* Once we've done the blit, all of the actual information about
* the image is embedded in the command buffer so we can just
dest_image->extent.height * 4;
}
- anv_DestroyImage(vk_device, anv_image_to_handle(dest_image));
+ anv_DestroyImage(vk_device, anv_image_to_handle(dest_image),
+ &cmd_buffer->pool->alloc);
}
meta_finish_blit(cmd_buffer, &saved_state);
/* Blit */
anv_DestroyRenderPass(anv_device_to_handle(device),
- device->meta_state.blit.render_pass);
+ device->meta_state.blit.render_pass, NULL);
anv_DestroyPipeline(anv_device_to_handle(device),
- device->meta_state.blit.pipeline_2d_src);
+ device->meta_state.blit.pipeline_2d_src, NULL);
anv_DestroyPipeline(anv_device_to_handle(device),
- device->meta_state.blit.pipeline_3d_src);
+ device->meta_state.blit.pipeline_3d_src, NULL);
anv_DestroyPipelineLayout(anv_device_to_handle(device),
- device->meta_state.blit.pipeline_layout);
+ device->meta_state.blit.pipeline_layout, NULL);
anv_DestroyDescriptorSetLayout(anv_device_to_handle(device),
- device->meta_state.blit.ds_layout);
+ device->meta_state.blit.ds_layout, NULL);
}