Merge #212
212: Fix black screen for examples on macOS platform r=MaikKlein a=unknownue The memory types may vary between different versions of MoltenVK. This solution just changes all the memory request flags to both `HOST_VISIBLE` and `HOST_COHERENT` to fix the delay of memory data transfer. Co-authored-by: unknownue <usami-ssc@protonmail.com>
This commit is contained in:
commit
19771a8200
|
@ -112,7 +112,7 @@ fn main() {
|
||||||
let index_buffer_memory_index = find_memorytype_index(
|
let index_buffer_memory_index = find_memorytype_index(
|
||||||
&index_buffer_memory_req,
|
&index_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the index buffer.");
|
.expect("Unable to find suitable memorytype for the index buffer.");
|
||||||
let index_allocate_info = vk::MemoryAllocateInfo {
|
let index_allocate_info = vk::MemoryAllocateInfo {
|
||||||
|
@ -178,7 +178,7 @@ fn main() {
|
||||||
let vertex_input_buffer_memory_index = find_memorytype_index(
|
let vertex_input_buffer_memory_index = find_memorytype_index(
|
||||||
&vertex_input_buffer_memory_req,
|
&vertex_input_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ fn main() {
|
||||||
let uniform_color_buffer_memory_index = find_memorytype_index(
|
let uniform_color_buffer_memory_index = find_memorytype_index(
|
||||||
&uniform_color_buffer_memory_req,
|
&uniform_color_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ fn main() {
|
||||||
let image_buffer_memory_index = find_memorytype_index(
|
let image_buffer_memory_index = find_memorytype_index(
|
||||||
&image_buffer_memory_req,
|
&image_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ fn main() {
|
||||||
let index_buffer_memory_index = find_memorytype_index(
|
let index_buffer_memory_index = find_memorytype_index(
|
||||||
&index_buffer_memory_req,
|
&index_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the index buffer.");
|
.expect("Unable to find suitable memorytype for the index buffer.");
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ fn main() {
|
||||||
let vertex_input_buffer_memory_index = find_memorytype_index(
|
let vertex_input_buffer_memory_index = find_memorytype_index(
|
||||||
&vertex_input_buffer_memory_req,
|
&vertex_input_buffer_memory_req,
|
||||||
&base.device_memory_properties,
|
&base.device_memory_properties,
|
||||||
vk::MemoryPropertyFlags::HOST_VISIBLE,
|
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||||
)
|
)
|
||||||
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
.expect("Unable to find suitable memorytype for the vertex buffer.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue