Silence some warnings

This commit is contained in:
Georg Hagen
2024-08-01 11:27:59 +02:00
parent 95627fe53a
commit 0754cdf072
4 changed files with 8 additions and 8 deletions

View File

@@ -114,7 +114,7 @@ namespace OpenVulkano::Vulkan
resourceManager.Resize();
}
CommandHelper* Renderer::GetCommandData(uint32_t poolId)
CommandHelper* Renderer::GetCommandData(size_t poolId)
{
return &commands[poolId][currentImageId];
}
@@ -173,7 +173,7 @@ namespace OpenVulkano::Vulkan
Submit();
}
void Renderer::RecordSecondaryBuffer(Data::ReadOnlyAtomicArrayQueue<Scene::Drawable*>* jobQueue, uint32_t poolId)
void Renderer::RecordSecondaryBuffer(Data::ReadOnlyAtomicArrayQueue<Scene::Drawable*>* jobQueue, size_t poolId)
{
CommandHelper* cmdHelper = GetCommandData(poolId);
cmdHelper->Reset();

View File

@@ -65,7 +65,7 @@ namespace OpenVulkano::Vulkan
Scene::UI::Ui* GetActiveUi() override { return uiRenderer.GetActiveUi(); }
CommandHelper* GetCommandData(uint32_t poolId);
CommandHelper* GetCommandData(size_t poolId);
static void RunThread(Renderer* renderer, Data::ReadOnlyAtomicArrayQueue<Scene::Drawable*>* jobQueue, uint32_t id);
@@ -77,7 +77,7 @@ namespace OpenVulkano::Vulkan
void Render();
void RecordSecondaryBuffer(Data::ReadOnlyAtomicArrayQueue<Scene::Drawable*>* jobQueue, uint32_t poolId);
void RecordSecondaryBuffer(Data::ReadOnlyAtomicArrayQueue<Scene::Drawable*>* jobQueue, size_t poolId);
ResourceManager& GetResourceManager() { return resourceManager; }

View File

@@ -55,7 +55,7 @@ namespace OpenVulkano::Vulkan
* \return The pointer to the mapped buffer.
*/
template <typename T = void>
T* Map(size_t offset = 0, vk::DeviceSize size = VK_WHOLE_SIZE, bool longTermMapping = true)
T* Map(vk::DeviceSize offset = 0, vk::DeviceSize size = VK_WHOLE_SIZE, bool longTermMapping = true)
{
if (!mapped)
{
@@ -106,7 +106,7 @@ namespace OpenVulkano::Vulkan
}
}
void Copy(const void* data, uint32_t size, uint32_t offset)
void Copy(const void* data, vk::DeviceSize size, vk::DeviceSize offset)
{
if(mapped) memcpy(static_cast<char*>(mapped) + offset, data, size);
else

View File

@@ -70,12 +70,12 @@ namespace OpenVulkano::Vulkan
if (shader->vertexInputDescriptions.size() == 1)
{ // Reuse already existing vertex attribute description
static_assert(sizeof(VertexInputParameter) == sizeof(vk::VertexInputAttributeDescription));
attributeDescriptionsSize = shader->vertexInputDescriptions[0].inputParameters.size();
attributeDescriptionsSize = static_cast<uint32_t>(shader->vertexInputDescriptions[0].inputParameters.size());
attributeDescriptionsData = reinterpret_cast<vk::VertexInputAttributeDescription*>(shader->vertexInputDescriptions[0].inputParameters.data());
}
else
{
attributeDescriptionsSize = attributeDescriptions.size();
attributeDescriptionsSize = static_cast<uint32_t>(attributeDescriptions.size());
attributeDescriptionsData = attributeDescriptions.data();
}