Skip to content

Commit 1546d0b

Browse files
committed
add lto
1 parent 334f2fa commit 1546d0b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

deps/rpp

rvk/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ if(NOT TARGET rpp)
5353
message(FATAL_ERROR "rpp could not be found. rpp must be built before rvk.")
5454
endif()
5555

56+
set_property(TARGET rvk PROPERTY INTERPROCEDURAL_OPTIMIZATION
57+
$<$<CONFIG:Debug>:FALSE>
58+
$<$<CONFIG:RelWithDebInfo>:FALSE>
59+
$<$<CONFIG:Release>:TRUE>
60+
$<$<CONFIG:MinSizeRel>:TRUE>)
61+
5662
target_link_libraries(rvk PRIVATE rpp volk ImGui)
5763
target_include_directories(rvk PRIVATE "../deps/" ${RPP_INCLUDE_DIRS})
5864

rvk/memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Device_Memory::Device_Memory(Arc<Physical_Device, Alloc>& physical_device, Arc<D
1414

1515
VkMemoryAllocateFlagsInfo flags = {};
1616
flags.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO;
17-
flags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
17+
if(location == Heap::device) flags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
1818

1919
VkMemoryAllocateInfo info = {};
2020
info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;

0 commit comments

Comments
 (0)