Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkd3d: Add config flag to force precise math globally. #2045

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/vkd3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ extern "C" {
#define VKD3D_CONFIG_FLAG_DISABLE_NV_DGCC (1ull << 46)
#define VKD3D_CONFIG_FLAG_MEMORY_ALLOCATOR_SKIP_IMAGE_HEAP_CLEAR (1ull << 47)
#define VKD3D_CONFIG_FLAG_DRIVER_VERSION_SENSITIVE_SHADERS (1ull << 48)
#define VKD3D_CONFIG_FLAG_FORCE_NOCONTRACTION (1ull << 49)

struct vkd3d_instance;

Expand Down
2 changes: 2 additions & 0 deletions libs/vkd3d/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ static void vkd3d_instance_apply_global_shader_quirks(void)
static const struct override overrides[] =
{
{ VKD3D_CONFIG_FLAG_FORCE_NO_INVARIANT_POSITION, VKD3D_SHADER_QUIRK_INVARIANT_POSITION, true },
{ VKD3D_CONFIG_FLAG_FORCE_NOCONTRACTION, VKD3D_SHADER_QUIRK_FORCE_NOCONTRACT_MATH, false },
};
uint64_t eq_test;
unsigned int i;
Expand Down Expand Up @@ -933,6 +934,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] =
{"disable_depth_compression", VKD3D_CONFIG_FLAG_DISABLE_DEPTH_COMPRESSION},
{"disable_color_compression", VKD3D_CONFIG_FLAG_DISABLE_COLOR_COMPRESSION},
{"app_debug_marker_only", VKD3D_CONFIG_FLAG_APP_DEBUG_MARKER_ONLY},
{"force_nocontraction", VKD3D_CONFIG_FLAG_FORCE_NOCONTRACTION},
};

static void vkd3d_config_flags_init_once(void)
Expand Down