diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-02-19 17:20:11 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-02-21 14:28:37 -0800 |
commit | 7cb4dea765b5b1fe8f14197084e2ccc864d525dd (patch) | |
tree | c49ec8c3c50932dd539397efee925410936a2cfe | |
parent | b498fb95867f2b939c8e257a5cda959e42eae7b5 (diff) |
i965: Create a hardware context before initializing state module.
brw_init_state() calls brw_upload_initial_gpu_state(). If hardware
contexts are enabled (brw->hw_ctx != NULL), this will upload some
initial invariant state for the GPU. Without hardware contexts, we
rely on this state being uploaded via atoms that subscribe to the
BRW_NEW_CONTEXT bit.
Commit 46d3c2bf4ddd227193b98861f1e632498fe547d8 accidentally moved
the call to brw_init_state() before creating a hardware context.
This meant brw_upload_initial_gpu_state would always early return.
Except on Gen6+, we stopped uploading the initial GPU state via
state atoms, so it never happened.
Fixes a regression since 46d3c2bf4ddd227193b98861f1e632498fe547d8.
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 3663bbe773187dee341556ef29e58b1143ef2f5c)
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index d9d1ae5867b..d5dccaf5bbf 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -682,12 +682,6 @@ brwCreateContext(gl_api api, intel_batchbuffer_init(brw); - brw_init_state(brw); - - intelInitExtensions(ctx); - - intel_fbo_init(brw); - if (brw->gen >= 6) { /* Create a new hardware context. Using a hardware context means that * our GPU state will be saved/restored on context switch, allowing us @@ -705,6 +699,12 @@ brwCreateContext(gl_api api, } } + brw_init_state(brw); + + intelInitExtensions(ctx); + + intel_fbo_init(brw); + brw_init_surface_formats(brw); if (brw->is_g4x || brw->gen >= 5) { |