2019-12-16 04:28:01 +01:00
|
|
|
#include "dxso_options.h"
|
|
|
|
|
2020-02-18 19:28:06 +01:00
|
|
|
#include "../d3d9/d3d9_device.h"
|
|
|
|
|
2019-12-16 04:28:01 +01:00
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
DxsoOptions::DxsoOptions() {}
|
|
|
|
|
2020-02-18 19:28:06 +01:00
|
|
|
DxsoOptions::DxsoOptions(D3D9DeviceEx* pDevice, const D3D9Options& options) {
|
|
|
|
const Rc<DxvkDevice> device = pDevice->GetDXVKDevice();
|
|
|
|
|
2019-12-16 04:28:01 +01:00
|
|
|
const Rc<DxvkAdapter> adapter = device->adapter();
|
|
|
|
|
|
|
|
const DxvkDeviceFeatures& devFeatures = device->features();
|
|
|
|
const DxvkDeviceInfo& devInfo = adapter->devicePropertiesExt();
|
|
|
|
|
|
|
|
// Apply shader-related options
|
|
|
|
strictConstantCopies = options.strictConstantCopies;
|
|
|
|
|
|
|
|
strictPow = options.strictPow;
|
|
|
|
d3d9FloatEmulation = options.d3d9FloatEmulation;
|
|
|
|
|
|
|
|
shaderModel = options.shaderModel;
|
|
|
|
|
|
|
|
invariantPosition = options.invariantPosition;
|
2020-01-01 21:53:20 +01:00
|
|
|
|
|
|
|
forceSamplerTypeSpecConstants = options.forceSamplerTypeSpecConstants;
|
2023-01-08 01:05:50 +01:00
|
|
|
forceSampleRateShading = options.forceSampleRateShading;
|
2020-02-18 19:28:06 +01:00
|
|
|
|
2021-09-08 23:33:23 +02:00
|
|
|
vertexFloatConstantBufferAsSSBO = pDevice->GetVertexConstantLayout().floatSize() > devInfo.core.properties.limits.maxUniformBufferRange;
|
2020-04-09 00:20:57 +02:00
|
|
|
|
|
|
|
longMad = options.longMad;
|
2021-11-14 16:27:39 +01:00
|
|
|
robustness2Supported = devFeatures.extRobustness2.robustBufferAccess2;
|
2019-12-16 04:28:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|