diff options
author | Gert Wollny <[email protected]> | 2018-06-05 22:26:44 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2018-08-11 12:32:42 +0200 |
commit | 7d55d01b539ac298edf95c2fd006a53dc7df6ee6 (patch) | |
tree | b309d5cfa23f024845882a371ccdf9a121e08a84 /src | |
parent | f2a46363399e3eef0daff1025385c41abc120754 (diff) |
mesa/st/glsl_to_tgsi: move evaluation of read mask up in the call hierarchy
In preparation of the array live range tracking the evaluation of the read
mask is moved out the register live range tracking to the enclosing call
of the generalized read access tracking.
Signed-off-by: Gert Wollny <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp index bc0b2f20b62..24c3fbe2ae3 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp @@ -494,13 +494,8 @@ void temp_access::record_write(int line, prog_scope *scope, int writemask) comp[3].record_write(line, scope); } -void temp_access::record_read(int line, prog_scope *scope, int swizzle) +void temp_access::record_read(int line, prog_scope *scope, int readmask) { - int readmask = 0; - for (int idx = 0; idx < 4; ++idx) { - int swz = GET_SWZ(swizzle, idx); - readmask |= (1 << swz) & 0xF; - } update_access_mask(readmask); if (readmask & WRITEMASK_X) @@ -940,8 +935,14 @@ access_recorder::~access_recorder() void access_recorder::record_read(const st_src_reg& src, int line, prog_scope *scope) { + int readmask = 0; + for (int idx = 0; idx < 4; ++idx) { + int swz = GET_SWZ(src.swizzle, idx); + readmask |= (1 << swz) & 0xF; + } + if (src.file == PROGRAM_TEMPORARY) - temp_acc[src.index].record_read(line, scope, src.swizzle); + temp_acc[src.index].record_read(line, scope, readmask); if (src.reladdr) record_read(*src.reladdr, line, scope); |