17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 08:00:04 +01:00

Add NVIDIA DLSS to the Vulkan renderer (gfx.antialiasing dlss/dlaa) and gfx.buffer.percent

This commit is contained in:
2026-10-25 19:35:33 +01:00
parent 71a6628a4a
commit 1841e6d7b0
27 changed files with 1487 additions and 56 deletions

View File

@@ -64,7 +64,8 @@ enum call_type : std::uint32_t
call_end_query,
call_begin_label,
call_end_label,
call_build_acceleration_structures
call_build_acceleration_structures,
call_external
};
struct call_header
@@ -174,6 +175,11 @@ struct build_call
std::size_t geometries;
std::size_t ranges;
};
struct external_call
{
command_stream::external_function function;
void *data;
};
// the copies and the blit: the info with its regions
template <typename Info_> struct copy_call
{
@@ -728,6 +734,14 @@ void command_stream::build_acceleration_structures(std::uint32_t const Count, Vk
work();
}
void command_stream::external(external_function const Function, void *const Data)
{
assert(m_rendering == no_call);
auto const call{add(call_external, sizeof(external_call))};
payload<external_call>(call) = external_call{Function, Data};
work();
}
// the replay
void command_stream::execute(std::size_t const Call, VkCommandBuffer const Buffer, VkRenderingFlags const Flags) const
@@ -1015,6 +1029,12 @@ void command_stream::execute(std::size_t const Call, VkCommandBuffer const Buffe
vkCmdBuildAccelerationStructuresKHR(Buffer, data.count, infos.data(), ranges.data());
break;
}
case call_external:
{
auto const &data{payload<external_call>(Call)};
data.function(Buffer, data.data);
break;
}
default:
break;
}