diff --git a/runtime/Game/Game.cpp b/runtime/Game/Game.cpp index 2d4895f58..106b23d64 100644 --- a/runtime/Game/Game.cpp +++ b/runtime/Game/Game.cpp @@ -263,8 +263,8 @@ namespace spartan { // create material shared_ptr material = make_shared(); - material->SetTexture(MaterialTextureType::Color, "project\\models\\wheel\\albedo.jpeg"); - material->SetTexture(MaterialTextureType::Normal, "project\\models\\wheel\\normal.png"); + material->SetTexture(MaterialTextureType::Color, "project\\models\\wheel\\albedo.jpeg"); + material->SetTexture(MaterialTextureType::Normal, "project\\models\\wheel\\normal.png"); material->SetTexture(MaterialTextureType::Roughness, "project\\models\\wheel\\roughness.png"); material->SetTexture(MaterialTextureType::Metalness, "project\\models\\wheel\\metalness.png"); diff --git a/runtime/RHI/Vulkan/Vulkan_CommandList.cpp b/runtime/RHI/Vulkan/Vulkan_CommandList.cpp index 333cf13d5..c60eaf620 100644 --- a/runtime/RHI/Vulkan/Vulkan_CommandList.cpp +++ b/runtime/RHI/Vulkan/Vulkan_CommandList.cpp @@ -1635,11 +1635,6 @@ namespace spartan { void* mapped_data = static_cast(buffer->GetMappedData()) + offset; memcpy(mapped_data, data, size); - - if (buffer->GetType() != RHI_Buffer_Type::Storage) - { - SP_LOG_WARNING("Updated a non-storage buffer with memcpy. Consider using vkCmdUpdateBuffer for synchronized updates."); - } } } diff --git a/runtime/Rendering/Font/Font.cpp b/runtime/Rendering/Font/Font.cpp index 3e0908f7b..fcaf71a5a 100644 --- a/runtime/Rendering/Font/Font.cpp +++ b/runtime/Rendering/Font/Font.cpp @@ -224,45 +224,13 @@ namespace spartan cmd_list->InsertBarrierBufferReadWrite(m_buffer_vertex.get()); cmd_list->InsertBarrierBufferReadWrite(m_buffer_index.get()); - // update vertex buffer in chunks - { - const size_t vertex_size = sizeof(m_vertices[0]); - size_t size = m_vertices.size() * vertex_size; - size_t offset = 0; - - // zero out - memset(m_buffer_vertex->GetMappedData(), 0, m_buffer_vertex->GetObjectSize()); - - // update - while (offset < size) - { - size_t current_chunk_size = min(static_cast(rhi_max_buffer_update_size), size - offset); - - cmd_list->UpdateBuffer(m_buffer_vertex.get(), offset, current_chunk_size, &m_vertices[offset / vertex_size]); - - offset += current_chunk_size; - } - } + // update vertex buffer + memset(m_buffer_vertex->GetMappedData(), 0, m_buffer_vertex->GetObjectSize()); + cmd_list->UpdateBuffer(m_buffer_vertex.get(), 0, m_buffer_vertex->GetObjectSize(), &m_vertices[0]); - // update index buffer in chunks - { - const size_t index_size = sizeof(m_indices[0]); - size_t size = m_indices.size() * index_size; - size_t offset = 0; - - // zero out - memset(m_buffer_index->GetMappedData(), 0, m_buffer_index->GetObjectSize()); - - // update - while (offset < size) - { - size_t current_chunk_size = min(static_cast(rhi_max_buffer_update_size), size - offset); - - cmd_list->UpdateBuffer(m_buffer_index.get(), offset, current_chunk_size, &m_indices[offset / index_size]); - - offset += current_chunk_size; - } - } + // update index buffer + memset(m_buffer_index->GetMappedData(), 0, m_buffer_index->GetObjectSize()); + cmd_list->UpdateBuffer(m_buffer_index.get(), 0, m_buffer_index->GetObjectSize(), &m_indices[0]); m_font_data.clear(); }