2018-01-07 20:05:27 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../dxvk/dxvk_device.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
2018-11-23 16:11:46 +01:00
|
|
|
|
|
|
|
struct D3D11Options;
|
2021-01-28 15:54:36 +01:00
|
|
|
|
|
|
|
enum class DxbcFloatControlFlag : uint32_t {
|
|
|
|
DenormFlushToZero32,
|
|
|
|
DenormPreserve64,
|
|
|
|
PreserveNan32,
|
|
|
|
PreserveNan64,
|
|
|
|
};
|
|
|
|
|
|
|
|
using DxbcFloatControlFlags = Flags<DxbcFloatControlFlag>;
|
|
|
|
|
2018-11-09 08:41:02 +01:00
|
|
|
struct DxbcOptions {
|
|
|
|
DxbcOptions();
|
2018-11-23 16:11:46 +01:00
|
|
|
DxbcOptions(const Rc<DxvkDevice>& device, const D3D11Options& options);
|
2018-11-09 08:41:02 +01:00
|
|
|
|
2019-02-19 14:27:21 +01:00
|
|
|
// Clamp oDepth in fragment shaders if the depth
|
|
|
|
// clip device feature is not supported
|
|
|
|
bool useDepthClipWorkaround = false;
|
|
|
|
|
2018-04-22 23:49:41 +02:00
|
|
|
/// Use the ShaderImageReadWithoutFormat capability.
|
2018-11-09 08:41:02 +01:00
|
|
|
bool useStorageImageReadWithoutFormat = false;
|
2018-11-07 11:57:36 +01:00
|
|
|
|
2019-05-15 18:49:02 +02:00
|
|
|
/// Use subgroup operations to reduce the number of
|
|
|
|
/// atomic operations for append/consume buffers.
|
|
|
|
bool useSubgroupOpsForAtomicCounters = false;
|
|
|
|
|
2019-07-02 22:53:58 +02:00
|
|
|
/// Use a SPIR-V extension to implement D3D-style discards
|
|
|
|
bool useDemoteToHelperInvocation = false;
|
|
|
|
|
2018-11-07 11:57:36 +01:00
|
|
|
/// Use subgroup operations to discard fragment
|
|
|
|
/// shader invocations if derivatives remain valid.
|
|
|
|
bool useSubgroupOpsForEarlyDiscard = false;
|
2018-11-11 17:49:11 +01:00
|
|
|
|
2019-03-09 19:59:56 +01:00
|
|
|
/// Use SDiv instead of SHR to converte byte offsets to
|
|
|
|
/// dword offsets. Fixes RE2 and DMC5 on Nvidia drivers.
|
|
|
|
bool useSdivForBufferIndex = false;
|
2018-12-13 12:17:09 +01:00
|
|
|
|
2019-11-30 17:01:44 +01:00
|
|
|
/// Enables NaN fixup for render target outputs
|
|
|
|
bool enableRtOutputNanFixup = false;
|
|
|
|
|
2019-10-28 14:17:46 +01:00
|
|
|
/// Implement dynamically indexed uniform buffers
|
|
|
|
/// with storage buffers for tight bounds checking
|
|
|
|
bool dynamicIndexedConstantBufferAsSsbo = false;
|
|
|
|
|
2018-11-23 15:57:54 +01:00
|
|
|
/// Clear thread-group shared memory to zero
|
|
|
|
bool zeroInitWorkgroupMemory = false;
|
2019-06-05 01:09:39 +02:00
|
|
|
|
2020-01-22 23:58:36 +01:00
|
|
|
/// Declare vertex positions as invariant
|
|
|
|
bool invariantPosition = false;
|
|
|
|
|
2020-02-07 22:47:06 +01:00
|
|
|
/// Insert memory barriers after TGSM stoes
|
|
|
|
bool forceTgsmBarriers = false;
|
|
|
|
|
2021-07-02 04:36:50 +02:00
|
|
|
/// Replace ld_ms with ld
|
|
|
|
bool disableMsaa = false;
|
|
|
|
|
2021-01-28 15:54:36 +01:00
|
|
|
/// Float control flags
|
|
|
|
DxbcFloatControlFlags floatControl;
|
|
|
|
|
2019-06-05 01:09:39 +02:00
|
|
|
/// Minimum storage buffer alignment
|
|
|
|
VkDeviceSize minSsboAlignment = 0;
|
2018-04-22 23:49:41 +02:00
|
|
|
};
|
|
|
|
|
2018-01-07 20:05:27 +01:00
|
|
|
}
|