diff --git a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp index f52f9aa19..529972a58 100644 --- a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp @@ -48,7 +48,7 @@ void FillSpecConstantVariables(ResourceId shader, const SPIRVPatchData &patchDat for(size_t v = 0; v < invars.size() && v < outvars.size(); v++) { int32_t idx = patchData.specIDs.indexOf(specInfo[i].specID); - if(idx == ~0U) + if(idx == -1) continue; if(idx * sizeof(uint64_t) == invars[v].byteOffset) diff --git a/renderdoc/driver/vulkan/vk_pixelhistory.cpp b/renderdoc/driver/vulkan/vk_pixelhistory.cpp index 65631cc9f..9235af977 100644 --- a/renderdoc/driver/vulkan/vk_pixelhistory.cpp +++ b/renderdoc/driver/vulkan/vk_pixelhistory.cpp @@ -979,7 +979,7 @@ protected: } // Either modify the existing depth stencil attachment, or add one. - if(sub.depthstencilAttachment != -1 && sub.depthstencilAttachment < atts.size()) + if(sub.depthstencilAttachment != -1 && (size_t)sub.depthstencilAttachment < atts.size()) atts[sub.depthstencilAttachment] = m_CallbackInfo.dsImageView; else atts.push_back(m_CallbackInfo.dsImageView); diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index fb2977a09..43a7483d5 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -1146,7 +1146,7 @@ void VulkanReplay::SavePipelineState(uint32_t eventId) { int32_t idx = p.shaders[i].patchData->specIDs.indexOf(s.specID); - if(idx == ~0U) + if(idx == -1) { RDCERR("Couldn't find offset for spec ID %u", s.specID); continue; @@ -1264,7 +1264,7 @@ void VulkanReplay::SavePipelineState(uint32_t eventId) { int32_t idx = p.shaders[i].patchData->specIDs.indexOf(s.specID); - if(idx == ~0U) + if(idx == -1) { RDCERR("Couldn't find offset for spec ID %u", s.specID); continue;