pvr: replace unsupported sub-command type pvr_finishme()s with unreachable()s
authorFrank Binns <frank.binns@imgtec.com>
Tue, 1 Nov 2022 10:35:12 +0000 (10:35 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 10 Nov 2022 14:11:07 +0000 (14:11 +0000)
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19578>

src/imagination/vulkan/pvr_cmd_buffer.c

index b98116da10380361e10d061362bea51c1c5c2274..7ab1b6b4431948d3d4705a3dc680efcee1e643ed 100644 (file)
@@ -111,8 +111,7 @@ static void pvr_cmd_buffer_free_sub_cmd(struct pvr_cmd_buffer *cmd_buffer,
          break;
 
       default:
-         pvr_finishme("Unsupported sub-command type %d", sub_cmd->type);
-         break;
+         unreachable("Unsupported sub-command type");
       }
    }
 
@@ -277,9 +276,7 @@ static void pvr_cmd_buffer_update_barriers(struct pvr_cmd_buffer *cmd_buffer,
       break;
 
    default:
-      barriers = 0;
-      pvr_finishme("Unsupported sub-command type %d", type);
-      break;
+      unreachable("Unsupported sub-command type");
    }
 
    for (uint32_t i = 0; i < ARRAY_SIZE(state->barriers_needed); i++)
@@ -1563,8 +1560,7 @@ static VkResult pvr_cmd_buffer_end_sub_cmd(struct pvr_cmd_buffer *cmd_buffer)
       break;
 
    default:
-      pvr_finishme("Unsupported sub-command type %d", sub_cmd->type);
-      break;
+      unreachable("Unsupported sub-command type");
    }
 
    state->current_sub_cmd = NULL;
@@ -1717,8 +1713,7 @@ static VkResult pvr_cmd_buffer_start_sub_cmd(struct pvr_cmd_buffer *cmd_buffer,
       break;
 
    default:
-      pvr_finishme("Unsupported sub-command type %d", type);
-      break;
+      unreachable("Unsupported sub-command type");
    }
 
    list_addtail(&sub_cmd->link, &cmd_buffer->sub_cmds);
@@ -5780,8 +5775,7 @@ static VkResult pvr_execute_sub_cmd(struct pvr_cmd_buffer *cmd_buffer,
       break;
 
    default:
-      mesa_loge("Unsupported sub-command type %d", primary_sub_cmd->type);
-      break;
+      unreachable("Unsupported sub-command type");
    }
 
    return VK_SUCCESS;