mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-24 08:55:10 +00:00
Update vulkan headers to 1.4+ (#39)
This commit is contained in:
parent
544a0e2f40
commit
3ff78af28e
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -1,6 +1,7 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 80dada6a7b455cf18c39788d70aa7711323ea977
|
||||
Subproject commit 1055cb5e780c12fb2aab98949cc5a0d45f6ed0a1
|
@ -209,7 +209,7 @@ namespace skyline::gpu {
|
||||
static vk::raii::DebugReportCallbackEXT CreateDebugReportCallback(GPU *gpu, const vk::raii::Instance &instance) {
|
||||
return vk::raii::DebugReportCallbackEXT(instance, vk::DebugReportCallbackCreateInfoEXT{
|
||||
.flags = vk::DebugReportFlagBitsEXT::eError | vk::DebugReportFlagBitsEXT::eWarning | vk::DebugReportFlagBitsEXT::ePerformanceWarning | vk::DebugReportFlagBitsEXT::eInformation | vk::DebugReportFlagBitsEXT::eDebug,
|
||||
.pfnCallback = reinterpret_cast<PFN_vkDebugReportCallbackEXT>(&DebugCallback),
|
||||
.pfnCallback = reinterpret_cast<vk::PFN_DebugReportCallbackEXT>(&DebugCallback),
|
||||
.pUserData = gpu,
|
||||
});
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ namespace skyline::gpu {
|
||||
|
||||
auto result{(*gpu.vkDevice).allocateCommandBuffers(&commandBufferAllocateInfo, &commandBuffer, *gpu.vkDevice.getDispatcher())};
|
||||
if (result != vk::Result::eSuccess)
|
||||
vk::throwResultException(result, __builtin_FUNCTION());
|
||||
vk::detail::throwResultException(result, __builtin_FUNCTION());
|
||||
return {pool->buffers.emplace_back(gpu.vkDevice, commandBuffer, pool->vkCommandPool)};
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,11 @@ namespace skyline::gpu {
|
||||
if (pool->freeSetCount > 0)
|
||||
pool->freeSetCount--;
|
||||
|
||||
return vk::createResultValue(result, descriptorSet, __builtin_FUNCTION(), {
|
||||
vk::Result::eSuccess,
|
||||
vk::Result::eErrorOutOfPoolMemory,
|
||||
vk::Result::eErrorFragmentedPool
|
||||
});
|
||||
if (result == vk::Result::eSuccess) {
|
||||
return vk::ResultValue<vk::DescriptorSet>(vk::Result::eSuccess, descriptorSet);
|
||||
} else {
|
||||
return vk::ResultValue<vk::DescriptorSet>(result, vk::DescriptorSet{});
|
||||
}
|
||||
}
|
||||
|
||||
DescriptorAllocator::ActiveDescriptorSet::ActiveDescriptorSet(std::shared_ptr<DescriptorPool> pPool, DescriptorSetSlot *slot) : pool{std::move(pPool)}, slot{slot} {}
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <vulkan/vulkan_raii.hpp>
|
||||
#include <common/spin_lock.h>
|
||||
#include "vk_descriptor_set_layout_hash.hpp"
|
||||
#include <common.h>
|
||||
|
||||
namespace skyline::gpu {
|
||||
|
@ -10,7 +10,7 @@ namespace skyline::gpu::memory {
|
||||
*/
|
||||
void ThrowOnFail(VkResult result, const char *function = __builtin_FUNCTION()) {
|
||||
if (result != VK_SUCCESS)
|
||||
vk::throwResultException(vk::Result(result), function);
|
||||
vk::detail::throwResultException(vk::Result(result), function);
|
||||
}
|
||||
|
||||
Buffer::~Buffer() {
|
||||
|
@ -24,7 +24,7 @@ namespace skyline::gpu::memory {
|
||||
|
||||
Buffer(const Buffer &) = delete;
|
||||
|
||||
constexpr Buffer(Buffer &&other)
|
||||
Buffer(Buffer &&other)
|
||||
: vmaAllocator(std::exchange(other.vmaAllocator, nullptr)),
|
||||
vmaAllocation(std::exchange(other.vmaAllocation, nullptr)),
|
||||
vkBuffer(std::exchange(other.vkBuffer, {})),
|
||||
@ -94,7 +94,7 @@ namespace skyline::gpu::memory {
|
||||
|
||||
Image(const Image &) = delete;
|
||||
|
||||
constexpr Image(Image &&other)
|
||||
Image(Image &&other)
|
||||
: pointer(std::exchange(other.pointer, nullptr)),
|
||||
vmaAllocator(std::exchange(other.vmaAllocator, nullptr)),
|
||||
vmaAllocation(std::exchange(other.vmaAllocation, nullptr)),
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "common/trap_manager.h"
|
||||
#include <gpu/tag_allocator.h>
|
||||
#include <gpu/memory_manager.h>
|
||||
#include <vulkan/vulkan_format_traits.hpp>
|
||||
#include <gpu/usage_tracker.h>
|
||||
|
||||
namespace skyline::gpu {
|
||||
|
@ -0,0 +1,18 @@
|
||||
#ifndef VK_DESCRIPTOR_SET_LAYOUT_HASH_HPP
|
||||
#define VK_DESCRIPTOR_SET_LAYOUT_HASH_HPP
|
||||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
// Specialization of std::hash for vk::DescriptorSetLayout
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<vk::DescriptorSetLayout> {
|
||||
std::size_t operator()(const vk::DescriptorSetLayout &layout) const noexcept {
|
||||
// Use the raw Vulkan handle for hashing
|
||||
return std::hash<VkDescriptorSetLayout>()(static_cast<VkDescriptorSetLayout>(layout));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // VK_DESCRIPTOR_SET_LAYOUT_HASH_HPP
|
Loading…
x
Reference in New Issue
Block a user