Skip to content

CL: Dedupe inline constant samplers

Fixes #62.

Clang/llvm generates a unique constant sampler for every read call which references them, rather than based on variable declarations. That causes us to end up with a bunch of identical variables.

This pass dedupes them by pointing all tex ops that reference a constant sampler to the same one, and removing dead derefs. After removing dead uniform variables, we'll only have unique constant samplers.

Merge request reports