[dxvk] Allow non seamless samplers.

This commit is contained in:
Georg Lehmann 2022-06-09 16:55:00 +02:00 committed by Joshie
parent e9ac543627
commit f2b1805d7e
8 changed files with 10 additions and 1 deletions

View File

@ -38,6 +38,7 @@ namespace dxvk {
info.borderColor.float32[i] = desc.BorderColor[i];
info.usePixelCoord = VK_FALSE; // Not supported in D3D11
info.nonSeamless = VK_FALSE;
// Make sure to use a valid anisotropy value
if (desc.MaxAnisotropy < 1) info.maxAnisotropy = 1.0f;

View File

@ -365,6 +365,7 @@ namespace dxvk {
samplerInfo.compareOp = VK_COMPARE_OP_ALWAYS;
samplerInfo.borderColor = VkClearColorValue();
samplerInfo.usePixelCoord = VK_FALSE;
samplerInfo.nonSeamless = VK_FALSE;
m_sampler = Device->createSampler(samplerInfo);
DxvkBufferCreateInfo bufferInfo;

View File

@ -5961,6 +5961,7 @@ namespace dxvk {
info.mipmapLodMin = mipFilter.MipsEnabled ? float(cKey.MaxMipLevel) : 0;
info.mipmapLodMax = mipFilter.MipsEnabled ? FLT_MAX : 0;
info.usePixelCoord = VK_FALSE;
info.nonSeamless = VK_FALSE;
DecodeD3DCOLOR(cKey.BorderColor, info.borderColor.float32);

View File

@ -16,7 +16,7 @@ namespace dxvk {
VkSamplerCreateInfo samplerInfo;
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.flags = info.nonSeamless ? VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT : 0;
samplerInfo.magFilter = info.magFilter;
samplerInfo.minFilter = info.minFilter;
samplerInfo.mipmapMode = info.mipmapMode;

View File

@ -38,6 +38,9 @@ namespace dxvk {
/// Enables unnormalized coordinates
VkBool32 usePixelCoord;
/// Enables non seamless cube map filtering
VkBool32 nonSeamless;
};

View File

@ -304,6 +304,7 @@ namespace dxvk {
samplerInfo.compareOp = VK_COMPARE_OP_ALWAYS;
samplerInfo.borderColor = VkClearColorValue();
samplerInfo.usePixelCoord = VK_TRUE;
samplerInfo.nonSeamless = VK_FALSE;
m_samplerPresent = m_device->createSampler(samplerInfo);
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;

View File

@ -53,6 +53,7 @@ namespace dxvk {
info.compareOp = VK_COMPARE_OP_NEVER;
info.borderColor = VkClearColorValue();
info.usePixelCoord = VK_FALSE;
info.nonSeamless = VK_FALSE;
return dev->createSampler(info);
}

View File

@ -311,6 +311,7 @@ namespace dxvk::hud {
info.compareOp = VK_COMPARE_OP_NEVER;
info.borderColor = VkClearColorValue();
info.usePixelCoord = VK_TRUE;
info.nonSeamless = VK_FALSE;
return m_device->createSampler(info);
}