mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
i965g: use pipe_error return value for brw_batchbuffer_require_space
trivial/tri runs without crashing (on debug winsys) but still produces obviously incorrect command buffers.
This commit is contained in:
parent
2475e5db67
commit
b2bf5f98d9
1 changed files with 3 additions and 3 deletions
|
|
@ -103,19 +103,19 @@ brw_batchbuffer_emit_dword(struct brw_batchbuffer *batch, GLuint dword)
|
|||
batch->ptr += 4;
|
||||
}
|
||||
|
||||
static INLINE boolean
|
||||
static INLINE enum pipe_error
|
||||
brw_batchbuffer_require_space(struct brw_batchbuffer *batch,
|
||||
GLuint sz)
|
||||
{
|
||||
assert(sz < batch->size - 8);
|
||||
if (brw_batchbuffer_space(batch) < sz) {
|
||||
assert(0);
|
||||
return FALSE;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
batch->emit.end_ptr = batch->ptr + sz;
|
||||
#endif
|
||||
return TRUE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Here are the crusty old macros, to be removed:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue