1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

Merge 6ce33187f952625423939c2a99abcda0fab1a8a8 into ad253b8a7e20b7cf16fce7d1c505928a434eac29

This commit is contained in:
WinterSnowfall 2025-03-13 17:14:18 +00:00 committed by GitHub
commit 3f43644c7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 47 additions and 49 deletions

View File

@ -49,14 +49,14 @@ namespace dxvk {
CubinShaderLaunchInfo() = default;
CubinShaderLaunchInfo(CubinShaderLaunchInfo&& other) {
shader = std::move(other.shader);
params = std::move(other.params);
paramSize = std::move(other.paramSize);
nvxLaunchInfo = std::move(other.nvxLaunchInfo);
cuLaunchConfig = other.cuLaunchConfig;
buffers = std::move(other.buffers);
images = std::move(other.images);
CubinShaderLaunchInfo(CubinShaderLaunchInfo&& other)
: shader ( std::move(other.shader) )
, params ( std::move(other.params) )
, paramSize ( std::move(other.paramSize) )
, nvxLaunchInfo ( std::move(other.nvxLaunchInfo) )
, cuLaunchConfig ( other.cuLaunchConfig )
, buffers ( std::move(other.buffers) )
, images ( std::move(other.images) ) {
other.cuLaunchConfig[1] = nullptr;
other.cuLaunchConfig[3] = nullptr;
other.nvxLaunchInfo.pExtras = nullptr;
@ -68,9 +68,9 @@ namespace dxvk {
Com<CubinShaderWrapper> shader;
std::vector<uint8_t> params;
size_t paramSize;
size_t paramSize = 0;
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<DxvkImage>, DxvkAccessFlags>> images;

View File

@ -2012,7 +2012,7 @@ namespace dxvk {
HRESULT D3D11Device::CreateShaderModule(
D3D11CommonShader* pShaderModule,
DxvkShaderKey ShaderKey,
const DxvkShaderKey& ShaderKey,
const void* pShaderBytecode,
size_t BytecodeLength,
ID3D11ClassLinkage* pClassLinkage,

View File

@ -521,7 +521,7 @@ namespace dxvk {
HRESULT CreateShaderModule(
D3D11CommonShader* pShaderModule,
DxvkShaderKey ShaderKey,
const DxvkShaderKey& ShaderKey,
const void* pShaderBytecode,
size_t BytecodeLength,
ID3D11ClassLinkage* pClassLinkage,

View File

@ -9,10 +9,10 @@ namespace dxvk {
UINT64 InitialValue,
D3D11_FENCE_FLAG Flags,
HANDLE hFence)
: D3D11DeviceChild<ID3D11Fence>(pDevice) {
: D3D11DeviceChild<ID3D11Fence> ( pDevice )
, m_flags ( Flags ) {
DxvkFenceCreateInfo fenceInfo;
fenceInfo.initialValue = InitialValue;
m_flags = Flags;
if (Flags & D3D11_FENCE_FLAG_SHARED) {
fenceInfo.sharedType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT;

View File

@ -5184,7 +5184,8 @@ namespace dxvk {
if (modifiers.saturate) {
DxbcRegMask mask;
DxbcRegisterValue vec0, vec1;
DxbcRegisterValue vec0 = { };
DxbcRegisterValue vec1 = { };
if (value.type.ctype == DxbcScalarType::Float32) {
mask = DxbcRegMask::firstN(value.type.ccount);

View File

@ -480,7 +480,7 @@ namespace dxvk {
private:
DxbcShaderInstruction m_instruction;
DxbcShaderInstruction m_instruction = { };
std::array<DxbcRegister, 8> m_dstOperands;
std::array<DxbcRegister, 8> m_srcOperands;

View File

@ -2,8 +2,8 @@
namespace dxvk {
DxvkObjectTracker::DxvkObjectTracker() {
m_head = std::make_unique<List>();
DxvkObjectTracker::DxvkObjectTracker()
: m_head ( std::make_unique<List>() ) {
m_next = m_head.get();
}

View File

@ -1645,8 +1645,8 @@ namespace dxvk {
void uploadImageHw(
const Rc<DxvkImage>& image,
const Rc<DxvkBuffer>& source,
VkDeviceSize subresourceAlignment,
VkDeviceSize sourceOffset);
VkDeviceSize sourceOffset,
VkDeviceSize subresourceAlignment);
void performClear(
const Rc<DxvkImageView>& imageView,

View File

@ -328,7 +328,7 @@ namespace dxvk {
DxvkCsChunkFlags m_flags;
alignas(64)
char m_data[DxvkCsChunkSize];
char m_data[DxvkCsChunkSize] = { };
template<typename T>
void* alloc(size_t extra) {

View File

@ -5,9 +5,8 @@ namespace dxvk {
DxvkDeviceFilter::DxvkDeviceFilter(
DxvkDeviceFilterFlags flags,
const DxvkOptions& options)
: m_flags(flags) {
m_matchDeviceName = env::getEnvVar("DXVK_FILTER_DEVICE_NAME");
: m_flags(flags)
, m_matchDeviceName ( env::getEnvVar("DXVK_FILTER_DEVICE_NAME") ) {
if (m_matchDeviceName.empty())
m_matchDeviceName = options.deviceFilter;

View File

@ -2,24 +2,23 @@
namespace dxvk {
DxvkOptions::DxvkOptions(const Config& config) {
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
enableMemoryDefrag = config.getOption<Tristate>("dxvk.enableMemoryDefrag", Tristate::Auto);
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
enableGraphicsPipelineLibrary = config.getOption<Tristate>("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto);
trackPipelineLifetime = config.getOption<Tristate>("dxvk.trackPipelineLifetime", Tristate::Auto);
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
hud = config.getOption<std::string>("dxvk.hud", "");
tearFree = config.getOption<Tristate>("dxvk.tearFree", Tristate::Auto);
latencySleep = config.getOption<Tristate>("dxvk.latencySleep", Tristate::Auto);
latencyTolerance = config.getOption<int32_t> ("dxvk.latencyTolerance", 1000);
disableNvLowLatency2 = config.getOption<Tristate>("dxvk.disableNvLowLatency2", Tristate::Auto);
hideIntegratedGraphics = config.getOption<bool> ("dxvk.hideIntegratedGraphics", false);
zeroMappedMemory = config.getOption<bool> ("dxvk.zeroMappedMemory", false);
allowFse = config.getOption<bool> ("dxvk.allowFse", false);
deviceFilter = config.getOption<std::string>("dxvk.deviceFilter", "");
tilerMode = config.getOption<Tristate>("dxvk.tilerMode", Tristate::Auto);
}
DxvkOptions::DxvkOptions(const Config& config)
: enableDebugUtils ( config.getOption<bool> ("dxvk.enableDebugUtils", false) )
, enableStateCache ( config.getOption<bool> ("dxvk.enableStateCache", true) )
, enableMemoryDefrag ( config.getOption<Tristate> ("dxvk.enableMemoryDefrag", Tristate::Auto) )
, numCompilerThreads ( config.getOption<int32_t> ("dxvk.numCompilerThreads", 0) )
, enableGraphicsPipelineLibrary ( config.getOption<Tristate> ("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto) )
, trackPipelineLifetime ( config.getOption<Tristate> ("dxvk.trackPipelineLifetime", Tristate::Auto) )
, useRawSsbo ( config.getOption<Tristate> ("dxvk.useRawSsbo", Tristate::Auto) )
, hud ( config.getOption<std::string>("dxvk.hud", "") )
, tearFree ( config.getOption<Tristate> ("dxvk.tearFree", Tristate::Auto) )
, latencySleep ( config.getOption<Tristate> ("dxvk.latencySleep", Tristate::Auto) )
, latencyTolerance ( config.getOption<int32_t> ("dxvk.latencyTolerance", 1000) )
, disableNvLowLatency2 ( config.getOption<Tristate> ("dxvk.disableNvLowLatency2", Tristate::Auto) )
, hideIntegratedGraphics ( config.getOption<bool> ("dxvk.hideIntegratedGraphics", false) )
, zeroMappedMemory ( config.getOption<bool> ("dxvk.zeroMappedMemory", false) )
, allowFse ( config.getOption<bool> ("dxvk.allowFse", false) )
, tilerMode ( config.getOption<Tristate> ("dxvk.tilerMode", Tristate::Auto) )
, deviceFilter ( config.getOption<std::string>("dxvk.deviceFilter", "") ) { }
}

View File

@ -793,7 +793,7 @@ namespace dxvk {
// Only consider variables that have a desired location
if (candidates.find(varId) != candidates.end()) {
VarInfo varInfo;
VarInfo varInfo = { };
varInfo.varId = varId;
varInfo.decorationOffset = 0;
@ -1080,7 +1080,7 @@ namespace dxvk {
default:;
}
iter++;
++iter;
}
// Insert new null variables

View File

@ -197,7 +197,7 @@ namespace dxvk {
size_t m_size = 0;
size_t m_read = 0;
char m_data[MaxSize];
char m_data[MaxSize] = { };
template<typename T>
bool read(T& data) {

View File

@ -45,9 +45,8 @@ namespace dxvk::vk {
std::tie(m_library, m_getInstanceProcAddr) = loadVulkanLibrary();
}
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc) {
m_getInstanceProcAddr = loaderProc;
}
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc)
: m_getInstanceProcAddr ( loaderProc ) { }
LibraryLoader::~LibraryLoader() {
if (m_library)