Skip to content

Commit

Permalink
[d3d9] Enable strict float emulation by default for new radv.
Browse files Browse the repository at this point in the history
  • Loading branch information
DadSchoorse authored and misyltoad committed Jan 20, 2022
1 parent a268de5 commit 14df2f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dxvk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
# - Strict: Use a slower but more correct approach. Necessary for some games
# - Auto: DXVK will pick automatically

# d3d9.floatEmulation = True
# d3d9.floatEmulation = Auto


# Enable dialog box mode
Expand Down
14 changes: 10 additions & 4 deletions src/d3d9/d3d9_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ namespace dxvk {
0, 0);
applyTristate(this->generalHazards, config.getOption<Tristate>("d3d9.generalHazards", Tristate::Auto));

std::string floatEmulation = Config::toLower(config.getOption<std::string>("d3d9.floatEmulation", "true"));
std::string floatEmulation = Config::toLower(config.getOption<std::string>("d3d9.floatEmulation", "auto"));
if (floatEmulation == "strict") {
d3d9FloatEmulation = D3D9FloatEmulation::Strict;
d3d9FloatEmulation = D3D9FloatEmulation::Strict;
} else if (floatEmulation == "false") {
d3d9FloatEmulation = D3D9FloatEmulation::Disabled;
d3d9FloatEmulation = D3D9FloatEmulation::Disabled;
} else if (floatEmulation == "true") {
d3d9FloatEmulation = D3D9FloatEmulation::Enabled;
} else {
d3d9FloatEmulation = D3D9FloatEmulation::Enabled;
bool hasMulz = adapter->matchesDriver(DxvkGpuVendor::Amd,
VK_DRIVER_ID_MESA_RADV,
VK_MAKE_VERSION(21, 99, 99),
0);
d3d9FloatEmulation = hasMulz ? D3D9FloatEmulation::Strict : D3D9FloatEmulation::Enabled;
}
}

Expand Down

0 comments on commit 14df2f7

Please sign in to comment.