diff options
author | Jason Ekstrand <[email protected]> | 2017-10-02 20:25:11 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 25f7453c9e6dc7c947b936bdac86680c332362bf (patch) | |
tree | 41050696699415b1c47035ee3ee6a7f8b1f6c31d /src/intel | |
parent | c4c8cba7059bdfa6f9e3924d2b5d9e2633147e58 (diff) |
intel/fs: Mark 64-bit values as being contiguous
This isn't often a problem , when we're in a compute shader, we must
push the thread local ID so we decrement the amount of available push
space by 1 and it's no longer even and 64-bit data can, in theory, span
it. By marking those uniforms contiguous, we ensure that they never get
split in half between push and pull constants.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 84792e88f62..68a47bac841 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1968,7 +1968,7 @@ fs_visitor::assign_constant_locations() /* For each uniform slot, a value of true indicates that the given slot and * the next slot must remain contiguous. This is used to keep us from - * splitting arrays apart. + * splitting arrays and 64-bit values apart. */ bool contiguous[uniforms]; memset(contiguous, 0, sizeof(contiguous)); @@ -2005,6 +2005,9 @@ fs_visitor::assign_constant_locations() if (constant_nr >= 0 && constant_nr < (int) uniforms) { int regs_read = inst->components_read(i) * type_sz(inst->src[i].type) / 4; + assert(regs_read <= 2); + if (regs_read == 2) + contiguous[constant_nr] = true; for (int j = 0; j < regs_read; j++) { is_live[constant_nr + j] = true; bitsize_access[constant_nr + j] = |