vk/0.132: Add vkDestroyDynamicViewportState()
This commit is contained in:
parent
9250e1e9e5
commit
d80fea1af6
|
@ -2059,6 +2059,7 @@ typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescripto
|
|||
typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
|
||||
typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
|
||||
typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState);
|
||||
typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState);
|
||||
typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState);
|
||||
typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState);
|
||||
typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState);
|
||||
|
@ -2518,6 +2519,10 @@ VkResult VKAPI vkCreateDynamicViewportState(
|
|||
const VkDynamicViewportStateCreateInfo* pCreateInfo,
|
||||
VkDynamicViewportState* pState);
|
||||
|
||||
VkResult VKAPI vkDestroyDynamicViewportState(
|
||||
VkDevice device,
|
||||
VkDynamicViewportState dynamicViewportState);
|
||||
|
||||
VkResult VKAPI vkCreateDynamicRasterState(
|
||||
VkDevice device,
|
||||
const VkDynamicRasterStateCreateInfo* pCreateInfo,
|
||||
|
|
|
@ -1253,8 +1253,10 @@ VkResult anv_DestroyObject(
|
|||
anv_device_free(device, (void *) _object);
|
||||
return VK_SUCCESS;
|
||||
|
||||
case VK_OBJECT_TYPE_COMMAND_BUFFER:
|
||||
case VK_OBJECT_TYPE_DYNAMIC_VP_STATE:
|
||||
return anv_DestroyDynamicViewportState(_device, (VkDynamicViewportState) _object);
|
||||
|
||||
case VK_OBJECT_TYPE_COMMAND_BUFFER:
|
||||
case VK_OBJECT_TYPE_FRAMEBUFFER:
|
||||
(object->destructor)(device, object, objType);
|
||||
return VK_SUCCESS;
|
||||
|
@ -2143,15 +2145,12 @@ anv_dynamic_vp_state_destroy(struct anv_device *device,
|
|||
struct anv_object *object,
|
||||
VkObjectType obj_type)
|
||||
{
|
||||
struct anv_dynamic_vp_state *state = (void *)object;
|
||||
struct anv_dynamic_vp_state *vp_state = (void *) object;
|
||||
|
||||
assert(obj_type == VK_OBJECT_TYPE_DYNAMIC_VP_STATE);
|
||||
|
||||
anv_state_pool_free(&device->dynamic_state_pool, state->sf_clip_vp);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, state->cc_vp);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, state->scissor);
|
||||
|
||||
anv_device_free(device, state);
|
||||
anv_DestroyDynamicViewportState(anv_device_to_handle(device),
|
||||
anv_dynamic_vp_state_to_handle(vp_state));
|
||||
}
|
||||
|
||||
VkResult anv_CreateDynamicViewportState(
|
||||
|
@ -2241,6 +2240,22 @@ VkResult anv_CreateDynamicViewportState(
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult anv_DestroyDynamicViewportState(
|
||||
VkDevice _device,
|
||||
VkDynamicViewportState _vp_state)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||
ANV_FROM_HANDLE(anv_dynamic_vp_state, vp_state, _vp_state);
|
||||
|
||||
anv_state_pool_free(&device->dynamic_state_pool, vp_state->sf_clip_vp);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, vp_state->cc_vp);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, vp_state->scissor);
|
||||
|
||||
anv_device_free(device, vp_state);
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult anv_CreateDynamicRasterState(
|
||||
VkDevice _device,
|
||||
const VkDynamicRasterStateCreateInfo* pCreateInfo,
|
||||
|
|
Loading…
Reference in New Issue