Consider Kipling's "Hymn of Breaking strain"
So, when the buckled girder
Lets down the grinding span,
The blame of loss, or murder,
Is laid upon the man.
Not on the Stuff—the Man!
This was good law when it was written in 1935, and it is still good law in 2021. Will it be good law forever? No one can now say. "The blame of loss, or murder" must in a legal sense be attributed to an independent being, a person.
Currently, although a programmed computer system can often do things that its designer or programmer did not predict, it is not a truly independent being, it is not a moral agent. It cannot form a criminal intent. it cannot really decide to do or not do anything, and it has no internal understanding of what it does, it is not self-conscious.
Presumably the designers of the self-driving car did not intend or foresee that it should hit and kill a pedestrian. Possibly they were negligent, possibly not.
I can imagine a computer system where none of the above statements would be true. Many SF stories have written about such machines. There is dispute among philosophers and AI experts as to whether such a truly sapient computer is even possible. But no one argues that it has already been achieved here on Earth.
When and if a truly sapient computer (or other machine) is achieved, and is recognized as an independent being, many concepts, including legal concepts, will need significant revision. I no longer expect to see that in my lifetime. I am sure it is not yet at hand.
The question asks:
Is there some standard of sentience that the computer would have to achieve in order to indict it?
No specific standard has yet been widely accepted, but if such a situation nears realization there will be. The best current standard seems to be the Turing Test, but that has a number of problems, and I do not think we would be willing to consider a computer system to be a legal person based solely on passing a Turing Test.