On Fri, 25 Sep 2020 at 19:26, Zebediah Figura zfigura@codeweavers.com wrote:
On 9/25/20 8:00 AM, Henri Verbeet wrote:
On Fri, 25 Sep 2020 at 03:00, Zebediah Figura zfigura@codeweavers.com wrote:
+enum vkd3d_shader_hlsl_compatibility_mode +{
- VKD3D_SHADER_HLSL_COMPATIBILITY_DEFAULT = 0,
- VKD3D_SHADER_HLSL_COMPATIBILITY_BACKWARDS_COMPATIBLE = 1,
- VKD3D_SHADER_HLSL_COMPATIBILITY_STRICT = 2,
- VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_HLSL_COMPATIBILITY),
+};
Hexadecimal, please. These seem poorly defined, I'd prefer for these to refer to some kind of version/standard, similar to the way that e.g. gcc has "-std=gnu99". As far as I'm concerned it would be fine for that to be something like VKD3D_SHADER_HLSL_COMPATIBILITY_HLSL24 to refer to the version of HLSL in d3dx9_24, if that makes sense for HLSL.
Sadly, they are poorly defined :-/
As I'm sure you've guessed, they correspond to the D3DCompile() flags D3DCOMPILE_ENABLE_STRICTNESS and D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY. The latter essentially allows SM1-3 operations [tex2D(), but I don't know any others offhand] to be mapped to analogical SM4-5 operations (instead of producing an error). I don't actually know what ENABLE_STRICTNESS does.
Sure, and I wouldn't be surprised at all if D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY enables different behaviour in different versions of d3dcompiler. But presumably the behaviour we would actually implement would be more specific than that.