File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -4265,8 +4265,11 @@ bool FindMemoryPreferences(
42654265 }
42664266 else
42674267 {
4268- // Always CPU memory.
4269- outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
4268+ if(hostAccessAllowTransferInstead)
4269+ outPreferredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
4270+ else
4271+ // Always CPU memory.
4272+ outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
42704273 }
42714274 }
42724275 // CPU sequential write - may be CPU or host-visible GPU memory, uncached and write-combined.
@@ -4281,7 +4284,12 @@ bool FindMemoryPreferences(
42814284 }
42824285 else
42834286 {
4284- outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
4287+ if(hostAccessAllowTransferInstead)
4288+ outPreferredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
4289+ else
4290+ // Always CPU memory.
4291+ outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
4292+
42854293 // Direct GPU access, CPU sequential write (e.g. a dynamic uniform buffer updated every frame)
42864294 if(deviceAccess)
42874295 {
You can’t perform that action at this time.
0 commit comments