From e228ff20406fd79d0f0f271c69d6119266311bae Mon Sep 17 00:00:00 2001 From: ziga-lunarg Date: Fri, 20 Sep 2024 23:44:23 +0200 Subject: [PATCH] tests: Fix windows warnings --- tests/framework/ray_tracing_objects.cpp | 2 +- tests/framework/render_pass_helper.cpp | 4 ++-- tests/unit/parent.cpp | 8 ++++---- tests/unit/ray_tracing.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/framework/ray_tracing_objects.cpp b/tests/framework/ray_tracing_objects.cpp index 654bfdb9672..7f09e84b66e 100644 --- a/tests/framework/ray_tracing_objects.cpp +++ b/tests/framework/ray_tracing_objects.cpp @@ -553,7 +553,7 @@ void BuildGeometryInfoKHR::SetupBuild(bool is_on_device_build, bool use_ppGeomet host_scratch_ = nullptr; if (scratch_size > 0) { assert(scratch_size < vvl::kU32Max); - host_scratch_ = std::make_shared>(static_cast(scratch_size), 0); + host_scratch_ = std::make_shared>(static_cast(scratch_size), uint8_t(0u)); } vk_info_.scratchData.hostAddress = host_scratch_->data(); } diff --git a/tests/framework/render_pass_helper.cpp b/tests/framework/render_pass_helper.cpp index ddf9e1fa10b..c11ac3ceb19 100644 --- a/tests/framework/render_pass_helper.cpp +++ b/tests/framework/render_pass_helper.cpp @@ -141,14 +141,14 @@ VkRenderPassCreateInfo2 RenderPass2SingleSubpass::GetCreateInfo() { void RenderPass2SingleSubpass::AddAttachmentDescription(VkFormat format, VkImageLayout initialLayout, VkImageLayout finalLayout, VkAttachmentLoadOp loadOp, VkAttachmentStoreOp storeOp) { attachment_descriptions_.push_back(vku::InitStruct( - nullptr, 0, format, VK_SAMPLE_COUNT_1_BIT, loadOp, storeOp, VK_ATTACHMENT_LOAD_OP_DONT_CARE, + nullptr, 0u, format, VK_SAMPLE_COUNT_1_BIT, loadOp, storeOp, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, initialLayout, finalLayout)); } void RenderPass2SingleSubpass::AddAttachmentDescription(VkFormat format, VkSampleCountFlagBits samples, VkImageLayout initialLayout, VkImageLayout finalLayout) { attachment_descriptions_.push_back(vku::InitStruct( - nullptr, 0, format, samples, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, + nullptr, 0u, format, samples, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, initialLayout, finalLayout)); } diff --git a/tests/unit/parent.cpp b/tests/unit/parent.cpp index 2a8e17e9d54..3df633f1f0a 100644 --- a/tests/unit/parent.cpp +++ b/tests/unit/parent.cpp @@ -524,7 +524,7 @@ TEST_F(NegativeParent, PhysicalDevice_Display) { { uint32_t gpu_count = 0; vk::EnumeratePhysicalDevices(instance2, &gpu_count, nullptr); - ASSERT_GT(gpu_count, 0); + ASSERT_GT(gpu_count, 0u); std::vector physical_devices(gpu_count); vk::EnumeratePhysicalDevices(instance2, &gpu_count, physical_devices.data()); instance2_gpu = physical_devices[0]; @@ -560,7 +560,7 @@ TEST_F(NegativeParent, PhysicalDevice_RegisterDisplayEvent) { { uint32_t gpu_count = 0; vk::EnumeratePhysicalDevices(instance2, &gpu_count, nullptr); - ASSERT_GT(gpu_count, 0); + ASSERT_GT(gpu_count, 0u); std::vector physical_devices(gpu_count); vk::EnumeratePhysicalDevices(instance2, &gpu_count, physical_devices.data()); instance2_gpu = physical_devices[0]; @@ -599,7 +599,7 @@ TEST_F(NegativeParent, PhysicalDevice_DisplayMode) { { uint32_t gpu_count = 0; vk::EnumeratePhysicalDevices(instance2, &gpu_count, nullptr); - ASSERT_GT(gpu_count, 0); + ASSERT_GT(gpu_count, 0u); std::vector physical_devices(gpu_count); vk::EnumeratePhysicalDevices(instance2, &gpu_count, physical_devices.data()); instance2_gpu = physical_devices[0]; @@ -779,7 +779,7 @@ TEST_F(NegativeParent, GetDescriptorSetLayoutSupport) { vkt::Sampler sampler(*m_device, SafeSaneSamplerCreateInfo()); const VkDescriptorSetLayoutBinding binding{0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, &sampler.handle()}; const VkDescriptorSetLayoutCreateFlags flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT; - const auto dslci = vku::InitStruct(nullptr, flags, 1, &binding); + const auto dslci = vku::InitStruct(nullptr, flags, 1u, &binding); VkDescriptorSetLayoutSupport support = vku::InitStructHelper(); m_errorMonitor->SetDesiredError("UNASSIGNED-vkGetDescriptorSetLayoutSupport-pImmutableSamplers-device"); vk::GetDescriptorSetLayoutSupport(m_second_device->handle(), &dslci, &support); diff --git a/tests/unit/ray_tracing.cpp b/tests/unit/ray_tracing.cpp index b377c2427a8..1c6c0ed0333 100644 --- a/tests/unit/ray_tracing.cpp +++ b/tests/unit/ray_tracing.cpp @@ -3683,7 +3683,7 @@ TEST_F(NegativeRayTracing, HostBuildOverlappingScratchBuffers) { constexpr size_t blas_count = 3; std::vector blas_vec; - auto scratch_data = std::make_shared>(1 << 15, 0); + auto scratch_data = std::make_shared>(1u << 15u, uint8_t(0)); for (size_t i = 0; i < blas_count; ++i) { auto blas = vkt::as::blueprint::BuildGeometryInfoSimpleOnHostBottomLevel(*m_device); blas.SetHostScratchBuffer(scratch_data);