]> git.draconx.ca Git - gentoo-draconx.git/blob - media-libs/mesa/files/0001-i965-gen4-Fix-GPU-hangs-since-the-program-streaming-.patch
2b385d28c68b22bbee55d75b77e77aa5c78ab5b4
[gentoo-draconx.git] / media-libs / mesa / files / 0001-i965-gen4-Fix-GPU-hangs-since-the-program-streaming-.patch
1 From 804995807dfea9cbdbd676e52b95d42715101913 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Fri, 8 Jul 2011 15:30:48 -0700
4 Subject: [PATCH] i965/gen4: Fix GPU hangs since the program streaming change.
5
6 This was tricky.  We were doing a use-before-initialize of
7 grf_reg_count, but the value usually got overwritten anyway -- when we
8 didn't have to do a relocation (typical), or on gen5 when we didn't
9 have relocations at all.
10
11 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38771
12 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 (cherry picked from commit d03fdc4cdefdfdc5b59547945704c6037a5061c7)
14 ---
15  src/mesa/drivers/dri/i965/brw_vs_state.c |    2 +-
16  1 files changed, 1 insertions(+), 1 deletions(-)
17
18 diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
19 index d5010a2..179ca19 100644
20 --- a/src/mesa/drivers/dri/i965/brw_vs_state.c
21 +++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
22 @@ -47,6 +47,7 @@ brw_prepare_vs_unit(struct brw_context *brw)
23     memset(vs, 0, sizeof(*vs));
24  
25     /* BRW_NEW_PROGRAM_CACHE | CACHE_NEW_VS_PROG */
26 +   vs->thread0.grf_reg_count = ALIGN(brw->vs.prog_data->total_grf, 16) / 16 - 1;
27     vs->thread0.kernel_start_pointer =
28        brw_program_reloc(brw,
29                         brw->vs.state_offset +
30 @@ -54,7 +55,6 @@ brw_prepare_vs_unit(struct brw_context *brw)
31                         brw->vs.prog_offset +
32                         (vs->thread0.grf_reg_count << 1)) >> 6;
33  
34 -   vs->thread0.grf_reg_count = ALIGN(brw->vs.prog_data->total_grf, 16) / 16 - 1;
35     vs->thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
36     /* Choosing multiple program flow means that we may get 2-vertex threads,
37      * which will have the channel mask for dwords 4-7 enabled in the thread,
38 -- 
39 1.7.3.4
40