mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
i915g: Handle i915->batch == NULL correctly in flush
Fixes warning reported by Coverity.
This commit is contained in:
parent
9e14895884
commit
519a2cf950
1 changed files with 4 additions and 1 deletions
|
|
@ -45,10 +45,13 @@ static void i915_flush_pipe( struct pipe_context *pipe,
|
|||
struct i915_context *i915 = i915_context(pipe);
|
||||
enum i915_winsys_flush_flags winsys_flags = I915_FLUSH_ASYNC;
|
||||
|
||||
if (!i915->batch)
|
||||
return;
|
||||
|
||||
/* Only shortcut this if we have no fence, otherwise we must flush the
|
||||
* empty batchbuffer to get our fence back.
|
||||
*/
|
||||
if (!fence && i915->batch && (i915->batch->map == i915->batch->ptr)) {
|
||||
if (!fence && (i915->batch->map == i915->batch->ptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue