diff options
author | Eric Anholt <eric@anholt.net> | 2012-07-23 15:33:55 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-25 04:39:59 -0400 |
commit | 0da5cec1de1eb39563fb6ca2be48c0e56fed6309 (patch) | |
tree | 427e07994ce7c4428c939390bb705e9849a766f7 /drivers/gpu/drm | |
parent | 35313cde4c582f3581a4b8397311f302680625f5 (diff) |
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: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 981e14f000e3..5af631e788c8 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -1228,6 +1228,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1228 | } | 1228 | } |
1229 | } | 1229 | } |
1230 | 1230 | ||
1231 | ret = i915_switch_context(ring, file, ctx_id); | ||
1232 | if (ret) | ||
1233 | goto err; | ||
1234 | |||
1231 | if (ring == &dev_priv->ring[RCS] && | 1235 | if (ring == &dev_priv->ring[RCS] && |
1232 | mode != dev_priv->relative_constants_mode) { | 1236 | mode != dev_priv->relative_constants_mode) { |
1233 | ret = intel_ring_begin(ring, 4); | 1237 | ret = intel_ring_begin(ring, 4); |
@@ -1249,10 +1253,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1249 | goto err; | 1253 | goto err; |
1250 | } | 1254 | } |
1251 | 1255 | ||
1252 | ret = i915_switch_context(ring, file, ctx_id); | ||
1253 | if (ret) | ||
1254 | goto err; | ||
1255 | |||
1256 | trace_i915_gem_ring_dispatch(ring, seqno); | 1256 | trace_i915_gem_ring_dispatch(ring, seqno); |
1257 | 1257 | ||
1258 | exec_start = batch_obj->gtt_offset + args->batch_start_offset; | 1258 | exec_start = batch_obj->gtt_offset + args->batch_start_offset; |