Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"

This reverts commit 6212dccc2b, reversing
changes made to 80e31b642a.
This commit is contained in:
Vindicus999
2025-08-24 09:56:21 -04:00
parent 6212dccc2b
commit ea45e9f91b
135 changed files with 2784 additions and 12225 deletions
-6
View File
@@ -131,12 +131,6 @@ public:
std::tie(resource, allocation) = traits::create(device, create_info, alloc_info);
vmaSetAllocationName(vk_allocator::instance(), allocation, name.c_str());
if (vk_allocator::instance().has_debug_utils)
device.setDebugUtilsObjectNameEXT(vk::DebugUtilsObjectNameInfoEXT{
.objectType = T::objectType,
.objectHandle = uint64_t(CType(*resource)),
.pObjectName = name.c_str(),
});
}
basic_allocation(const basic_allocation &) = delete;
-84
View File
@@ -1,84 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <array>
#include <cstdint>
#include <tuple>
#include <vulkan/vulkan.hpp>
template <typename... Args>
class specialization_constants
{
std::tuple<Args...> values;
std::array<vk::SpecializationMapEntry, sizeof...(Args)> entries;
vk::SpecializationInfo info_;
specialization_constants(specialization_constants &&) = delete;
specialization_constants(const specialization_constants &) = delete;
specialization_constants & operator=(const specialization_constants &) = delete;
specialization_constants & operator=(specialization_constants &&) = delete;
template <uint32_t i = sizeof...(Args) - 1>
void fill_entries()
{
entries[i] = vk::SpecializationMapEntry{
.constantID = i,
.offset = uint32_t(uintptr_t(std::addressof(std::get<i>(values))) - uintptr_t(std::addressof(values))),
.size = sizeof(std::get<i>(values)),
};
if constexpr (i > 0)
fill_entries<i - 1>();
}
public:
specialization_constants(Args &&... args) :
values(std::forward<Args>(args)...),
info_{
.mapEntryCount = uint32_t(entries.size()),
.pMapEntries = entries.data(),
.dataSize = sizeof(values),
.pData = &values,
}
{
fill_entries();
}
operator vk::SpecializationInfo *()
{
return &info_;
}
vk::SpecializationInfo * info()
{
return &info_;
}
template <uint32_t i>
auto & data()
{
return std::get<i>(values);
}
};
template <typename... Args>
specialization_constants<Args...> make_specialization_constants(Args &&... args)
{
return specialization_constants<Args...>(std::forward<Args>(args)...);
}
+1 -2
View File
@@ -20,8 +20,7 @@
#include "vk_allocator.h"
#include "vk/check.h"
vk_allocator::vk_allocator(const VmaAllocatorCreateInfo & info, bool has_debug_utils) :
has_debug_utils(has_debug_utils)
vk_allocator::vk_allocator(const VmaAllocatorCreateInfo & info)
{
CHECK_VK(vmaCreateAllocator(&info, &handle));
}
+1 -2
View File
@@ -27,8 +27,7 @@ class vk_allocator : public singleton<vk_allocator>
VmaAllocator handle = nullptr;
public:
const bool has_debug_utils;
vk_allocator(const VmaAllocatorCreateInfo &, bool has_debug_utils);
vk_allocator(const VmaAllocatorCreateInfo &);
~vk_allocator();
operator VmaAllocator()