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

[d3d11] Fix a few static analysis nits

This commit is contained in:
WinterSnowfall 2025-03-08 17:30:12 +02:00
parent 9dbf620165
commit 45a41183dd
No known key found for this signature in database
6 changed files with 17 additions and 16 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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;