2018-01-07 20:05:27 +01:00
|
|
|
#include "dxbc_options.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
DxbcOptions::DxbcOptions(const Rc<DxvkDevice>& device) {
|
|
|
|
const VkPhysicalDeviceProperties deviceProps
|
|
|
|
= device->adapter()->deviceProperties();
|
|
|
|
|
|
|
|
const DxvkGpuVendor vendor
|
|
|
|
= static_cast<DxvkGpuVendor>(deviceProps.vendorID);
|
|
|
|
|
|
|
|
if (vendor == DxvkGpuVendor::Nvidia) {
|
2018-03-01 10:11:15 +01:00
|
|
|
// The driver expects the coordinate
|
|
|
|
// vector to have an extra component
|
|
|
|
this->addExtraDrefCoordComponent = true;
|
|
|
|
|
2018-01-07 20:05:27 +01:00
|
|
|
// From vkd3d: NMin/NMax/NClamp crash the driver.
|
|
|
|
this->useSimpleMinMaxClamp = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Inform the user about which workarounds are enabled
|
2018-03-01 10:11:15 +01:00
|
|
|
if (this->addExtraDrefCoordComponent)
|
|
|
|
Logger::warn("DxbcOptions: Growing coordinate vector for Dref operations");
|
|
|
|
|
2018-01-07 20:05:27 +01:00
|
|
|
if (this->useSimpleMinMaxClamp)
|
|
|
|
Logger::warn("DxbcOptions: Using FMin/FMax/FClamp instead of NMin/NMax/NClamp");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|