diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2017-10-02 20:25:11 -0700 |
---|---|---|
committer | Andres Gomez <agomez@igalia.com> | 2017-11-21 18:16:44 +0200 |
commit | a2230871bfb5e69d932dc959fce8db60eb47c071 (patch) | |
tree | 18c684edb17fb0015654e21234dc17f5a7166252 | |
parent | a868bd7a7c1c58844fe11925c4f66f096c4a1916 (diff) | |
download | mesa-a2230871bfb5e69d932dc959fce8db60eb47c071.tar.gz |
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 <itoral@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 25f7453c9e6dc7c947b936bdac86680c332362bf)
-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 ef0846f5e88..7af23c1e789 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1957,7 +1957,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)); @@ -1998,6 +1998,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] = |