mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-14 23:58:35 +00:00
shader_recompiler: Rework sharp tracking for robustness (#3327)
* shader_recompiler: Remove remnants of old discard Also constant propagate conditional discard if condition is constant * resource_tracking_pass: Rework sharp tracking for robustness * resource_tracking_pass: Add source dominance analysis When reachability is not enough to prune source list, check if a source dominates all other sources * resource_tracking_pass: Fix immediate check How did this work before * resource_tracking_pass: Remove unused template type * readlane_elimination_pass: Don't add phi when all args are the same New sharp tracking exposed some bad sources coming on sampler sharps with aniso disable pattern that also were part of readlane pattern, fix tracking by removing the unnecessary phis inbetween * resource_tracking_pass: Allow phi in disable aniso pattern * resource_tracking_pass: Handle not valid buffer sharp and more phi in aniso pattern
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
#include "shader_recompiler/ir/reg.h"
|
||||
#include "shader_recompiler/ir/value.h"
|
||||
|
||||
namespace Shader::Gcn {
|
||||
struct Block;
|
||||
}
|
||||
|
||||
namespace Shader::IR {
|
||||
|
||||
class Block {
|
||||
@@ -150,6 +154,10 @@ public:
|
||||
std::array<Value, NumScalarRegs> ssa_sbit_values;
|
||||
std::array<Value, NumVectorRegs> ssa_vreg_values;
|
||||
|
||||
/// Block of the CFG that corresponds to this IR block.
|
||||
/// It can be null as IR has additional control flow blocks.
|
||||
const Shader::Gcn::Block* cfg_block{};
|
||||
|
||||
private:
|
||||
/// Memory pool for instruction list
|
||||
Common::ObjectPool<Inst>* inst_pool;
|
||||
|
||||
Reference in New Issue
Block a user