mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
Ensure that we don't wrap batchbuffers right at the beginning of a
primitive, otherwise vertices can be emitted without the full-state preamble. Fixes gears + texobj lockup.
This commit is contained in:
parent
6f9dc91045
commit
520ba25dc3
1 changed files with 10 additions and 0 deletions
|
|
@ -84,6 +84,16 @@ intelStartInlinePrimitive(struct intel_context *intel,
|
|||
{
|
||||
BATCH_LOCALS;
|
||||
|
||||
/* Need to make sure at the very least that we don't wrap
|
||||
* batchbuffers in BEGIN_BATCH below, otherwise the primitive will
|
||||
* be emitted to a batchbuffer missing the required full-state
|
||||
* preamble.
|
||||
*/
|
||||
if (intel_batchbuffer_space(intel->batch) < 100) {
|
||||
intel_batchbuffer_flush(intel->batch);
|
||||
intel->vtbl.emit_state(intel);
|
||||
}
|
||||
|
||||
/* Emit a slot which will be filled with the inline primitive
|
||||
* command later.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue