mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-10 12:41:10 +01:00
[common] rework BitField and BitUtil, use concepts whenever possible (#4076)
test no regressions especially on Liiinux Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4076 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
c2e74a9380
commit
41762940d6
31 changed files with 529 additions and 757 deletions
|
|
@ -1357,10 +1357,9 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void PushConstants(VkPipelineLayout layout, VkShaderStageFlags flags,
|
||||
const T& data) const noexcept {
|
||||
static_assert(std::is_trivially_copyable_v<T>, "<data> is not trivially copyable");
|
||||
dld->vkCmdPushConstants(handle, layout, flags, 0, static_cast<u32>(sizeof(T)), &data);
|
||||
requires std::is_trivially_copyable_v<T>
|
||||
void PushConstants(VkPipelineLayout layout, VkShaderStageFlags flags, const T& data) const noexcept {
|
||||
dld->vkCmdPushConstants(handle, layout, flags, 0, u32(sizeof(T)), std::addressof(data));
|
||||
}
|
||||
|
||||
void SetViewport(u32 first, Span<VkViewport> viewports) const noexcept {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue