mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
Merge 6ce33187f952625423939c2a99abcda0fab1a8a8 into ad253b8a7e20b7cf16fce7d1c505928a434eac29
This commit is contained in:
commit
3f43644c7a
@ -49,14 +49,14 @@ namespace dxvk {
|
|||||||
|
|
||||||
CubinShaderLaunchInfo() = default;
|
CubinShaderLaunchInfo() = default;
|
||||||
|
|
||||||
CubinShaderLaunchInfo(CubinShaderLaunchInfo&& other) {
|
CubinShaderLaunchInfo(CubinShaderLaunchInfo&& other)
|
||||||
shader = std::move(other.shader);
|
: shader ( std::move(other.shader) )
|
||||||
params = std::move(other.params);
|
, params ( std::move(other.params) )
|
||||||
paramSize = std::move(other.paramSize);
|
, paramSize ( std::move(other.paramSize) )
|
||||||
nvxLaunchInfo = std::move(other.nvxLaunchInfo);
|
, nvxLaunchInfo ( std::move(other.nvxLaunchInfo) )
|
||||||
cuLaunchConfig = other.cuLaunchConfig;
|
, cuLaunchConfig ( other.cuLaunchConfig )
|
||||||
buffers = std::move(other.buffers);
|
, buffers ( std::move(other.buffers) )
|
||||||
images = std::move(other.images);
|
, images ( std::move(other.images) ) {
|
||||||
other.cuLaunchConfig[1] = nullptr;
|
other.cuLaunchConfig[1] = nullptr;
|
||||||
other.cuLaunchConfig[3] = nullptr;
|
other.cuLaunchConfig[3] = nullptr;
|
||||||
other.nvxLaunchInfo.pExtras = nullptr;
|
other.nvxLaunchInfo.pExtras = nullptr;
|
||||||
@ -68,9 +68,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
Com<CubinShaderWrapper> shader;
|
Com<CubinShaderWrapper> shader;
|
||||||
std::vector<uint8_t> params;
|
std::vector<uint8_t> params;
|
||||||
size_t paramSize;
|
size_t paramSize = 0;
|
||||||
VkCuLaunchInfoNVX nvxLaunchInfo = { VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX };
|
VkCuLaunchInfoNVX nvxLaunchInfo = { VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX };
|
||||||
std::array<void*, 5> cuLaunchConfig;
|
std::array<void*, 5> cuLaunchConfig = { };
|
||||||
|
|
||||||
std::vector<std::pair<Rc<DxvkBuffer>, DxvkAccessFlags>> buffers;
|
std::vector<std::pair<Rc<DxvkBuffer>, DxvkAccessFlags>> buffers;
|
||||||
std::vector<std::pair<Rc<DxvkImage>, DxvkAccessFlags>> images;
|
std::vector<std::pair<Rc<DxvkImage>, DxvkAccessFlags>> images;
|
||||||
|
@ -2012,7 +2012,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
HRESULT D3D11Device::CreateShaderModule(
|
HRESULT D3D11Device::CreateShaderModule(
|
||||||
D3D11CommonShader* pShaderModule,
|
D3D11CommonShader* pShaderModule,
|
||||||
DxvkShaderKey ShaderKey,
|
const DxvkShaderKey& ShaderKey,
|
||||||
const void* pShaderBytecode,
|
const void* pShaderBytecode,
|
||||||
size_t BytecodeLength,
|
size_t BytecodeLength,
|
||||||
ID3D11ClassLinkage* pClassLinkage,
|
ID3D11ClassLinkage* pClassLinkage,
|
||||||
|
@ -521,7 +521,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
HRESULT CreateShaderModule(
|
HRESULT CreateShaderModule(
|
||||||
D3D11CommonShader* pShaderModule,
|
D3D11CommonShader* pShaderModule,
|
||||||
DxvkShaderKey ShaderKey,
|
const DxvkShaderKey& ShaderKey,
|
||||||
const void* pShaderBytecode,
|
const void* pShaderBytecode,
|
||||||
size_t BytecodeLength,
|
size_t BytecodeLength,
|
||||||
ID3D11ClassLinkage* pClassLinkage,
|
ID3D11ClassLinkage* pClassLinkage,
|
||||||
|
@ -9,10 +9,10 @@ namespace dxvk {
|
|||||||
UINT64 InitialValue,
|
UINT64 InitialValue,
|
||||||
D3D11_FENCE_FLAG Flags,
|
D3D11_FENCE_FLAG Flags,
|
||||||
HANDLE hFence)
|
HANDLE hFence)
|
||||||
: D3D11DeviceChild<ID3D11Fence>(pDevice) {
|
: D3D11DeviceChild<ID3D11Fence> ( pDevice )
|
||||||
|
, m_flags ( Flags ) {
|
||||||
DxvkFenceCreateInfo fenceInfo;
|
DxvkFenceCreateInfo fenceInfo;
|
||||||
fenceInfo.initialValue = InitialValue;
|
fenceInfo.initialValue = InitialValue;
|
||||||
m_flags = Flags;
|
|
||||||
|
|
||||||
if (Flags & D3D11_FENCE_FLAG_SHARED) {
|
if (Flags & D3D11_FENCE_FLAG_SHARED) {
|
||||||
fenceInfo.sharedType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT;
|
fenceInfo.sharedType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT;
|
||||||
|
@ -5184,7 +5184,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (modifiers.saturate) {
|
if (modifiers.saturate) {
|
||||||
DxbcRegMask mask;
|
DxbcRegMask mask;
|
||||||
DxbcRegisterValue vec0, vec1;
|
DxbcRegisterValue vec0 = { };
|
||||||
|
DxbcRegisterValue vec1 = { };
|
||||||
|
|
||||||
if (value.type.ctype == DxbcScalarType::Float32) {
|
if (value.type.ctype == DxbcScalarType::Float32) {
|
||||||
mask = DxbcRegMask::firstN(value.type.ccount);
|
mask = DxbcRegMask::firstN(value.type.ccount);
|
||||||
|
@ -480,7 +480,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
DxbcShaderInstruction m_instruction;
|
DxbcShaderInstruction m_instruction = { };
|
||||||
|
|
||||||
std::array<DxbcRegister, 8> m_dstOperands;
|
std::array<DxbcRegister, 8> m_dstOperands;
|
||||||
std::array<DxbcRegister, 8> m_srcOperands;
|
std::array<DxbcRegister, 8> m_srcOperands;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
DxvkObjectTracker::DxvkObjectTracker() {
|
DxvkObjectTracker::DxvkObjectTracker()
|
||||||
m_head = std::make_unique<List>();
|
: m_head ( std::make_unique<List>() ) {
|
||||||
m_next = m_head.get();
|
m_next = m_head.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1645,8 +1645,8 @@ namespace dxvk {
|
|||||||
void uploadImageHw(
|
void uploadImageHw(
|
||||||
const Rc<DxvkImage>& image,
|
const Rc<DxvkImage>& image,
|
||||||
const Rc<DxvkBuffer>& source,
|
const Rc<DxvkBuffer>& source,
|
||||||
VkDeviceSize subresourceAlignment,
|
VkDeviceSize sourceOffset,
|
||||||
VkDeviceSize sourceOffset);
|
VkDeviceSize subresourceAlignment);
|
||||||
|
|
||||||
void performClear(
|
void performClear(
|
||||||
const Rc<DxvkImageView>& imageView,
|
const Rc<DxvkImageView>& imageView,
|
||||||
|
@ -328,7 +328,7 @@ namespace dxvk {
|
|||||||
DxvkCsChunkFlags m_flags;
|
DxvkCsChunkFlags m_flags;
|
||||||
|
|
||||||
alignas(64)
|
alignas(64)
|
||||||
char m_data[DxvkCsChunkSize];
|
char m_data[DxvkCsChunkSize] = { };
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void* alloc(size_t extra) {
|
void* alloc(size_t extra) {
|
||||||
|
@ -5,9 +5,8 @@ namespace dxvk {
|
|||||||
DxvkDeviceFilter::DxvkDeviceFilter(
|
DxvkDeviceFilter::DxvkDeviceFilter(
|
||||||
DxvkDeviceFilterFlags flags,
|
DxvkDeviceFilterFlags flags,
|
||||||
const DxvkOptions& options)
|
const DxvkOptions& options)
|
||||||
: m_flags(flags) {
|
: m_flags(flags)
|
||||||
m_matchDeviceName = env::getEnvVar("DXVK_FILTER_DEVICE_NAME");
|
, m_matchDeviceName ( env::getEnvVar("DXVK_FILTER_DEVICE_NAME") ) {
|
||||||
|
|
||||||
if (m_matchDeviceName.empty())
|
if (m_matchDeviceName.empty())
|
||||||
m_matchDeviceName = options.deviceFilter;
|
m_matchDeviceName = options.deviceFilter;
|
||||||
|
|
||||||
|
@ -2,24 +2,23 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
DxvkOptions::DxvkOptions(const Config& config) {
|
DxvkOptions::DxvkOptions(const Config& config)
|
||||||
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
|
: enableDebugUtils ( config.getOption<bool> ("dxvk.enableDebugUtils", false) )
|
||||||
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
, enableStateCache ( config.getOption<bool> ("dxvk.enableStateCache", true) )
|
||||||
enableMemoryDefrag = config.getOption<Tristate>("dxvk.enableMemoryDefrag", Tristate::Auto);
|
, enableMemoryDefrag ( config.getOption<Tristate> ("dxvk.enableMemoryDefrag", Tristate::Auto) )
|
||||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
, numCompilerThreads ( config.getOption<int32_t> ("dxvk.numCompilerThreads", 0) )
|
||||||
enableGraphicsPipelineLibrary = config.getOption<Tristate>("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto);
|
, enableGraphicsPipelineLibrary ( config.getOption<Tristate> ("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto) )
|
||||||
trackPipelineLifetime = config.getOption<Tristate>("dxvk.trackPipelineLifetime", Tristate::Auto);
|
, trackPipelineLifetime ( config.getOption<Tristate> ("dxvk.trackPipelineLifetime", Tristate::Auto) )
|
||||||
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
, useRawSsbo ( config.getOption<Tristate> ("dxvk.useRawSsbo", Tristate::Auto) )
|
||||||
hud = config.getOption<std::string>("dxvk.hud", "");
|
, hud ( config.getOption<std::string>("dxvk.hud", "") )
|
||||||
tearFree = config.getOption<Tristate>("dxvk.tearFree", Tristate::Auto);
|
, tearFree ( config.getOption<Tristate> ("dxvk.tearFree", Tristate::Auto) )
|
||||||
latencySleep = config.getOption<Tristate>("dxvk.latencySleep", Tristate::Auto);
|
, latencySleep ( config.getOption<Tristate> ("dxvk.latencySleep", Tristate::Auto) )
|
||||||
latencyTolerance = config.getOption<int32_t> ("dxvk.latencyTolerance", 1000);
|
, latencyTolerance ( config.getOption<int32_t> ("dxvk.latencyTolerance", 1000) )
|
||||||
disableNvLowLatency2 = config.getOption<Tristate>("dxvk.disableNvLowLatency2", Tristate::Auto);
|
, disableNvLowLatency2 ( config.getOption<Tristate> ("dxvk.disableNvLowLatency2", Tristate::Auto) )
|
||||||
hideIntegratedGraphics = config.getOption<bool> ("dxvk.hideIntegratedGraphics", false);
|
, hideIntegratedGraphics ( config.getOption<bool> ("dxvk.hideIntegratedGraphics", false) )
|
||||||
zeroMappedMemory = config.getOption<bool> ("dxvk.zeroMappedMemory", false);
|
, zeroMappedMemory ( config.getOption<bool> ("dxvk.zeroMappedMemory", false) )
|
||||||
allowFse = config.getOption<bool> ("dxvk.allowFse", false);
|
, allowFse ( config.getOption<bool> ("dxvk.allowFse", false) )
|
||||||
deviceFilter = config.getOption<std::string>("dxvk.deviceFilter", "");
|
, tilerMode ( config.getOption<Tristate> ("dxvk.tilerMode", Tristate::Auto) )
|
||||||
tilerMode = config.getOption<Tristate>("dxvk.tilerMode", Tristate::Auto);
|
, deviceFilter ( config.getOption<std::string>("dxvk.deviceFilter", "") ) { }
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -793,7 +793,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Only consider variables that have a desired location
|
// Only consider variables that have a desired location
|
||||||
if (candidates.find(varId) != candidates.end()) {
|
if (candidates.find(varId) != candidates.end()) {
|
||||||
VarInfo varInfo;
|
VarInfo varInfo = { };
|
||||||
varInfo.varId = varId;
|
varInfo.varId = varId;
|
||||||
varInfo.decorationOffset = 0;
|
varInfo.decorationOffset = 0;
|
||||||
|
|
||||||
@ -1080,7 +1080,7 @@ namespace dxvk {
|
|||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
|
|
||||||
iter++;
|
++iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert new null variables
|
// Insert new null variables
|
||||||
|
@ -197,7 +197,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
size_t m_size = 0;
|
size_t m_size = 0;
|
||||||
size_t m_read = 0;
|
size_t m_read = 0;
|
||||||
char m_data[MaxSize];
|
char m_data[MaxSize] = { };
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool read(T& data) {
|
bool read(T& data) {
|
||||||
|
@ -45,9 +45,8 @@ namespace dxvk::vk {
|
|||||||
std::tie(m_library, m_getInstanceProcAddr) = loadVulkanLibrary();
|
std::tie(m_library, m_getInstanceProcAddr) = loadVulkanLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc) {
|
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc)
|
||||||
m_getInstanceProcAddr = loaderProc;
|
: m_getInstanceProcAddr ( loaderProc ) { }
|
||||||
}
|
|
||||||
|
|
||||||
LibraryLoader::~LibraryLoader() {
|
LibraryLoader::~LibraryLoader() {
|
||||||
if (m_library)
|
if (m_library)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user