diff options
author | Lionel Landwerlin <[email protected]> | 2019-05-28 08:52:50 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-05-28 20:23:16 +0100 |
commit | 366811bedb67ae7d31a02ea9b1f9fa942fb93602 (patch) | |
tree | 11e97926157e71aacd96841b421e1cb65f844ddd /src/gallium/targets/dri | |
parent | 47a10edefb3510d1cae071037dac78a46b31949b (diff) |
nir/lower_non_uniform: safely iterate over blocks
This fixes a problem where the same instruction gets replaced twice.
This was happening when the replaced instruction would be at the end
of a block.
Replacement of :
if ssa_8 {
....
intrinsic bindless_image_store (ssa_44, ssa_16, ssa_0, ssa_15) (5, 0, 34836, 32) /* image_dim=Buf */ /* image_array=false */ /* format=34836 */ /* access=32 */
}
Would be :
if ssa_8 {
loop {
vec1 32 ssa_47 = intrinsic read_first_invocation (ssa_44) ()
vec1 1 ssa_48 = ieq ssa_47, ssa_44
if ssa_48 {
loop {
vec1 32 ssa_49 = intrinsic read_first_invocation (ssa_44) ()
vec1 1 ssa_50 = ieq ssa_49, ssa_44
if ssa_50 {
intrinsic bindless_image_store (ssa_44, ssa_16, ssa_0, ssa_15) (5, 0, 34836, 32) /* image_dim=Buf */ /* image_array=false */ /* format=34836 */ /* access=32 */
break
} else {
....
}
Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: 3bd545764151 ("nir: Add a lowering pass for non-uniform resource access")
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium/targets/dri')
0 files changed, 0 insertions, 0 deletions