summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_state_immediate.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-05-26 11:24:59 +1000
committerDave Airlie <[email protected]>2017-11-03 15:03:30 +1000
commitcc69f2385ee5405cd1bef746d3e9006fc5430545 (patch)
treea4567640f45c265abc16982fbdcad3faa504c9f2 /src/gallium/drivers/i915/i915_state_immediate.c
parent6e2eb96b6442f9f0660685af4172ab947c16e7c4 (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.c6
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);
}