summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-06-27 21:23:06 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-06 21:00:53 +0200
commitc2b7de66b325b52cebb7e26948db0d5b0eefee25 (patch)
tree40518080032ab9155a351b55fdfb60020b10370b /src
parentNvflinger: correct duplication. (diff)
downloadyuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar.gz
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar.bz2
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar.lz
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar.xz
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.tar.zst
yuzu-c2b7de66b325b52cebb7e26948db0d5b0eefee25.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvdrv/core/nvmap.cpp6
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/core/hle/service/nvdrv/core/nvmap.cpp b/src/core/hle/service/nvdrv/core/nvmap.cpp
index f811b66a0..9b21da6b1 100644
--- a/src/core/hle/service/nvdrv/core/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/core/nvmap.cpp
@@ -41,22 +41,18 @@ NvResult NvMap::Handle::Alloc(Flags pFlags, u32 pAlign, u8 pKind, u64 pAddress)
size = Common::AlignUp(size, YUZU_PAGESIZE);
aligned_size = Common::AlignUp(size, align);
address = pAddress;
-
- // TODO: pin init
-
allocated = true;
return NvResult::Success;
}
NvResult NvMap::Handle::Duplicate(bool internal_session) {
+ std::scoped_lock lock(mutex);
// Unallocated handles cannot be duplicated as duplication requires memory accounting (in HOS)
if (!allocated) [[unlikely]] {
return NvResult::BadValue;
}
- std::scoped_lock lock(mutex);
-
// If we internally use FromId the duplication tracking of handles won't work accurately due to
// us not implementing per-process handle refs.
if (internal_session) {
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
index 908e60191..32e45540d 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
@@ -270,12 +270,12 @@ NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::vector<u8>
}
}
- gpu.PushGPUEntries(bind_id, std::move(entries));
params.fence.id = channel_syncpoint;
u32 increment{(flags.fence_increment.Value() != 0 ? 2 : 0) +
(flags.increment_value.Value() != 0 ? params.fence.value : 0)};
params.fence.value = syncpoint_manager.IncrementSyncpointMaxExt(channel_syncpoint, increment);
+ gpu.PushGPUEntries(bind_id, std::move(entries));
if (flags.fence_increment.Value()) {
if (flags.suppress_wfi.Value()) {
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index 393bbdf37..7cb02631c 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -66,7 +66,7 @@ void QueryPool::Reserve(std::pair<VkQueryPool, u32> query) {
}
QueryCache::QueryCache(VideoCore::RasterizerInterface& rasterizer_, const Device& device_,
- Scheduler& scheduler_)
+ Scheduler& scheduler_)
: QueryCacheBase{rasterizer_}, device{device_}, scheduler{scheduler_},
query_pools{
QueryPool{device_, scheduler_, QueryType::SamplesPassed},