Fix #133155: Vulkan: Initial uniform buffer upload failing
In some cases the initial uniform buffer upload fails. Using the indirect upload (via render graph) does succeed. This PR uses the render graph approach. Pull Request: https://projects.blender.org/blender/blender/pulls/133293
This commit is contained in:
@@ -21,16 +21,13 @@ void VKUniformBuffer::update(const void *data)
|
||||
allocate();
|
||||
}
|
||||
|
||||
if (!data_uploaded_ && buffer_.is_mapped()) {
|
||||
buffer_.update_immediately(data);
|
||||
}
|
||||
else {
|
||||
if (data) {
|
||||
void *data_copy = MEM_mallocN(size_in_bytes_, __func__);
|
||||
memcpy(data_copy, data, size_in_bytes_);
|
||||
VKContext &context = *VKContext::get();
|
||||
buffer_.update_render_graph(context, data_copy);
|
||||
data_uploaded_ = true;
|
||||
}
|
||||
data_uploaded_ = true;
|
||||
}
|
||||
|
||||
void VKUniformBuffer::allocate()
|
||||
|
||||
Reference in New Issue
Block a user