mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pipebuffer: don't fail when validating mapped buffers
This can be almost impossible to avoid - hopefully we won't encounter a situation where this is a true requirement. Would probably require drivers to flush between hardware and software vertex processing.
This commit is contained in:
parent
a86ef37655
commit
29d9abf72d
1 changed files with 5 additions and 4 deletions
|
|
@ -365,21 +365,22 @@ fenced_buffer_validate(struct pb_buffer *buf,
|
|||
if(fenced_buf->vl && fenced_buf->vl != vl)
|
||||
return PIPE_ERROR_RETRY;
|
||||
|
||||
#if 0
|
||||
/* Do not validate if buffer is still mapped */
|
||||
if(fenced_buf->flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE) {
|
||||
/* TODO: wait for the thread that mapped the buffer to unmap it */
|
||||
return PIPE_ERROR_RETRY;
|
||||
}
|
||||
/* Final sanity checking */
|
||||
assert(!(fenced_buf->flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE));
|
||||
assert(!fenced_buf->mapcount);
|
||||
#endif
|
||||
|
||||
if(fenced_buf->vl == vl &&
|
||||
(fenced_buf->validation_flags & flags) == flags) {
|
||||
/* Nothing to do -- buffer already validated */
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
/* Final sanity checking */
|
||||
assert(!(fenced_buf->flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE));
|
||||
assert(!fenced_buf->mapcount);
|
||||
|
||||
ret = pb_validate(fenced_buf->buffer, vl, flags);
|
||||
if (ret != PIPE_OK)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue