summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-07-14 10:42:45 -0700
committerChad Versace <[email protected]>2015-07-14 10:42:45 -0700
commitd80fea1af603672a774fdffbbcf0b4e2011a4526 (patch)
treeaa41bf7415fee49087fe80028e30a52c103b5f0b /src
parent9250e1e9e515f68a5f19b5ac2f7b8fad6e7db1bd (diff)
vk/0.132: Add vkDestroyDynamicViewportState()
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/device.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/vulkan/device.c b/src/vulkan/device.c
index 9d1c0019a68..0b2914e7d8e 100644
--- a/src/vulkan/device.c
+++ b/src/vulkan/device.c
@@ -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,