Skip to content

Commit

Permalink
[d3d9] Add an config option to disable non seamless cube maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
DadSchoorse authored and doitsujin committed Jul 7, 2022
1 parent b40a428 commit 96b3897
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dxvk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,16 @@

# d3d9.apitraceMode = False

# Seamless Cubes
#
# Don't use non seamless cube maps even if they are supported.
# Non seamless cubes are correct d3d9 behavior, but can produce worse looking edges.
#
# Supported values:
# - True/False

# d3d9.seamlessCubes = False

# Debug Utils
#
# Enables debug utils as this is off by default, this enables user annotations like BeginEvent()/EndEvent().
Expand Down
2 changes: 1 addition & 1 deletion src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5954,7 +5954,7 @@ namespace dxvk {
info.mipmapLodMin = mipFilter.MipsEnabled ? float(cKey.MaxMipLevel) : 0;
info.mipmapLodMax = mipFilter.MipsEnabled ? FLT_MAX : 0;
info.usePixelCoord = VK_FALSE;
info.nonSeamless = m_dxvkDevice->features().extNonSeamlessCubeMap.nonSeamlessCubeMap;
info.nonSeamless = m_dxvkDevice->features().extNonSeamlessCubeMap.nonSeamlessCubeMap && !m_d3d9Options.seamlessCubes;

DecodeD3DCOLOR(cKey.BorderColor, info.borderColor.float32);

Expand Down
1 change: 1 addition & 0 deletions src/d3d9/d3d9_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ namespace dxvk {
this->apitraceMode = config.getOption<bool> ("d3d9.apitraceMode", false);
this->deviceLocalConstantBuffers = config.getOption<bool> ("d3d9.deviceLocalConstantBuffers", false);
this->allowDirectBufferMapping = config.getOption<bool> ("d3d9.allowDirectBufferMapping", true);
this->seamlessCubes = config.getOption<bool> ("d3d9.seamlessCubes", false);

// If we are not Nvidia, enable general hazards.
this->generalHazards = adapter != nullptr
Expand Down
3 changes: 3 additions & 0 deletions src/d3d9/d3d9_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ namespace dxvk {

/// Disable direct buffer mapping
bool allowDirectBufferMapping;

/// Don't use non seamless cube maps
bool seamlessCubes;
};

}

0 comments on commit 96b3897

Please sign in to comment.