);
VkShader fs;
- anv_CreateShader((VkDevice) device,
+ anv_CreateShader(anv_device_to_handle(device),
&(VkShaderCreateInfo) {
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
.module = fsm,
}
};
- anv_pipeline_create((VkDevice) device,
+ anv_pipeline_create(anv_device_to_handle(device),
&(VkGraphicsPipelineCreateInfo) {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.stageCount = 1,
},
&device->meta_state.clear.pipeline);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_SHADER, fs);
+ anv_DestroyObject(anv_device_to_handle(device), VK_OBJECT_TYPE_SHADER, fs);
}
#define NUM_VB_USED 2
.offset = state.offset
};
- anv_CmdBindVertexBuffers((VkCmdBuffer) cmd_buffer, 0, 2,
+ anv_CmdBindVertexBuffers(anv_cmd_buffer_to_handle(cmd_buffer), 0, 2,
(VkBuffer[]) {
- (VkBuffer) &vertex_buffer,
- (VkBuffer) &vertex_buffer
+ anv_buffer_to_handle(&vertex_buffer),
+ anv_buffer_to_handle(&vertex_buffer)
},
(VkDeviceSize[]) {
0,
sizeof(vertex_data)
});
- if ((VkPipeline) cmd_buffer->pipeline != device->meta_state.clear.pipeline)
- anv_CmdBindPipeline((VkCmdBuffer) cmd_buffer,
+ if (cmd_buffer->pipeline != anv_pipeline_from_handle(device->meta_state.clear.pipeline))
+ anv_CmdBindPipeline(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_BIND_POINT_GRAPHICS,
device->meta_state.clear.pipeline);
/* We don't need anything here, only set if not already set. */
if (cmd_buffer->rs_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_RASTER,
device->meta_state.shared.rs_state);
if (cmd_buffer->vp_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_VIEWPORT,
cmd_buffer->framebuffer->vp_state);
if (cmd_buffer->ds_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_DEPTH_STENCIL,
device->meta_state.shared.ds_state);
if (cmd_buffer->cb_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_COLOR_BLEND,
device->meta_state.shared.cb_state);
- anv_CmdDraw((VkCmdBuffer) cmd_buffer, 0, 3, 0, num_instances);
+ anv_CmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, num_instances);
}
void
);
VkShader vs;
- anv_CreateShader((VkDevice) device,
+ anv_CreateShader(anv_device_to_handle(device),
&(VkShaderCreateInfo) {
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
.module = vsm,
}, &vs);
VkShader fs;
- anv_CreateShader((VkDevice) device,
+ anv_CreateShader(anv_device_to_handle(device),
&(VkShaderCreateInfo) {
.sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,
.module = fsm,
},
}
};
- anv_CreateDescriptorSetLayout((VkDevice) device, &ds_layout_info,
+ anv_CreateDescriptorSetLayout(anv_device_to_handle(device), &ds_layout_info,
&device->meta_state.blit.ds_layout);
- anv_CreatePipelineLayout((VkDevice) device,
+ anv_CreatePipelineLayout(anv_device_to_handle(device),
&(VkPipelineLayoutCreateInfo) {
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.descriptorSetCount = 1,
},
&device->meta_state.blit.pipeline_layout);
- anv_pipeline_create((VkDevice) device,
+ anv_pipeline_create(anv_device_to_handle(device),
&(VkGraphicsPipelineCreateInfo) {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.stageCount = 2,
},
&device->meta_state.blit.pipeline);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_SHADER, vs);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_SHADER, fs);
+ anv_DestroyObject(anv_device_to_handle(device), VK_OBJECT_TYPE_SHADER, vs);
+ anv_DestroyObject(anv_device_to_handle(device), VK_OBJECT_TYPE_SHADER, fs);
}
static void
anv_cmd_buffer_save(cmd_buffer, saved_state);
- if ((VkPipeline) cmd_buffer->pipeline != device->meta_state.blit.pipeline)
- anv_CmdBindPipeline((VkCmdBuffer) cmd_buffer,
+ if (cmd_buffer->pipeline != anv_pipeline_from_handle(device->meta_state.blit.pipeline))
+ anv_CmdBindPipeline(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_BIND_POINT_GRAPHICS,
device->meta_state.blit.pipeline);
/* We don't need anything here, only set if not already set. */
if (cmd_buffer->rs_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_RASTER,
device->meta_state.shared.rs_state);
if (cmd_buffer->ds_state == NULL)
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_DEPTH_STENCIL,
device->meta_state.shared.ds_state);
- saved_state->cb_state = (VkDynamicCbState) cmd_buffer->cb_state;
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ saved_state->cb_state = anv_dynamic_cb_state_to_handle(cmd_buffer->cb_state);
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_COLOR_BLEND,
device->meta_state.shared.cb_state);
}
.offset = vb_state.offset,
};
- anv_CmdBindVertexBuffers((VkCmdBuffer) cmd_buffer, 0, 2,
+ anv_CmdBindVertexBuffers(anv_cmd_buffer_to_handle(cmd_buffer), 0, 2,
(VkBuffer[]) {
- (VkBuffer) &vertex_buffer,
- (VkBuffer) &vertex_buffer
+ anv_buffer_to_handle(&vertex_buffer),
+ anv_buffer_to_handle(&vertex_buffer)
},
(VkDeviceSize[]) {
0,
uint32_t count;
VkDescriptorSet set;
- anv_AllocDescriptorSets((VkDevice) device, 0 /* pool */,
+ anv_AllocDescriptorSets(anv_device_to_handle(device), 0 /* pool */,
VK_DESCRIPTOR_SET_USAGE_ONE_SHOT,
1, &device->meta_state.blit.ds_layout, &set, &count);
- anv_UpdateDescriptorSets((VkDevice) device,
+ anv_UpdateDescriptorSets(anv_device_to_handle(device),
1, /* writeCount */
(VkWriteDescriptorSet[]) {
{
}
}, 0, NULL);
- struct anv_framebuffer *fb;
- anv_CreateFramebuffer((VkDevice) device,
+ VkFramebuffer fb;
+ anv_CreateFramebuffer(anv_device_to_handle(device),
&(VkFramebufferCreateInfo) {
.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
.colorAttachmentCount = 1,
.width = dest->extent.width,
.height = dest->extent.height,
.layers = 1
- }, (VkFramebuffer *)&fb);
+ }, &fb);
VkRenderPass pass;
- anv_CreateRenderPass((VkDevice )device,
+ anv_CreateRenderPass(anv_device_to_handle(device),
&(VkRenderPassCreateInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
.renderArea = { { 0, 0 }, { dest->extent.width, dest->extent.height } },
.depthStencilFormat = VK_FORMAT_UNDEFINED,
}, &pass);
- anv_CmdBeginRenderPass((VkCmdBuffer) cmd_buffer,
+ anv_CmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
&(VkRenderPassBegin) {
.renderPass = pass,
- .framebuffer = (VkFramebuffer) fb,
+ .framebuffer = fb,
});
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
- VK_STATE_BIND_POINT_VIEWPORT, fb->vp_state);
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
+ VK_STATE_BIND_POINT_VIEWPORT,
+ anv_framebuffer_from_handle(fb)->vp_state);
- anv_CmdBindDescriptorSets((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDescriptorSets(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_BIND_POINT_GRAPHICS,
device->meta_state.blit.pipeline_layout, 0, 1,
&set, 0, NULL);
- anv_CmdDraw((VkCmdBuffer) cmd_buffer, 0, 3, 0, 1);
+ anv_CmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, 1);
- anv_CmdEndRenderPass((VkCmdBuffer) cmd_buffer);
+ anv_CmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
/* At the point where we emit the draw call, all data from the
* descriptor sets, etc. has been used. We are free to delete it.
*/
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_DESCRIPTOR_SET, set);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_FRAMEBUFFER,
- (VkFramebuffer) fb);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_RENDER_PASS, pass);
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_DESCRIPTOR_SET, set);
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_FRAMEBUFFER, fb);
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_RENDER_PASS, pass);
}
static void
const struct anv_saved_state *saved_state)
{
anv_cmd_buffer_restore(cmd_buffer, saved_state);
- anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ anv_CmdBindDynamicStateObject(anv_cmd_buffer_to_handle(cmd_buffer),
VK_STATE_BIND_POINT_COLOR_BLEND,
saved_state->cb_state);
}
struct anv_bo *dest, uint64_t dest_offset,
int width, int height, VkFormat copy_format)
{
- VkDevice vk_device = (VkDevice)cmd_buffer->device;
+ VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
VkImageCreateInfo image_info = {
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
.flags = 0,
};
- struct anv_image *src_image, *dest_image;
- anv_CreateImage(vk_device, &image_info, (VkImage *)&src_image);
- anv_CreateImage(vk_device, &image_info, (VkImage *)&dest_image);
+ VkImage src_image, dest_image;
+ anv_CreateImage(vk_device, &image_info, &src_image);
+ anv_CreateImage(vk_device, &image_info, &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.
*/
- src_image->bo = src;
- src_image->offset = src_offset;
- dest_image->bo = dest;
- dest_image->offset = dest_offset;
+ anv_image_from_handle(src_image)->bo = src;
+ anv_image_from_handle(src_image)->offset = src_offset;
+ anv_image_from_handle(dest_image)->bo = dest;
+ anv_image_from_handle(dest_image)->offset = dest_offset;
struct anv_surface_view src_view;
anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
- .image = (VkImage)src_image,
+ .image = src_image,
.viewType = VK_IMAGE_VIEW_TYPE_2D,
.format = copy_format,
.channels = {
anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
- .image = (VkImage)dest_image,
+ .image = dest_image,
.format = copy_format,
.mipLevel = 0,
.baseArraySlice = 0,
(VkOffset3D) { 0, 0, 0 },
(VkExtent3D) { width, height, 1 });
- anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, (VkImage) src_image);
- anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, (VkImage) dest_image);
+ anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, src_image);
+ anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, dest_image);
}
void anv_CmdCopyBuffer(
uint32_t regionCount,
const VkBufferImageCopy* pRegions)
{
- struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *)cmdBuffer;
- VkDevice vk_device = (VkDevice) cmd_buffer->device;
- struct anv_buffer *src_buffer = (struct anv_buffer *)srcBuffer;
- struct anv_image *dest_image = (struct anv_image *)destImage;
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_buffer, src_buffer, srcBuffer);
+ ANV_FROM_HANDLE(anv_image, dest_image, destImage);
+ VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
struct anv_saved_state saved_state;
meta_prepare_blit(cmd_buffer, &saved_state);
if (pRegions[r].bufferImageHeight != 0)
anv_finishme("bufferImageHeight not supported in CopyBufferToImage");
- struct anv_image *src_image;
+ VkImage srcImage;
anv_CreateImage(vk_device,
&(VkImageCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = VK_IMAGE_USAGE_SAMPLED_BIT,
.flags = 0,
- }, (VkImage *)&src_image);
+ }, &srcImage);
+
+ ANV_FROM_HANDLE(anv_image, src_image, srcImage);
/* 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.
anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
- .image = (VkImage)src_image,
+ .image = anv_image_to_handle(src_image),
.viewType = VK_IMAGE_VIEW_TYPE_2D,
.format = dest_image->format,
.channels = {
anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
- .image = (VkImage)dest_image,
+ .image = anv_image_to_handle(dest_image),
.format = dest_image->format,
.mipLevel = pRegions[r].imageSubresource.mipLevel,
.baseArraySlice = pRegions[r].imageSubresource.arraySlice,
pRegions[r].imageOffset,
pRegions[r].imageExtent);
- anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, (VkImage) src_image);
+ anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, srcImage);
}
meta_finish_blit(cmd_buffer, &saved_state);
uint32_t regionCount,
const VkBufferImageCopy* pRegions)
{
- struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *)cmdBuffer;
- VkDevice vk_device = (VkDevice) cmd_buffer->device;
- struct anv_image *src_image = (struct anv_image *)srcImage;
- struct anv_buffer *dest_buffer = (struct anv_buffer *)destBuffer;
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_image, src_image, srcImage);
+ ANV_FROM_HANDLE(anv_buffer, dest_buffer, destBuffer);
+ VkDevice vk_device = anv_device_to_handle(cmd_buffer->device);
struct anv_saved_state saved_state;
meta_prepare_blit(cmd_buffer, &saved_state);
},
cmd_buffer);
- struct anv_image *dest_image;
+ VkImage destImage;
anv_CreateImage(vk_device,
&(VkImageCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
.tiling = VK_IMAGE_TILING_LINEAR,
.usage = VK_IMAGE_USAGE_SAMPLED_BIT,
.flags = 0,
- }, (VkImage *)&dest_image);
+ }, &destImage);
+
+ ANV_FROM_HANDLE(anv_image, dest_image, destImage);
/* 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.
anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
- .image = (VkImage)dest_image,
+ .image = destImage,
.format = src_image->format,
.mipLevel = 0,
.baseArraySlice = 0,
(VkOffset3D) { 0, 0, 0 },
pRegions[r].imageExtent);
- anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, (VkImage) dest_image);
+ anv_DestroyObject(vk_device, VK_OBJECT_TYPE_IMAGE, destImage);
}
meta_finish_blit(cmd_buffer, &saved_state);
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges)
{
- struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *)cmdBuffer;
- struct anv_image *image = (struct anv_image *)_image;
+ ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
+ ANV_FROM_HANDLE(anv_image, image, _image);
struct anv_saved_state saved_state;
anv_cmd_buffer_save(cmd_buffer, &saved_state);
cmd_buffer);
VkFramebuffer fb;
- anv_CreateFramebuffer((VkDevice) cmd_buffer->device,
+ anv_CreateFramebuffer(anv_device_to_handle(cmd_buffer->device),
&(VkFramebufferCreateInfo) {
.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
.colorAttachmentCount = 1,
}, &fb);
VkRenderPass pass;
- anv_CreateRenderPass((VkDevice) cmd_buffer->device,
+ anv_CreateRenderPass(anv_device_to_handle(cmd_buffer->device),
&(VkRenderPassCreateInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
.renderArea = { { 0, 0 }, { view.extent.width, view.extent.height } },
.depthStencilFormat = VK_FORMAT_UNDEFINED,
}, &pass);
- anv_CmdBeginRenderPass((VkCmdBuffer) cmd_buffer,
+ anv_CmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
&(VkRenderPassBegin) {
.renderPass = pass,
- .framebuffer = (VkFramebuffer) fb,
+ .framebuffer = fb,
});
struct clear_instance_data instance_data = {
meta_emit_clear(cmd_buffer, 1, &instance_data);
- anv_CmdEndRenderPass((VkCmdBuffer) cmd_buffer);
+ anv_CmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
}
}
}
anv_device_init_meta_clear_state(device);
anv_device_init_meta_blit_state(device);
- anv_CreateDynamicRasterState((VkDevice) device,
+ anv_CreateDynamicRasterState(anv_device_to_handle(device),
&(VkDynamicRsStateCreateInfo) {
.sType = VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO,
},
&device->meta_state.shared.rs_state);
- anv_CreateDynamicColorBlendState((VkDevice) device,
+ anv_CreateDynamicColorBlendState(anv_device_to_handle(device),
&(VkDynamicCbStateCreateInfo) {
.sType = VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
},
&device->meta_state.shared.cb_state);
- anv_CreateDynamicDepthStencilState((VkDevice) device,
+ anv_CreateDynamicDepthStencilState(anv_device_to_handle(device),
&(VkDynamicDsStateCreateInfo) {
.sType = VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO
},
anv_device_finish_meta(struct anv_device *device)
{
/* Clear */
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_PIPELINE,
+ anv_DestroyObject(anv_device_to_handle(device), VK_OBJECT_TYPE_PIPELINE,
device->meta_state.clear.pipeline);
/* Blit */
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_PIPELINE,
+ anv_DestroyObject(anv_device_to_handle(device), VK_OBJECT_TYPE_PIPELINE,
device->meta_state.blit.pipeline);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_PIPELINE_LAYOUT,
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_PIPELINE_LAYOUT,
device->meta_state.blit.pipeline_layout);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT,
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT,
device->meta_state.blit.ds_layout);
/* Shared */
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_DYNAMIC_RS_STATE,
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_DYNAMIC_RS_STATE,
device->meta_state.shared.rs_state);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_DYNAMIC_CB_STATE,
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_DYNAMIC_CB_STATE,
device->meta_state.shared.cb_state);
- anv_DestroyObject((VkDevice) device, VK_OBJECT_TYPE_DYNAMIC_DS_STATE,
+ anv_DestroyObject(anv_device_to_handle(device),
+ VK_OBJECT_TYPE_DYNAMIC_DS_STATE,
device->meta_state.shared.ds_state);
}