mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Add a compile option to control whether implicit truncation warnings are printed.
d3dcompiler and d3dx9 versions before 42 don't emit this error; this will be necessary to emulate that behaviour. Other warnings exist that are introduced in different d3dcompiler versions, although there are not very many distinct HLSL warnings to begin with. We could of course group all these together under a single compiler option, but I find that using separate top-level options is unilaterally friendlier to an API consumer, and simpler to implement as well. It also in some sense maps conceptually to e.g. "-Wno-implicit-conversion".
This commit is contained in:
committed by
Alexandre Julliard
parent
b382d1843d
commit
6b6e4bc212
Notes:
Alexandre Julliard
2024-03-27 23:08:04 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/735
@@ -310,6 +310,17 @@ enum vkd3d_shader_compile_option_name
|
||||
* \since 1.12
|
||||
*/
|
||||
VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT = 0x0000000b,
|
||||
/**
|
||||
* If \a value is nonzero, emit a compile warning warn when vectors or
|
||||
* matrices are truncated in an implicit conversion.
|
||||
* If warnings are disabled, this option has no effect.
|
||||
* This option has no effects for targets other than HLSL.
|
||||
*
|
||||
* The default value is nonzero, i.e. enable implicit truncation warnings.
|
||||
*
|
||||
* \since 1.12
|
||||
*/
|
||||
VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION = 0x0000000c,
|
||||
|
||||
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_NAME),
|
||||
};
|
||||
|
Reference in New Issue
Block a user