diff options
author | Samuel Pitoiset <[email protected]> | 2018-05-30 14:21:42 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-06-04 12:41:10 +0200 |
commit | e3e929f8c342b32dc8f5296adf8fb337866fa40a (patch) | |
tree | a1b59109c143e05e2ac3b830807dd9a56b49d7cc /src/getopt | |
parent | e44f90eccfaec2a1b1e813f93497bb498181dd2f (diff) |
nir: implement the GLSL equivalent of if simplication in nir_opt_if
This pass turns:
if (cond) {
} else {
do_work();
}
into:
if (!cond) {
do_work();
} else {
}
Here's the vkpipeline-db stats (from affected shaders) on Polaris10:
Totals from affected shaders:
SGPRS: 17272 -> 17296 (0.14 %)
VGPRS: 18712 -> 18740 (0.15 %)
Spilled SGPRs: 1179 -> 1142 (-3.14 %)
Code Size: 1503364 -> 1515176 (0.79 %) bytes
Max Waves: 916 -> 911 (-0.55 %)
This pass only affects Serious Sam 2017 (Vulkan) on my side. The
stats are not really good for now. Some shaders look quite dumb
but this will be improved with further NIR passes, like ifs
combination.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/getopt')
0 files changed, 0 insertions, 0 deletions