dzn: drop needless enum-casts

After rewriting to C, we also don't need these casts.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
This commit is contained in:
Erik Faye-Lund 2022-04-20 12:50:04 +02:00 committed by Marge Bot
parent 785b6579ae
commit dee89ea027
3 changed files with 7 additions and 7 deletions

View File

@ -339,7 +339,7 @@ dzn_cmd_buffer_gather_events(struct dzn_cmd_buffer *cmdbuf)
goto out;
hash_table_foreach(cmdbuf->events.ht, he) {
enum dzn_event_state state = (enum dzn_event_state)(uintptr_t)he->data;
enum dzn_event_state state = (uintptr_t)he->data;
if (state != DZN_EVENT_STATE_EXTERNAL_WAIT) {
struct dzn_cmd_event_signal signal = { (struct dzn_event *)he->key, state == DZN_EVENT_STATE_SET };
@ -3875,7 +3875,7 @@ dzn_CmdWaitEvents(VkCommandBuffer commandBuffer,
struct hash_entry *he =
_mesa_hash_table_search(cmdbuf->events.ht, event);
if (he) {
enum dzn_event_state state = (enum dzn_event_state)(uintptr_t)he->data;
enum dzn_event_state state = (uintptr_t)he->data;
assert(state != DZN_EVENT_STATE_RESET);
flush_pipeline = state == DZN_EVENT_STATE_SET;
} else {

View File

@ -1760,7 +1760,7 @@ dzn_device_create_sync_for_memory(struct vk_device *device,
struct vk_sync **sync_out)
{
return vk_sync_create(device, &vk_sync_dummy_type,
(enum vk_sync_flags)0, 1, sync_out);
0, 1, sync_out);
}
static void

View File

@ -696,10 +696,10 @@ void
dzn_meta_finish(struct dzn_device *device)
{
for (uint32_t i = 0; i < ARRAY_SIZE(device->triangle_fan); i++)
dzn_meta_triangle_fan_rewrite_index_finish(device, (enum dzn_index_type)i);
dzn_meta_triangle_fan_rewrite_index_finish(device, i);
for (uint32_t i = 0; i < ARRAY_SIZE(device->indirect_draws); i++)
dzn_meta_indirect_draw_finish(device, (enum dzn_indirect_draw_type)i);
dzn_meta_indirect_draw_finish(device, i);
dzn_meta_blits_finish(device);
}
@ -713,14 +713,14 @@ dzn_meta_init(struct dzn_device *device)
for (uint32_t i = 0; i < ARRAY_SIZE(device->indirect_draws); i++) {
VkResult result =
dzn_meta_indirect_draw_init(device, (enum dzn_indirect_draw_type)i);
dzn_meta_indirect_draw_init(device, i);
if (result != VK_SUCCESS)
goto out;
}
for (uint32_t i = 0; i < ARRAY_SIZE(device->triangle_fan); i++) {
VkResult result =
dzn_meta_triangle_fan_rewrite_index_init(device, (enum dzn_index_type)i);
dzn_meta_triangle_fan_rewrite_index_init(device, i);
if (result != VK_SUCCESS)
goto out;
}