diff options
author | Matt Turner <[email protected]> | 2018-12-10 11:50:55 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2019-01-09 16:42:41 -0800 |
commit | 18b4e87370d3ebb9d7dbb51e58b2da1b64a2227f (patch) | |
tree | 6ea309c61701b55ce689a9041a7b80999785481e /src/intel/compiler | |
parent | 622d4291287b8dfad612b92945abd39e767a7b15 (diff) |
intel/compiler: Heap-allocate temporary storage
Shaders containing software implementations of double-precision
operations can be very large such that we cannot stack-allocate
an array of grf_count*16.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_schedule_instructions.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_schedule_instructions.cpp b/src/intel/compiler/brw_schedule_instructions.cpp index 95e4b873501..9b279df5cf1 100644 --- a/src/intel/compiler/brw_schedule_instructions.cpp +++ b/src/intel/compiler/brw_schedule_instructions.cpp @@ -973,7 +973,7 @@ fs_instruction_scheduler::calculate_deps() * After register allocation, reg_offsets are gone and we track individual * GRF registers. */ - schedule_node *last_grf_write[grf_count * 16]; + schedule_node **last_grf_write; schedule_node *last_mrf_write[BRW_MAX_MRF(v->devinfo->gen)]; schedule_node *last_conditional_mod[8] = {}; schedule_node *last_accumulator_write = NULL; @@ -984,7 +984,7 @@ fs_instruction_scheduler::calculate_deps() */ schedule_node *last_fixed_grf_write = NULL; - memset(last_grf_write, 0, sizeof(last_grf_write)); + last_grf_write = (schedule_node **)calloc(sizeof(schedule_node *), grf_count * 16); memset(last_mrf_write, 0, sizeof(last_mrf_write)); /* top-to-bottom dependencies: RAW and WAW. */ @@ -1111,7 +1111,7 @@ fs_instruction_scheduler::calculate_deps() } /* bottom-to-top dependencies: WAR */ - memset(last_grf_write, 0, sizeof(last_grf_write)); + memset(last_grf_write, 0, sizeof(schedule_node *) * grf_count * 16); memset(last_mrf_write, 0, sizeof(last_mrf_write)); memset(last_conditional_mod, 0, sizeof(last_conditional_mod)); last_accumulator_write = NULL; @@ -1227,6 +1227,8 @@ fs_instruction_scheduler::calculate_deps() last_accumulator_write = n; } } + + free(last_grf_write); } void |