gpu,gpu/backend: [compute] handle loss of buffer contents during download

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-02-24 18:48:03 +01:00
parent e66979a8c0
commit f973b3f384
3 changed files with 7 additions and 1 deletions
+3
View File
@@ -821,6 +821,9 @@ func (g *compute) render(tileDims image.Point) error {
t.kernel4.end()
if err := g.buffers.memory.buffer.Download(gunsafe.StructView(g.memHeader)); err != nil {
if err == backend.ErrContentLost {
continue
}
return err
}
switch errCode := g.memHeader.mem_error; errCode {