mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[dxvk] Static analysis nits and fixes
This commit is contained in:
parent
45a41183dd
commit
6ce33187f9
@ -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();
|
||||
}
|
||||
|
||||
|
@ -1659,8 +1659,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,
|
||||
|
@ -318,7 +318,7 @@ namespace dxvk {
|
||||
DxvkCsChunkFlags m_flags;
|
||||
|
||||
alignas(64)
|
||||
char m_data[DxvkCsChunkSize];
|
||||
char m_data[DxvkCsChunkSize] = { };
|
||||
|
||||
template<typename T>
|
||||
void* alloc(size_t extra) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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", "") ) { }
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user