diff options
author | Francisco Jerez <[email protected]> | 2017-06-22 16:42:34 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-07-20 16:56:49 -0700 |
commit | f1b7c47913344338a8730cf3561ce95527b53c4c (patch) | |
tree | c96b9b440b6f44f97d3d19de0a914074ee3e21e3 /src/intel/compiler | |
parent | 3e7b8f6cd40810601982d55d6e8d6935f0fde78c (diff) |
i965/fs: Handle explicit flag sources in flags_read()
The implementations of the ARB_shader_ballot intrinsics will explicitly
read the flag as a source register.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index f3bb3835d9b..38b5e52dc47 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -880,9 +880,6 @@ namespace { unsigned fs_inst::flags_read(const gen_device_info *devinfo) const { - /* XXX - This doesn't consider explicit uses of the flag register as source - * region. - */ if (predicate == BRW_PREDICATE_ALIGN1_ANYV || predicate == BRW_PREDICATE_ALIGN1_ALLV) { /* The vertical predication modes combine corresponding bits from @@ -893,7 +890,11 @@ fs_inst::flags_read(const gen_device_info *devinfo) const } else if (predicate) { return flag_mask(this); } else { - return 0; + unsigned mask = 0; + for (int i = 0; i < sources; i++) { + mask |= flag_mask(src[i], size_read(i)); + } + return mask; } } |