Skip to content

intel/fs: Disable sample mask predication for scratch stores

Scratch stores are being lowered to the instructions with side-effects, however they should be enabled in fs helper invocations, since they are produced from operations which don't imply side-effects.

To fix this - we move the decision of whether the sample mask predication is enable to the point where logical brw instructions are created.

GLSL example of the issue:

 int tmp[1024];
 ...
 do {
   // changes to tmp
 } while (some_condition(tmp))

If tmp is lowered to scrach memory, some_condition would be undefined if scratch write is predicated on sample mask, making possible for the while loop to become infinite and hang the GPU.

Closes: #3256 (closed)
Fixes: 53bfcdee

Passes CI: https://mesa-ci.01.org/global_logic/builds/282/group/63a9f0ea7bb98050796b649e85481845 (The failures are from 051f8d3d)

Edited by Danylo Piliaiev

Merge request reports

Loading