On Sun Jul 28 19:26:13 2024 +0000, Matteo Bruni wrote:
So this is effectively a `Fixes: 1215ee024148952525317cc104ce91e650f21ca3`, right? I'd make use of this occasion to introduce a tiny helper like `d3dx9_validate_filter()` for this, even if it's just two lines (but copied around now a handful of times). Also, while thinking of a name for the helper, I started to wonder whether we should actually validate the `filter` value. As it turns out, that's very much the case (e.g. try to use `6`.) Actual validation should be its own patch, probably, but I guess this is one more reason for introducing the helper.
Added a helper for this, and a lot more tests generally for filter argument value validation. I might have gone a bit overboard, but it's probably better to just get it all out of the way now to avoid any potential issues in the future. :)