Skip to content

Commit 5f93284

Browse files
vkd3d: Add config flag to force precise math globally.
Mostly for triaging game issues. Some invariance issues exist outside just BuiltInPosition. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
1 parent 5cd7260 commit 5f93284

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

include/vkd3d.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ extern "C" {
104104
#define VKD3D_CONFIG_FLAG_DISABLE_NV_DGCC (1ull << 46)
105105
#define VKD3D_CONFIG_FLAG_MEMORY_ALLOCATOR_SKIP_IMAGE_HEAP_CLEAR (1ull << 47)
106106
#define VKD3D_CONFIG_FLAG_DRIVER_VERSION_SENSITIVE_SHADERS (1ull << 48)
107+
#define VKD3D_CONFIG_FLAG_FORCE_NOCONTRACTION (1ull << 49)
107108

108109
struct vkd3d_instance;
109110

libs/vkd3d/device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ static void vkd3d_instance_apply_global_shader_quirks(void)
839839
static const struct override overrides[] =
840840
{
841841
{ VKD3D_CONFIG_FLAG_FORCE_NO_INVARIANT_POSITION, VKD3D_SHADER_QUIRK_INVARIANT_POSITION, true },
842+
{ VKD3D_CONFIG_FLAG_FORCE_NO_CONTRACTION, VKD3D_SHADER_QUIRK_FORCE_NOCONTRACT_MATH, false },
842843
};
843844
uint64_t eq_test;
844845
unsigned int i;
@@ -932,6 +933,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] =
932933
{"disable_depth_compression", VKD3D_CONFIG_FLAG_DISABLE_DEPTH_COMPRESSION},
933934
{"disable_color_compression", VKD3D_CONFIG_FLAG_DISABLE_COLOR_COMPRESSION},
934935
{"app_debug_marker_only", VKD3D_CONFIG_FLAG_APP_DEBUG_MARKER_ONLY},
936+
{"force_nocontraction", VKD3D_CONFIG_FLAG_FORCE_NOCONTRACTION},
935937
};
936938

937939
static void vkd3d_config_flags_init_once(void)

0 commit comments

Comments
 (0)