Shader packs: Iris's SEPARATE_HARDWARE_SAMPLERS feature

`iris.features.*` may name SEPARATE_HARDWARE_SAMPLERS (ShaderDoc, "Separate
Hardware Shadow Samplers"): with shadow hardware filtering on, shadowtex0 and
shadowtex1 stay plain depth samplers, and shadowtex0HW and shadowtex1HW
compare. Horizon already binds the HW names to the shadow depth buffers and
picks a comparison sampler by the declared type: a probe pack of our own gets
the same comparison results as in Iris 1.11.7, and plain depths from
shadowtex0/1 alike. Only the flag was missing. RenderPearl v2.7.2 and
Visual Vibrance v0.3.5a require it, and the game logged it as not supported.

Fixes #7179

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Arslan ArmanulyandClaude Opus 5.5 committed 2026-11-02 17:26:51 +05:00
1 parent fbb17c980e
commit 0f44ec6a95
1 file changed
+9 -4
+9 -4
View File
@@ -3,11 +3,15 @@
use std::collections::BTreeMap;
/// The Iris feature flags (`iris.features.*`) Horizon has.
const FEATURES: [&str; 4] = [
/// The Iris feature flags (`iris.features.*`) Horizon has. `SEPARATE_HARDWARE_SAMPLERS`
/// (ShaderDoc, "Separate Hardware Shadow Samplers"): `shadowtex0`/`shadowtex1` stay plain depth
/// samplers when hardware filtering is on, `shadowtex0HW`/`shadowtex1HW` compare; Horizon picks
/// a comparison sampler by the declared type (`sampler2DShadow`), so they always are.
const FEATURES: [&str; 5] = [
"COMPUTE_SHADERS",
"CUSTOM_IMAGES",
"ENTITY_TRANSLUCENT",
"SEPARATE_HARDWARE_SAMPLERS",
"SSBO",
];
@@ -413,13 +417,14 @@ mod tests {
#[test]
fn iris_features_are_defined_or_noted() {
let properties = crate::Properties::parse(
"iris.features.optional = COMPUTE_SHADERS NOT_A_FEATURE\n\
iris.features.required = ENTITY_TRANSLUCENT NOT_A_FEATURE\n",
"iris.features.optional = COMPUTE_SHADERS SEPARATE_HARDWARE_SAMPLERS NOT_A_FEATURE\n\
iris.features.required = ENTITY_TRANSLUCENT SEPARATE_HARDWARE_SAMPLERS NOT_A_FEATURE\n",
&Macros::standard(),
);
let mut m = Macros::standard();
let notes = m.define_features(&properties);
assert!(m.is_defined("IRIS_FEATURE_COMPUTE_SHADERS"));
assert!(m.is_defined("IRIS_FEATURE_SEPARATE_HARDWARE_SAMPLERS"));
assert!(!m.is_defined("IRIS_FEATURE_NOT_A_FEATURE"));
assert_eq!(
notes,