diff options
author | Dave Airlie <[email protected]> | 2017-05-26 11:24:59 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-11-03 15:03:30 +1000 |
commit | cc69f2385ee5405cd1bef746d3e9006fc5430545 (patch) | |
tree | a4567640f45c265abc16982fbdcad3faa504c9f2 /src/gallium/drivers/i915/i915_state_immediate.c | |
parent | 6e2eb96b6442f9f0660685af4172ab947c16e7c4 (diff) |
i915g: make gears run again.
We need to validate some structs exist before we dirty the states, and
avoid the problem in some other places.
Fixes: e027935a7 ("st/mesa: don't update unrelated states in non-draw calls such as Clear")
Diffstat (limited to 'src/gallium/drivers/i915/i915_state_immediate.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state_immediate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915/i915_state_immediate.c b/src/gallium/drivers/i915/i915_state_immediate.c index b6007acdd1c..14566a4bec3 100644 --- a/src/gallium/drivers/i915/i915_state_immediate.c +++ b/src/gallium/drivers/i915/i915_state_immediate.c @@ -168,11 +168,13 @@ static void upload_S6(struct i915_context *i915) /* I915_NEW_BLEND */ - LIS6 |= i915->blend->LIS6; + if (i915->blend) + LIS6 |= i915->blend->LIS6; /* I915_NEW_DEPTH */ - LIS6 |= i915->depth_stencil->depth_LIS6; + if (i915->depth_stencil) + LIS6 |= i915->depth_stencil->depth_LIS6; set_immediate(i915, I915_IMMEDIATE_S6, LIS6); } |