Commit 0da5cec1 authored by Eric Anholt's avatar Eric Anholt Committed by Daniel Vetter

drm/i915: Set the context before setting up regs for the context.

Fixes failures in transform feedback on gen7 because our SOL_RESET
flag was setting the transform feedback offsets in the old context
(occasionally happened to be ours) instead of the new context.
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 35313cde
...@@ -1228,6 +1228,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1228,6 +1228,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
} }
} }
ret = i915_switch_context(ring, file, ctx_id);
if (ret)
goto err;
if (ring == &dev_priv->ring[RCS] && if (ring == &dev_priv->ring[RCS] &&
mode != dev_priv->relative_constants_mode) { mode != dev_priv->relative_constants_mode) {
ret = intel_ring_begin(ring, 4); ret = intel_ring_begin(ring, 4);
...@@ -1249,10 +1253,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1249,10 +1253,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
goto err; goto err;
} }
ret = i915_switch_context(ring, file, ctx_id);
if (ret)
goto err;
trace_i915_gem_ring_dispatch(ring, seqno); trace_i915_gem_ring_dispatch(ring, seqno);
exec_start = batch_obj->gtt_offset + args->batch_start_offset; exec_start = batch_obj->gtt_offset + args->batch_start_offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment