diff options
author | Eric Anholt <[email protected]> | 2011-08-30 15:50:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-09-06 18:00:57 -0700 |
commit | 8adcad213ef6cbbaa9adf1485827125cc05aa033 (patch) | |
tree | 688a145806438818e83bf3dcfbf5af38403e4396 /src | |
parent | 23eec54bb0f368d9c88894b544b4af8f01cae2ae (diff) |
i965/vs: Fix GPU hangs in shaders with large virtual GRFs pre-gen6.
If you get your total GRF count wrong, you write over some other
shader's g0, and the GPU fails shortly thereafter.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 72e0c0755f7..9fd4922bb3f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp @@ -216,7 +216,8 @@ vec4_visitor::reg_allocate() int reg = ra_get_node_reg(g, i); hw_reg_mapping[i] = first_assigned_grf + brw->vs.ra_reg_to_grf[reg]; - prog_data->total_grf = MAX2(prog_data->total_grf, hw_reg_mapping[i] + 1); + prog_data->total_grf = MAX2(prog_data->total_grf, + hw_reg_mapping[i] + virtual_grf_sizes[i]); } foreach_list(node, &this->instructions) { |