
655 So.2d 517 (1995)
STATE of Louisiana
v.
Reginald ROBINSON.
No. 92 KA 1057.
Court of Appeal of Louisiana, First Circuit.
May 5, 1995.
*518 Ted Chapman, Amite, for appellee State of La.
Karen Crosby, Hammond, for defendant-appellant Reginald Robinson.
Before LeBLANC, PITCHER and FITZSIMMONS, JJ.
PITCHER, Judge.
The defendant, Reginald Robinson, was charged by bill of information with distribution of cocaine, in violation of LSA-R.S. 40:967. He pled not guilty and waived his right to a jury trial. After a bench trial, he was found guilty as charged. The defendant received a sentence of fifteen years at hard labor. The relevant factual and procedural history of this case was set forth in our previous, unpublished opinion in this matter. State v. Robinson, 92-1057, 643 So.2d 1335 (La.App. 1st Cir. 10/7/94). Therein, we granted defense counsel's motion to withdraw and ordered the district court to appoint substitute appellate counsel to file a new brief addressing a non-frivolous issue discovered by this Court, i.e., the effectiveness of the defendant's trial counsel, in light *519 of the defendant's possible mental incapacity to proceed to trial. Both defense counsel and the State have filed new briefs on this issue. After further consideration, we conclude that this matter must be remanded to the district court for a determination of the defendant's mental capacity to proceed.
LSA-C.Cr.P. art. 641 provides:
Mental incapacity to proceed exists when, as a result of mental disease or defect, a defendant presently lacks the capacity to understand the proceedings against him or to assist in his defense.
LSA-C.Cr.P. art. 642 provides:
The defendant's mental incapacity to proceed may be raised at any time by the defense, the district attorney, or the court. When the question of the defendant's mental incapacity to proceed is raised, there shall be no further steps in the criminal prosecution, except the institution of prosecution, until the defendant is found to have the mental capacity to proceed.
The appointment of a Sanity Commission is not a perfunctory matter or a ministerial duty of the trial court, nor is it guaranteed to every accused in every case. The fact that the defendant's capacity to proceed is called into question does not, for that reason alone, require the trial court to order a mental examination of the defendant; rather, it must have reasonable grounds to doubt the defendant's capacity. LSA-C.Cr.P. art. 643; State v. Guidry, 449 So.2d 41, 44 (La. App. 1st Cir.1984). The ordering of a Sanity Commission to inquire into the defendant's present capacity to proceed rests in the sound discretion of the trial court. State v. Guidry, 449 So.2d at 44.
After a review of the entire record in this matter, particularly considering trial counsel's opening statement to the court, we can conclude only that the trial court abused its discretion in failing to order a mental examination of the defendant. Furthermore, when neither the prosecutor nor the trial court moved to determine the defendant's mental capacity to proceed, it was incumbent upon trial counsel to do so. Although trial counsel clearly raised the issue of the defendant's mental capacity to proceed, when the court asked trial counsel if any request was made for a Sanity Commission, trial counsel replied: "No, sir."
In Strickland v. Washington, 466 U.S. 668, 686-88, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674 (1984), the United States Supreme Court established a two-part test for review of a convicted defendant's claim that his counsel's assistance was so defective as to require reversal of a conviction. First, the defendant must show that counsel's performance is deficient. Second, the defendant must show that this deficient performance prejudiced the defense.
In the instant case, we can conclude only that the defendant received ineffective assistance of counsel at trial because counsel failed to request a determination of his mental capacity to proceed. Trial counsel indicated to the court that he was unable to prepare a defense due to "either some mental defect or some problem of [the defendant's] own incomprehension." However, we are unable to say whether or not trial counsel's deficient performance prejudiced the defense. If the defendant did indeed lack the necessary mental capacity to proceed, clearly the failure to request a mental examination prejudiced him, as the trial would not have taken place. On the other hand, it is possible that the defendant had the necessary mental capacity to proceed to trial, although the instant record seems to indicate otherwise.
Accordingly, we remand this case to the trial court for a mental examination of the defendant in accordance with LSA-C.Cr.P. art. 643 et seq. In accordance with LSA-C.Cr.P. art. 647, once the Sanity Commission has issued its report(s), the trial court shall determine in a contradictory hearing whether or not the defendant had the necessary mental capacity to proceed to trial. We note that more than five and one-half years have passed since the instant trial. Therefore, if the trial court is unable to make a determination regarding the defendant's mental capacity to proceed to trial, or if it determines that the defendant lacked the necessary mental capacity to proceed to trial, it hereby is ordered to vacate the defendant's conviction and sentence and grant him a new trial. Of course, prior to any such retrial, a new determination of the defendant's mental capacity *520 to proceed would be appropriate. However, if the trial court determines that the defendant had the necessary mental capacity to proceed to trial, the defendant may appeal anew within five days of such adverse ruling.

PATENT SENTENCING ERROR
We note a patent sentencing error. Neither the minutes nor the sentencing transcript show that the trial court, in imposing this sentence, gave the defendant credit for time spent in actual custody prior to sentencing. Such an allowance of credit is mandatory. LSA-C.Cr.P. art. 880. Accordingly, we find patent sentencing error and amend the sentence to reflect that the defendant is to be given credit for time served, if any, prior to the execution of his sentence. See State v. Greer, 572 So.2d 1166, 1172 (La.App. 1st Cir.1990). Resentencing is not required. Should the trial court determine that the defendant had the necessary mental capacity to proceed to trial, it is ordered to amend the commitment and minute entry of the sentence to reflect that the defendant is given credit for time served. However, should the trial court vacate the conviction and sentence and grant the defendant a new trial, this issue of credit for time served shall become moot.
REMANDED WITH INSTRUCTIONS.
