Misc: Unreachable code warning fixes

This commit is contained in:
Stenzek
2023-09-05 21:13:14 +10:00
parent be71fb6000
commit adc124c759
13 changed files with 0 additions and 23 deletions

View File

@ -89,7 +89,6 @@ D3D11StreamBuffer::MappingResult D3D11StreamBuffer::Map(ID3D11DeviceContext1* co
Log_ErrorPrintf("Map failed: 0x%08X (alignment %u, minsize %u, size %u, position %u, map type %u)", hr, alignment,
min_size, m_size, m_position, static_cast<u32>(map_type));
Panic("Map failed");
return {};
}
return MappingResult{static_cast<char*>(sr.pData) + m_position, m_position, m_position / alignment,

View File

@ -2087,7 +2087,6 @@ bool D3D12Device::UpdateRootParameters(u32 dirty)
default:
UnreachableCode();
return false;
}
}

View File

@ -71,7 +71,6 @@ bool D3D12StreamBuffer::ReserveMemory(u32 num_bytes, u32 alignment)
Log_ErrorPrintf("Attempting to allocate %u bytes from a %u byte stream buffer", static_cast<u32>(num_bytes),
static_cast<u32>(m_size));
Panic("Stream buffer overflow");
return false;
}
// Is the GPU behind or up to date with our current offset?

View File

@ -160,7 +160,6 @@ static GPUSampler::Config MapSampler(const reshadefx::sampler_info& si)
return GPUSampler::AddressMode::Repeat;
case reshadefx::texture_address_mode::mirror:
Panic("Not implemented");
return GPUSampler::AddressMode::Repeat;
case reshadefx::texture_address_mode::clamp:
return GPUSampler::AddressMode::ClampToEdge;
case reshadefx::texture_address_mode::border:
@ -241,7 +240,6 @@ static GPUPipeline::Primitive MapPrimitive(reshadefx::primitive_topology topolog
return GPUPipeline::Primitive::Lines;
case reshadefx::primitive_topology::line_strip:
Panic("Unhandled line strip");
return GPUPipeline::Primitive::Lines;
case reshadefx::primitive_topology::triangle_list:
return GPUPipeline::Primitive::Triangles;
case reshadefx::primitive_topology::triangle_strip:

View File

@ -3169,7 +3169,6 @@ bool VulkanDevice::UpdateDescriptorSets(u32 dirty)
default:
UnreachableCode();
return false;
}
}

View File

@ -119,7 +119,6 @@ bool VulkanStreamBuffer::ReserveMemory(u32 num_bytes, u32 alignment)
Log_ErrorPrintf("Attempting to allocate %u bytes from a %u byte stream buffer", static_cast<u32>(num_bytes),
static_cast<u32>(m_size));
Panic("Stream buffer overflow");
return false;
}
UpdateGPUPosition();