summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/command_classes/codecs/codec.cpp2
-rw-r--r--src/video_core/command_classes/vic.cpp2
-rw-r--r--src/video_core/engines/maxwell_3d.h12
-rw-r--r--src/video_core/engines/maxwell_dma.cpp4
-rw-r--r--src/video_core/gpu_thread.cpp2
-rw-r--r--src/video_core/macro/macro.cpp2
-rw-r--r--src/video_core/macro/macro_interpreter.cpp1
-rw-r--r--src/video_core/memory_manager.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_pipeline.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp38
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h12
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
-rw-r--r--src/video_core/renderer_opengl/util_shaders.cpp2
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp12
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pass.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp24
-rw-r--r--src/video_core/shader_environment.cpp2
-rw-r--r--src/video_core/surface.cpp6
-rw-r--r--src/video_core/texture_cache/image_info.cpp2
-rw-r--r--src/video_core/texture_cache/image_view_info.cpp2
-rw-r--r--src/video_core/texture_cache/samples_helper.h4
-rw-r--r--src/video_core/texture_cache/texture_cache.h20
-rw-r--r--src/video_core/textures/decoders.cpp8
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp14
-rw-r--r--src/video_core/vulkan_common/vulkan_memory_allocator.cpp6
29 files changed, 104 insertions, 103 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp
index 83b2e0fc4..a5eb97b7f 100644
--- a/src/video_core/command_classes/codecs/codec.cpp
+++ b/src/video_core/command_classes/codecs/codec.cpp
@@ -224,7 +224,7 @@ void Codec::Decode() {
224 vp9_hidden_frame = vp9_decoder->WasFrameHidden(); 224 vp9_hidden_frame = vp9_decoder->WasFrameHidden();
225 return vp9_decoder->GetFrameBytes(); 225 return vp9_decoder->GetFrameBytes();
226 default: 226 default:
227 UNREACHABLE(); 227 ASSERT(false);
228 return std::vector<u8>{}; 228 return std::vector<u8>{};
229 } 229 }
230 }(); 230 }();
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp
index bef321b6e..7c17df353 100644
--- a/src/video_core/command_classes/vic.cpp
+++ b/src/video_core/command_classes/vic.cpp
@@ -228,7 +228,7 @@ void Vic::WriteYUVFrame(const AVFrame* frame, const VicConfig& config) {
228 break; 228 break;
229 } 229 }
230 default: 230 default:
231 UNREACHABLE(); 231 ASSERT(false);
232 break; 232 break;
233 } 233 }
234 gpu.MemoryManager().WriteBlock(output_surface_chroma_address, chroma_buffer.data(), 234 gpu.MemoryManager().WriteBlock(output_surface_chroma_address, chroma_buffer.data(),
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 434ba0877..5f9eb208c 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -202,7 +202,7 @@ public:
202 case Size::Size_11_11_10: 202 case Size::Size_11_11_10:
203 return 3; 203 return 3;
204 default: 204 default:
205 UNREACHABLE(); 205 ASSERT(false);
206 return 1; 206 return 1;
207 } 207 }
208 } 208 }
@@ -238,7 +238,7 @@ public:
238 case Size::Size_11_11_10: 238 case Size::Size_11_11_10:
239 return 4; 239 return 4;
240 default: 240 default:
241 UNREACHABLE(); 241 ASSERT(false);
242 return 1; 242 return 1;
243 } 243 }
244 } 244 }
@@ -274,7 +274,7 @@ public:
274 case Size::Size_11_11_10: 274 case Size::Size_11_11_10:
275 return "11_11_10"; 275 return "11_11_10";
276 default: 276 default:
277 UNREACHABLE(); 277 ASSERT(false);
278 return {}; 278 return {};
279 } 279 }
280 } 280 }
@@ -296,7 +296,7 @@ public:
296 case Type::Float: 296 case Type::Float:
297 return "FLOAT"; 297 return "FLOAT";
298 } 298 }
299 UNREACHABLE(); 299 ASSERT(false);
300 return {}; 300 return {};
301 } 301 }
302 302
@@ -336,7 +336,7 @@ public:
336 case 3: 336 case 3:
337 return {x3, y3}; 337 return {x3, y3};
338 default: 338 default:
339 UNREACHABLE(); 339 ASSERT(false);
340 return {0, 0}; 340 return {0, 0};
341 } 341 }
342 } 342 }
@@ -1193,7 +1193,7 @@ public:
1193 case IndexFormat::UnsignedInt: 1193 case IndexFormat::UnsignedInt:
1194 return 4; 1194 return 4;
1195 } 1195 }
1196 UNREACHABLE(); 1196 ASSERT(false);
1197 return 1; 1197 return 1;
1198 } 1198 }
1199 1199
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index a7302f7c1..0efe58282 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -62,7 +62,7 @@ void MaxwellDMA::Launch() {
62 62
63 if (!is_src_pitch && !is_dst_pitch) { 63 if (!is_src_pitch && !is_dst_pitch) {
64 // If both the source and the destination are in block layout, assert. 64 // If both the source and the destination are in block layout, assert.
65 UNREACHABLE_MSG("Tiled->Tiled DMA transfers are not yet implemented"); 65 UNIMPLEMENTED_MSG("Tiled->Tiled DMA transfers are not yet implemented");
66 return; 66 return;
67 } 67 }
68 68
@@ -260,7 +260,7 @@ void MaxwellDMA::ReleaseSemaphore() {
260 memory_manager.Write<u64>(address + 8, system.GPU().GetTicks()); 260 memory_manager.Write<u64>(address + 8, system.GPU().GetTicks());
261 break; 261 break;
262 default: 262 default:
263 UNREACHABLE_MSG("Unknown semaphore type: {}", static_cast<u32>(type.Value())); 263 ASSERT_MSG(false, "Unknown semaphore type: {}", static_cast<u32>(type.Value()));
264 } 264 }
265} 265}
266 266
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 8479dc6d2..b0ce9f000 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -50,7 +50,7 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
50 } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) { 50 } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) {
51 rasterizer->OnCPUWrite(invalidate->addr, invalidate->size); 51 rasterizer->OnCPUWrite(invalidate->addr, invalidate->size);
52 } else { 52 } else {
53 UNREACHABLE(); 53 ASSERT(false);
54 } 54 }
55 state.signaled_fence.store(next.fence); 55 state.signaled_fence.store(next.fence);
56 if (next.block) { 56 if (next.block) {
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp
index e7279efcd..43f8b5904 100644
--- a/src/video_core/macro/macro.cpp
+++ b/src/video_core/macro/macro.cpp
@@ -71,7 +71,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
71 } 71 }
72 } 72 }
73 if (!mid_method.has_value()) { 73 if (!mid_method.has_value()) {
74 UNREACHABLE_MSG("Macro 0x{0:x} was not uploaded", method); 74 ASSERT_MSG(false, "Macro 0x{0:x} was not uploaded", method);
75 return; 75 return;
76 } 76 }
77 } 77 }
diff --git a/src/video_core/macro/macro_interpreter.cpp b/src/video_core/macro/macro_interpreter.cpp
index 87d2e8721..f670b1bca 100644
--- a/src/video_core/macro/macro_interpreter.cpp
+++ b/src/video_core/macro/macro_interpreter.cpp
@@ -308,7 +308,6 @@ bool MacroInterpreterImpl::EvaluateBranchCondition(Macro::BranchCondition cond,
308 return value != 0; 308 return value != 0;
309 } 309 }
310 UNREACHABLE(); 310 UNREACHABLE();
311 return true;
312} 311}
313 312
314Macro::Opcode MacroInterpreterImpl::GetOpcode() const { 313Macro::Opcode MacroInterpreterImpl::GetOpcode() const {
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index c8d99fdb5..d373be0ba 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -67,7 +67,7 @@ void MemoryManager::Unmap(GPUVAddr gpu_addr, std::size_t size) {
67 ASSERT(it->first == gpu_addr); 67 ASSERT(it->first == gpu_addr);
68 map_ranges.erase(it); 68 map_ranges.erase(it);
69 } else { 69 } else {
70 UNREACHABLE_MSG("Unmapping non-existent GPU address=0x{:x}", gpu_addr); 70 ASSERT_MSG(false, "Unmapping non-existent GPU address=0x{:x}", gpu_addr);
71 } 71 }
72 const auto submapped_ranges = GetSubmappedRange(gpu_addr, size); 72 const auto submapped_ranges = GetSubmappedRange(gpu_addr, size);
73 73
@@ -206,7 +206,7 @@ T MemoryManager::Read(GPUVAddr addr) const {
206 return value; 206 return value;
207 } 207 }
208 208
209 UNREACHABLE(); 209 ASSERT(false);
210 210
211 return {}; 211 return {};
212} 212}
@@ -219,7 +219,7 @@ void MemoryManager::Write(GPUVAddr addr, T data) {
219 return; 219 return;
220 } 220 }
221 221
222 UNREACHABLE(); 222 ASSERT(false);
223} 223}
224 224
225template u8 MemoryManager::Read<u8>(GPUVAddr addr) const; 225template u8 MemoryManager::Read<u8>(GPUVAddr addr) const;
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
index 35f42f2f8..67eae369d 100644
--- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
@@ -48,7 +48,7 @@ GLenum Stage(size_t stage_index) {
48 case 4: 48 case 4:
49 return GL_FRAGMENT_SHADER; 49 return GL_FRAGMENT_SHADER;
50 } 50 }
51 UNREACHABLE_MSG("{}", stage_index); 51 ASSERT_MSG(false, "{}", stage_index);
52 return GL_NONE; 52 return GL_NONE;
53} 53}
54 54
@@ -65,7 +65,7 @@ GLenum AssemblyStage(size_t stage_index) {
65 case 4: 65 case 4:
66 return GL_FRAGMENT_PROGRAM_NV; 66 return GL_FRAGMENT_PROGRAM_NV;
67 } 67 }
68 UNREACHABLE_MSG("{}", stage_index); 68 ASSERT_MSG(false, "{}", stage_index);
69 return GL_NONE; 69 return GL_NONE;
70} 70}
71 71
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index cd48fef26..07d4b7cf0 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -85,7 +85,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(const GraphicsPipelineKey& key,
85 case Maxwell::TessellationPrimitive::Quads: 85 case Maxwell::TessellationPrimitive::Quads:
86 return Shader::TessPrimitive::Quads; 86 return Shader::TessPrimitive::Quads;
87 } 87 }
88 UNREACHABLE(); 88 ASSERT(false);
89 return Shader::TessPrimitive::Triangles; 89 return Shader::TessPrimitive::Triangles;
90 }(); 90 }();
91 info.tess_spacing = [&] { 91 info.tess_spacing = [&] {
@@ -97,7 +97,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(const GraphicsPipelineKey& key,
97 case Maxwell::TessellationSpacing::FractionalEven: 97 case Maxwell::TessellationSpacing::FractionalEven:
98 return Shader::TessSpacing::FractionalEven; 98 return Shader::TessSpacing::FractionalEven;
99 } 99 }
100 UNREACHABLE(); 100 ASSERT(false);
101 return Shader::TessSpacing::Equal; 101 return Shader::TessSpacing::Equal;
102 }(); 102 }();
103 break; 103 break;
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 29ff736fb..8c0fffc67 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -83,7 +83,7 @@ GLenum ImageTarget(const VideoCommon::ImageInfo& info) {
83 case ImageType::Buffer: 83 case ImageType::Buffer:
84 return GL_TEXTURE_BUFFER; 84 return GL_TEXTURE_BUFFER;
85 } 85 }
86 UNREACHABLE_MSG("Invalid image type={}", info.type); 86 ASSERT_MSG(false, "Invalid image type={}", info.type);
87 return GL_NONE; 87 return GL_NONE;
88} 88}
89 89
@@ -107,7 +107,7 @@ GLenum ImageTarget(Shader::TextureType type, int num_samples = 1) {
107 case Shader::TextureType::Buffer: 107 case Shader::TextureType::Buffer:
108 return GL_TEXTURE_BUFFER; 108 return GL_TEXTURE_BUFFER;
109 } 109 }
110 UNREACHABLE_MSG("Invalid image view type={}", type); 110 ASSERT_MSG(false, "Invalid image view type={}", type);
111 return GL_NONE; 111 return GL_NONE;
112} 112}
113 113
@@ -119,7 +119,7 @@ GLenum TextureMode(PixelFormat format, bool is_first) {
119 case PixelFormat::S8_UINT_D24_UNORM: 119 case PixelFormat::S8_UINT_D24_UNORM:
120 return is_first ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT; 120 return is_first ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT;
121 default: 121 default:
122 UNREACHABLE(); 122 ASSERT(false);
123 return GL_DEPTH_COMPONENT; 123 return GL_DEPTH_COMPONENT;
124 } 124 }
125} 125}
@@ -140,7 +140,7 @@ GLint Swizzle(SwizzleSource source) {
140 case SwizzleSource::OneFloat: 140 case SwizzleSource::OneFloat:
141 return GL_ONE; 141 return GL_ONE;
142 } 142 }
143 UNREACHABLE_MSG("Invalid swizzle source={}", source); 143 ASSERT_MSG(false, "Invalid swizzle source={}", source);
144 return GL_NONE; 144 return GL_NONE;
145} 145}
146 146
@@ -197,7 +197,7 @@ GLint ConvertA5B5G5R1_UNORM(SwizzleSource source) {
197 case SwizzleSource::OneFloat: 197 case SwizzleSource::OneFloat:
198 return GL_ONE; 198 return GL_ONE;
199 } 199 }
200 UNREACHABLE_MSG("Invalid swizzle source={}", source); 200 ASSERT_MSG(false, "Invalid swizzle source={}", source);
201 return GL_NONE; 201 return GL_NONE;
202} 202}
203 203
@@ -381,10 +381,10 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form
381 glTextureStorage3D(handle, gl_num_levels, gl_internal_format, width, height, depth); 381 glTextureStorage3D(handle, gl_num_levels, gl_internal_format, width, height, depth);
382 break; 382 break;
383 case GL_TEXTURE_BUFFER: 383 case GL_TEXTURE_BUFFER:
384 UNREACHABLE(); 384 ASSERT(false);
385 break; 385 break;
386 default: 386 default:
387 UNREACHABLE_MSG("Invalid target=0x{:x}", target); 387 ASSERT_MSG(false, "Invalid target=0x{:x}", target);
388 break; 388 break;
389 } 389 }
390 return texture; 390 return texture;
@@ -420,7 +420,7 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form
420 case Shader::ImageFormat::R32G32B32A32_UINT: 420 case Shader::ImageFormat::R32G32B32A32_UINT:
421 return GL_RGBA32UI; 421 return GL_RGBA32UI;
422 } 422 }
423 UNREACHABLE_MSG("Invalid image format={}", format); 423 ASSERT_MSG(false, "Invalid image format={}", format);
424 return GL_R32UI; 424 return GL_R32UI;
425} 425}
426 426
@@ -579,7 +579,7 @@ void TextureCacheRuntime::EmulateCopyImage(Image& dst, Image& src,
579 } else if (IsPixelFormatBGR(dst.info.format) || IsPixelFormatBGR(src.info.format)) { 579 } else if (IsPixelFormatBGR(dst.info.format) || IsPixelFormatBGR(src.info.format)) {
580 format_conversion_pass.ConvertImage(dst, src, copies); 580 format_conversion_pass.ConvertImage(dst, src, copies);
581 } else { 581 } else {
582 UNREACHABLE(); 582 ASSERT(false);
583 } 583 }
584} 584}
585 585
@@ -620,7 +620,7 @@ void TextureCacheRuntime::AccelerateImageUpload(Image& image, const ImageBufferM
620 case ImageType::Linear: 620 case ImageType::Linear:
621 return util_shaders.PitchUpload(image, map, swizzles); 621 return util_shaders.PitchUpload(image, map, swizzles);
622 default: 622 default:
623 UNREACHABLE(); 623 ASSERT(false);
624 break; 624 break;
625 } 625 }
626} 626}
@@ -639,7 +639,7 @@ FormatProperties TextureCacheRuntime::FormatInfo(ImageType type, GLenum internal
639 case ImageType::e3D: 639 case ImageType::e3D:
640 return format_properties[2].at(internal_format); 640 return format_properties[2].at(internal_format);
641 default: 641 default:
642 UNREACHABLE(); 642 ASSERT(false);
643 return FormatProperties{}; 643 return FormatProperties{};
644 } 644 }
645} 645}
@@ -888,7 +888,7 @@ void Image::CopyBufferToImage(const VideoCommon::BufferImageCopy& copy, size_t b
888 } 888 }
889 break; 889 break;
890 default: 890 default:
891 UNREACHABLE(); 891 ASSERT(false);
892 } 892 }
893} 893}
894 894
@@ -924,7 +924,7 @@ void Image::CopyImageToBuffer(const VideoCommon::BufferImageCopy& copy, size_t b
924 depth = copy.image_extent.depth; 924 depth = copy.image_extent.depth;
925 break; 925 break;
926 default: 926 default:
927 UNREACHABLE(); 927 ASSERT(false);
928 } 928 }
929 // Compressed formats don't have a pixel format or type 929 // Compressed formats don't have a pixel format or type
930 const bool is_compressed = gl_format == GL_NONE; 930 const bool is_compressed = gl_format == GL_NONE;
@@ -950,7 +950,7 @@ void Image::Scale(bool up_scale) {
950 case SurfaceType::DepthStencil: 950 case SurfaceType::DepthStencil:
951 return GL_DEPTH_STENCIL_ATTACHMENT; 951 return GL_DEPTH_STENCIL_ATTACHMENT;
952 default: 952 default:
953 UNREACHABLE(); 953 ASSERT(false);
954 return GL_COLOR_ATTACHMENT0; 954 return GL_COLOR_ATTACHMENT0;
955 } 955 }
956 }(); 956 }();
@@ -965,7 +965,7 @@ void Image::Scale(bool up_scale) {
965 case SurfaceType::DepthStencil: 965 case SurfaceType::DepthStencil:
966 return GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; 966 return GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
967 default: 967 default:
968 UNREACHABLE(); 968 ASSERT(false);
969 return GL_COLOR_BUFFER_BIT; 969 return GL_COLOR_BUFFER_BIT;
970 } 970 }
971 }(); 971 }();
@@ -980,7 +980,7 @@ void Image::Scale(bool up_scale) {
980 case SurfaceType::DepthStencil: 980 case SurfaceType::DepthStencil:
981 return 3; 981 return 3;
982 default: 982 default:
983 UNREACHABLE(); 983 ASSERT(false);
984 return 0; 984 return 0;
985 } 985 }
986 }(); 986 }();
@@ -1045,7 +1045,7 @@ bool Image::ScaleUp(bool ignore) {
1045 return false; 1045 return false;
1046 } 1046 }
1047 if (info.type == ImageType::Linear) { 1047 if (info.type == ImageType::Linear) {
1048 UNREACHABLE(); 1048 ASSERT(false);
1049 return false; 1049 return false;
1050 } 1050 }
1051 flags |= ImageFlagBits::Rescaled; 1051 flags |= ImageFlagBits::Rescaled;
@@ -1139,7 +1139,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
1139 UNIMPLEMENTED(); 1139 UNIMPLEMENTED();
1140 break; 1140 break;
1141 case ImageViewType::Buffer: 1141 case ImageViewType::Buffer:
1142 UNREACHABLE(); 1142 ASSERT(false);
1143 break; 1143 break;
1144 } 1144 }
1145 switch (info.type) { 1145 switch (info.type) {
@@ -1319,7 +1319,7 @@ Framebuffer::Framebuffer(TextureCacheRuntime& runtime, std::span<ImageView*, NUM
1319 buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; 1319 buffer_bits |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
1320 break; 1320 break;
1321 default: 1321 default:
1322 UNREACHABLE(); 1322 ASSERT(false);
1323 buffer_bits |= GL_DEPTH_BUFFER_BIT; 1323 buffer_bits |= GL_DEPTH_BUFFER_BIT;
1324 break; 1324 break;
1325 } 1325 }
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h
index c2a6da5a7..644b60d73 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -206,7 +206,7 @@ inline GLenum IndexFormat(Maxwell::IndexFormat index_format) {
206 case Maxwell::IndexFormat::UnsignedInt: 206 case Maxwell::IndexFormat::UnsignedInt:
207 return GL_UNSIGNED_INT; 207 return GL_UNSIGNED_INT;
208 } 208 }
209 UNREACHABLE_MSG("Invalid index_format={}", index_format); 209 ASSERT_MSG(false, "Invalid index_format={}", index_format);
210 return {}; 210 return {};
211} 211}
212 212
@@ -243,7 +243,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
243 case Maxwell::PrimitiveTopology::Patches: 243 case Maxwell::PrimitiveTopology::Patches:
244 return GL_PATCHES; 244 return GL_PATCHES;
245 } 245 }
246 UNREACHABLE_MSG("Invalid topology={}", topology); 246 ASSERT_MSG(false, "Invalid topology={}", topology);
247 return GL_POINTS; 247 return GL_POINTS;
248} 248}
249 249
@@ -271,8 +271,8 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode,
271 } 271 }
272 break; 272 break;
273 } 273 }
274 UNREACHABLE_MSG("Invalid texture filter mode={} and mipmap filter mode={}", filter_mode, 274 ASSERT_MSG(false, "Invalid texture filter mode={} and mipmap filter mode={}", filter_mode,
275 mipmap_filter_mode); 275 mipmap_filter_mode);
276 return GL_NEAREST; 276 return GL_NEAREST;
277} 277}
278 278
@@ -550,7 +550,7 @@ inline GLenum PolygonMode(Maxwell::PolygonMode polygon_mode) {
550 case Maxwell::PolygonMode::Fill: 550 case Maxwell::PolygonMode::Fill:
551 return GL_FILL; 551 return GL_FILL;
552 } 552 }
553 UNREACHABLE_MSG("Invalid polygon mode={}", polygon_mode); 553 ASSERT_MSG(false, "Invalid polygon mode={}", polygon_mode);
554 return GL_FILL; 554 return GL_FILL;
555} 555}
556 556
@@ -563,7 +563,7 @@ inline GLenum ReductionFilter(Tegra::Texture::SamplerReduction filter) {
563 case Tegra::Texture::SamplerReduction::Max: 563 case Tegra::Texture::SamplerReduction::Max:
564 return GL_MAX; 564 return GL_MAX;
565 } 565 }
566 UNREACHABLE_MSG("Invalid reduction filter={}", static_cast<int>(filter)); 566 ASSERT_MSG(false, "Invalid reduction filter={}", static_cast<int>(filter));
567 return GL_WEIGHTED_AVERAGE_ARB; 567 return GL_WEIGHTED_AVERAGE_ARB;
568} 568}
569 569
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 3a3c213bb..9a9243544 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -79,7 +79,7 @@ const char* GetSource(GLenum source) {
79 case GL_DEBUG_SOURCE_OTHER: 79 case GL_DEBUG_SOURCE_OTHER:
80 return "OTHER"; 80 return "OTHER";
81 default: 81 default:
82 UNREACHABLE(); 82 ASSERT(false);
83 return "Unknown source"; 83 return "Unknown source";
84 } 84 }
85} 85}
@@ -101,7 +101,7 @@ const char* GetType(GLenum type) {
101 case GL_DEBUG_TYPE_MARKER: 101 case GL_DEBUG_TYPE_MARKER:
102 return "MARKER"; 102 return "MARKER";
103 default: 103 default:
104 UNREACHABLE(); 104 ASSERT(false);
105 return "Unknown type"; 105 return "Unknown type";
106 } 106 }
107} 107}
diff --git a/src/video_core/renderer_opengl/util_shaders.cpp b/src/video_core/renderer_opengl/util_shaders.cpp
index 837825737..404def62e 100644
--- a/src/video_core/renderer_opengl/util_shaders.cpp
+++ b/src/video_core/renderer_opengl/util_shaders.cpp
@@ -282,7 +282,7 @@ GLenum StoreFormat(u32 bytes_per_block) {
282 case 16: 282 case 16:
283 return GL_RGBA32UI; 283 return GL_RGBA32UI;
284 } 284 }
285 UNREACHABLE(); 285 ASSERT(false);
286 return GL_R8UI; 286 return GL_R8UI;
287} 287}
288 288
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index ea360f339..193cbe15e 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -25,7 +25,7 @@ VkFilter Filter(Tegra::Texture::TextureFilter filter) {
25 case Tegra::Texture::TextureFilter::Linear: 25 case Tegra::Texture::TextureFilter::Linear:
26 return VK_FILTER_LINEAR; 26 return VK_FILTER_LINEAR;
27 } 27 }
28 UNREACHABLE_MSG("Invalid sampler filter={}", filter); 28 ASSERT_MSG(false, "Invalid sampler filter={}", filter);
29 return {}; 29 return {};
30} 30}
31 31
@@ -42,7 +42,7 @@ VkSamplerMipmapMode MipmapMode(Tegra::Texture::TextureMipmapFilter mipmap_filter
42 case Tegra::Texture::TextureMipmapFilter::Linear: 42 case Tegra::Texture::TextureMipmapFilter::Linear:
43 return VK_SAMPLER_MIPMAP_MODE_LINEAR; 43 return VK_SAMPLER_MIPMAP_MODE_LINEAR;
44 } 44 }
45 UNREACHABLE_MSG("Invalid sampler mipmap mode={}", mipmap_filter); 45 ASSERT_MSG(false, "Invalid sampler mipmap mode={}", mipmap_filter);
46 return {}; 46 return {};
47} 47}
48 48
@@ -70,7 +70,7 @@ VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wra
70 case Tegra::Texture::TextureFilter::Linear: 70 case Tegra::Texture::TextureFilter::Linear:
71 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; 71 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
72 } 72 }
73 UNREACHABLE(); 73 ASSERT(false);
74 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; 74 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
75 case Tegra::Texture::WrapMode::MirrorOnceClampToEdge: 75 case Tegra::Texture::WrapMode::MirrorOnceClampToEdge:
76 return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; 76 return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
@@ -744,7 +744,7 @@ VkViewportCoordinateSwizzleNV ViewportSwizzle(Maxwell::ViewportSwizzle swizzle)
744 case Maxwell::ViewportSwizzle::NegativeW: 744 case Maxwell::ViewportSwizzle::NegativeW:
745 return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; 745 return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV;
746 } 746 }
747 UNREACHABLE_MSG("Invalid swizzle={}", swizzle); 747 ASSERT_MSG(false, "Invalid swizzle={}", swizzle);
748 return {}; 748 return {};
749} 749}
750 750
@@ -757,7 +757,7 @@ VkSamplerReductionMode SamplerReduction(Tegra::Texture::SamplerReduction reducti
757 case Tegra::Texture::SamplerReduction::Max: 757 case Tegra::Texture::SamplerReduction::Max:
758 return VK_SAMPLER_REDUCTION_MODE_MAX_EXT; 758 return VK_SAMPLER_REDUCTION_MODE_MAX_EXT;
759 } 759 }
760 UNREACHABLE_MSG("Invalid sampler mode={}", static_cast<int>(reduction)); 760 ASSERT_MSG(false, "Invalid sampler mode={}", static_cast<int>(reduction));
761 return VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT; 761 return VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT;
762} 762}
763 763
@@ -780,7 +780,7 @@ VkSampleCountFlagBits MsaaMode(Tegra::Texture::MsaaMode msaa_mode) {
780 case Tegra::Texture::MsaaMode::Msaa4x4: 780 case Tegra::Texture::MsaaMode::Msaa4x4:
781 return VK_SAMPLE_COUNT_16_BIT; 781 return VK_SAMPLE_COUNT_16_BIT;
782 default: 782 default:
783 UNREACHABLE_MSG("Invalid msaa_mode={}", static_cast<int>(msaa_mode)); 783 ASSERT_MSG(false, "Invalid msaa_mode={}", static_cast<int>(msaa_mode));
784 return VK_SAMPLE_COUNT_1_BIT; 784 return VK_SAMPLE_COUNT_1_BIT;
785 } 785 }
786} 786}
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
index 0aeb37538..450905197 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
@@ -46,7 +46,7 @@ size_t BytesPerIndex(VkIndexType index_type) {
46 case VK_INDEX_TYPE_UINT32: 46 case VK_INDEX_TYPE_UINT32:
47 return 4; 47 return 4;
48 default: 48 default:
49 UNREACHABLE_MSG("Invalid index type={}", index_type); 49 ASSERT_MSG(false, "Invalid index type={}", index_type);
50 return 1; 50 return 1;
51 } 51 }
52} 52}
@@ -366,7 +366,7 @@ void BufferCacheRuntime::ReserveQuadArrayLUT(u32 num_indices, bool wait_for_idle
366 std::memcpy(staging_data, MakeQuadIndices<u32>(quad, first).data(), quad_size); 366 std::memcpy(staging_data, MakeQuadIndices<u32>(quad, first).data(), quad_size);
367 break; 367 break;
368 default: 368 default:
369 UNREACHABLE(); 369 ASSERT(false);
370 break; 370 break;
371 } 371 }
372 staging_data += quad_size; 372 staging_data += quad_size;
diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
index 29481a102..acc8badc9 100644
--- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp
+++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
@@ -265,7 +265,7 @@ std::pair<VkBuffer, VkDeviceSize> QuadIndexedPass::Assemble(
265 case Tegra::Engines::Maxwell3D::Regs::IndexFormat::UnsignedInt: 265 case Tegra::Engines::Maxwell3D::Regs::IndexFormat::UnsignedInt:
266 return 2; 266 return 2;
267 } 267 }
268 UNREACHABLE(); 268 ASSERT(false);
269 return 2; 269 return 2;
270 }(); 270 }();
271 const u32 input_size = num_vertices << index_shift; 271 const u32 input_size = num_vertices << index_shift;
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 5196bdcf2..978e827f5 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -174,7 +174,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program
174 case Maxwell::TessellationPrimitive::Quads: 174 case Maxwell::TessellationPrimitive::Quads:
175 return Shader::TessPrimitive::Quads; 175 return Shader::TessPrimitive::Quads;
176 } 176 }
177 UNREACHABLE(); 177 ASSERT(false);
178 return Shader::TessPrimitive::Triangles; 178 return Shader::TessPrimitive::Triangles;
179 }(); 179 }();
180 info.tess_spacing = [&] { 180 info.tess_spacing = [&] {
@@ -187,7 +187,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program
187 case Maxwell::TessellationSpacing::FractionalEven: 187 case Maxwell::TessellationSpacing::FractionalEven:
188 return Shader::TessSpacing::FractionalEven; 188 return Shader::TessSpacing::FractionalEven;
189 } 189 }
190 UNREACHABLE(); 190 ASSERT(false);
191 return Shader::TessSpacing::Equal; 191 return Shader::TessSpacing::Equal;
192 }(); 192 }();
193 break; 193 break;
diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp
index 31ce2f815..9a6afaca6 100644
--- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp
+++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp
@@ -263,7 +263,7 @@ StagingBufferPool::StagingBuffersCache& StagingBufferPool::GetCache(MemoryUsage
263 case MemoryUsage::Download: 263 case MemoryUsage::Download:
264 return download_cache; 264 return download_cache;
265 default: 265 default:
266 UNREACHABLE_MSG("Invalid memory usage={}", usage); 266 ASSERT_MSG(false, "Invalid memory usage={}", usage);
267 return upload_cache; 267 return upload_cache;
268 } 268 }
269} 269}
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 353594293..43ecb9647 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -70,7 +70,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
70 case ImageType::Buffer: 70 case ImageType::Buffer:
71 break; 71 break;
72 } 72 }
73 UNREACHABLE_MSG("Invalid image type={}", type); 73 ASSERT_MSG(false, "Invalid image type={}", type);
74 return {}; 74 return {};
75} 75}
76 76
@@ -87,7 +87,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
87 case 16: 87 case 16:
88 return VK_SAMPLE_COUNT_16_BIT; 88 return VK_SAMPLE_COUNT_16_BIT;
89 default: 89 default:
90 UNREACHABLE_MSG("Invalid number of samples={}", num_samples); 90 ASSERT_MSG(false, "Invalid number of samples={}", num_samples);
91 return VK_SAMPLE_COUNT_1_BIT; 91 return VK_SAMPLE_COUNT_1_BIT;
92 } 92 }
93} 93}
@@ -107,7 +107,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
107 usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; 107 usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
108 break; 108 break;
109 default: 109 default:
110 UNREACHABLE_MSG("Invalid surface type"); 110 ASSERT_MSG(false, "Invalid surface type");
111 } 111 }
112 } 112 }
113 if (info.storage) { 113 if (info.storage) {
@@ -179,7 +179,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
179 case VideoCore::Surface::SurfaceType::DepthStencil: 179 case VideoCore::Surface::SurfaceType::DepthStencil:
180 return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; 180 return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
181 default: 181 default:
182 UNREACHABLE_MSG("Invalid surface type"); 182 ASSERT_MSG(false, "Invalid surface type");
183 return VkImageAspectFlags{}; 183 return VkImageAspectFlags{};
184 } 184 }
185} 185}
@@ -221,7 +221,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
221 case SwizzleSource::OneInt: 221 case SwizzleSource::OneInt:
222 return VK_COMPONENT_SWIZZLE_ONE; 222 return VK_COMPONENT_SWIZZLE_ONE;
223 } 223 }
224 UNREACHABLE_MSG("Invalid swizzle={}", swizzle); 224 ASSERT_MSG(false, "Invalid swizzle={}", swizzle);
225 return VK_COMPONENT_SWIZZLE_ZERO; 225 return VK_COMPONENT_SWIZZLE_ZERO;
226} 226}
227 227
@@ -242,10 +242,10 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
242 case Shader::TextureType::ColorArrayCube: 242 case Shader::TextureType::ColorArrayCube:
243 return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY; 243 return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
244 case Shader::TextureType::Buffer: 244 case Shader::TextureType::Buffer:
245 UNREACHABLE_MSG("Texture buffers can't be image views"); 245 ASSERT_MSG(false, "Texture buffers can't be image views");
246 return VK_IMAGE_VIEW_TYPE_1D; 246 return VK_IMAGE_VIEW_TYPE_1D;
247 } 247 }
248 UNREACHABLE_MSG("Invalid image view type={}", type); 248 ASSERT_MSG(false, "Invalid image view type={}", type);
249 return VK_IMAGE_VIEW_TYPE_2D; 249 return VK_IMAGE_VIEW_TYPE_2D;
250} 250}
251 251
@@ -269,10 +269,10 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
269 UNIMPLEMENTED_MSG("Rect image view"); 269 UNIMPLEMENTED_MSG("Rect image view");
270 return VK_IMAGE_VIEW_TYPE_2D; 270 return VK_IMAGE_VIEW_TYPE_2D;
271 case VideoCommon::ImageViewType::Buffer: 271 case VideoCommon::ImageViewType::Buffer:
272 UNREACHABLE_MSG("Texture buffers can't be image views"); 272 ASSERT_MSG(false, "Texture buffers can't be image views");
273 return VK_IMAGE_VIEW_TYPE_1D; 273 return VK_IMAGE_VIEW_TYPE_1D;
274 } 274 }
275 UNREACHABLE_MSG("Invalid image view type={}", type); 275 ASSERT_MSG(false, "Invalid image view type={}", type);
276 return VK_IMAGE_VIEW_TYPE_2D; 276 return VK_IMAGE_VIEW_TYPE_2D;
277} 277}
278 278
@@ -644,7 +644,7 @@ struct RangedBarrierRange {
644 case Shader::ImageFormat::R32G32B32A32_UINT: 644 case Shader::ImageFormat::R32G32B32A32_UINT:
645 return VK_FORMAT_R32G32B32A32_UINT; 645 return VK_FORMAT_R32G32B32A32_UINT;
646 } 646 }
647 UNREACHABLE_MSG("Invalid image format={}", format); 647 ASSERT_MSG(false, "Invalid image format={}", format);
648 return VK_FORMAT_R32_UINT; 648 return VK_FORMAT_R32_UINT;
649} 649}
650 650
@@ -1596,7 +1596,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
1596 UNIMPLEMENTED(); 1596 UNIMPLEMENTED();
1597 break; 1597 break;
1598 case VideoCommon::ImageViewType::Buffer: 1598 case VideoCommon::ImageViewType::Buffer:
1599 UNREACHABLE(); 1599 ASSERT(false);
1600 break; 1600 break;
1601 } 1601 }
1602} 1602}
@@ -1822,7 +1822,7 @@ void TextureCacheRuntime::AccelerateImageUpload(
1822 if (IsPixelFormatASTC(image.info.format)) { 1822 if (IsPixelFormatASTC(image.info.format)) {
1823 return astc_decoder_pass.Assemble(image, map, swizzles); 1823 return astc_decoder_pass.Assemble(image, map, swizzles);
1824 } 1824 }
1825 UNREACHABLE(); 1825 ASSERT(false);
1826} 1826}
1827 1827
1828} // namespace Vulkan 1828} // namespace Vulkan
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp
index d469964f6..c4e923bbf 100644
--- a/src/video_core/shader_environment.cpp
+++ b/src/video_core/shader_environment.cpp
@@ -280,7 +280,7 @@ GraphicsEnvironment::GraphicsEnvironment(Tegra::Engines::Maxwell3D& maxwell3d_,
280 stage_index = 4; 280 stage_index = 4;
281 break; 281 break;
282 default: 282 default:
283 UNREACHABLE_MSG("Invalid program={}", program); 283 ASSERT_MSG(false, "Invalid program={}", program);
284 break; 284 break;
285 } 285 }
286 const u64 local_size{sph.LocalMemorySize()}; 286 const u64 local_size{sph.LocalMemorySize()};
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 5f428d35d..69c1b1e6d 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -29,7 +29,7 @@ SurfaceTarget SurfaceTargetFromTextureType(Tegra::Texture::TextureType texture_t
29 return SurfaceTarget::Texture2DArray; 29 return SurfaceTarget::Texture2DArray;
30 default: 30 default:
31 LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", texture_type); 31 LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", texture_type);
32 UNREACHABLE(); 32 ASSERT(false);
33 return SurfaceTarget::Texture2D; 33 return SurfaceTarget::Texture2D;
34 } 34 }
35} 35}
@@ -48,7 +48,7 @@ bool SurfaceTargetIsLayered(SurfaceTarget target) {
48 return true; 48 return true;
49 default: 49 default:
50 LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); 50 LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target);
51 UNREACHABLE(); 51 ASSERT(false);
52 return false; 52 return false;
53 } 53 }
54} 54}
@@ -67,7 +67,7 @@ bool SurfaceTargetIsArray(SurfaceTarget target) {
67 return true; 67 return true;
68 default: 68 default:
69 LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); 69 LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target);
70 UNREACHABLE(); 70 ASSERT(false);
71 return false; 71 return false;
72 } 72 }
73} 73}
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp
index 802939f6c..6c073ee57 100644
--- a/src/video_core/texture_cache/image_info.cpp
+++ b/src/video_core/texture_cache/image_info.cpp
@@ -94,7 +94,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
94 resources.layers = 1; 94 resources.layers = 1;
95 break; 95 break;
96 default: 96 default:
97 UNREACHABLE_MSG("Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); 97 ASSERT_MSG(false, "Invalid texture_type={}", static_cast<int>(config.texture_type.Value()));
98 break; 98 break;
99 } 99 }
100 if (type != ImageType::Linear) { 100 if (type != ImageType::Linear) {
diff --git a/src/video_core/texture_cache/image_view_info.cpp b/src/video_core/texture_cache/image_view_info.cpp
index 0cee5e45f..f47885147 100644
--- a/src/video_core/texture_cache/image_view_info.cpp
+++ b/src/video_core/texture_cache/image_view_info.cpp
@@ -71,7 +71,7 @@ ImageViewInfo::ImageViewInfo(const TICEntry& config, s32 base_layer) noexcept
71 range.extent.layers = config.Depth() * 6; 71 range.extent.layers = config.Depth() * 6;
72 break; 72 break;
73 default: 73 default:
74 UNREACHABLE_MSG("Invalid texture_type={}", static_cast<int>(config.texture_type.Value())); 74 ASSERT_MSG(false, "Invalid texture_type={}", static_cast<int>(config.texture_type.Value()));
75 break; 75 break;
76 } 76 }
77} 77}
diff --git a/src/video_core/texture_cache/samples_helper.h b/src/video_core/texture_cache/samples_helper.h
index 91fec60bd..d552bccf0 100644
--- a/src/video_core/texture_cache/samples_helper.h
+++ b/src/video_core/texture_cache/samples_helper.h
@@ -23,7 +23,7 @@ namespace VideoCommon {
23 case 16: 23 case 16:
24 return {2, 2}; 24 return {2, 2};
25 } 25 }
26 UNREACHABLE_MSG("Invalid number of samples={}", num_samples); 26 ASSERT_MSG(false, "Invalid number of samples={}", num_samples);
27 return {1, 1}; 27 return {1, 1};
28} 28}
29 29
@@ -47,7 +47,7 @@ namespace VideoCommon {
47 case MsaaMode::Msaa4x4: 47 case MsaaMode::Msaa4x4:
48 return 16; 48 return 16;
49 } 49 }
50 UNREACHABLE_MSG("Invalid MSAA mode={}", static_cast<int>(msaa_mode)); 50 ASSERT_MSG(false, "Invalid MSAA mode={}", static_cast<int>(msaa_mode));
51 return 1; 51 return 1;
52} 52}
53 53
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 6622d7818..cf3ca06a6 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -1485,14 +1485,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
1485 std::unordered_map<u64, std::vector<ImageId>, IdentityHash<u64>>& selected_page_table) { 1485 std::unordered_map<u64, std::vector<ImageId>, IdentityHash<u64>>& selected_page_table) {
1486 const auto page_it = selected_page_table.find(page); 1486 const auto page_it = selected_page_table.find(page);
1487 if (page_it == selected_page_table.end()) { 1487 if (page_it == selected_page_table.end()) {
1488 UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); 1488 ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS);
1489 return; 1489 return;
1490 } 1490 }
1491 std::vector<ImageId>& image_ids = page_it->second; 1491 std::vector<ImageId>& image_ids = page_it->second;
1492 const auto vector_it = std::ranges::find(image_ids, image_id); 1492 const auto vector_it = std::ranges::find(image_ids, image_id);
1493 if (vector_it == image_ids.end()) { 1493 if (vector_it == image_ids.end()) {
1494 UNREACHABLE_MSG("Unregistering unregistered image in page=0x{:x}", 1494 ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
1495 page << PAGE_BITS); 1495 page << PAGE_BITS);
1496 return; 1496 return;
1497 } 1497 }
1498 image_ids.erase(vector_it); 1498 image_ids.erase(vector_it);
@@ -1504,14 +1504,14 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
1504 ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) { 1504 ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) {
1505 const auto page_it = page_table.find(page); 1505 const auto page_it = page_table.find(page);
1506 if (page_it == page_table.end()) { 1506 if (page_it == page_table.end()) {
1507 UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); 1507 ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS);
1508 return; 1508 return;
1509 } 1509 }
1510 std::vector<ImageMapId>& image_map_ids = page_it->second; 1510 std::vector<ImageMapId>& image_map_ids = page_it->second;
1511 const auto vector_it = std::ranges::find(image_map_ids, map_id); 1511 const auto vector_it = std::ranges::find(image_map_ids, map_id);
1512 if (vector_it == image_map_ids.end()) { 1512 if (vector_it == image_map_ids.end()) {
1513 UNREACHABLE_MSG("Unregistering unregistered image in page=0x{:x}", 1513 ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
1514 page << PAGE_BITS); 1514 page << PAGE_BITS);
1515 return; 1515 return;
1516 } 1516 }
1517 image_map_ids.erase(vector_it); 1517 image_map_ids.erase(vector_it);
@@ -1532,7 +1532,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
1532 ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) { 1532 ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) {
1533 const auto page_it = page_table.find(page); 1533 const auto page_it = page_table.find(page);
1534 if (page_it == page_table.end()) { 1534 if (page_it == page_table.end()) {
1535 UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PAGE_BITS); 1535 ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << PAGE_BITS);
1536 return; 1536 return;
1537 } 1537 }
1538 std::vector<ImageMapId>& image_map_ids = page_it->second; 1538 std::vector<ImageMapId>& image_map_ids = page_it->second;
@@ -1616,15 +1616,15 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) {
1616 const GPUVAddr gpu_addr = image.gpu_addr; 1616 const GPUVAddr gpu_addr = image.gpu_addr;
1617 const auto alloc_it = image_allocs_table.find(gpu_addr); 1617 const auto alloc_it = image_allocs_table.find(gpu_addr);
1618 if (alloc_it == image_allocs_table.end()) { 1618 if (alloc_it == image_allocs_table.end()) {
1619 UNREACHABLE_MSG("Trying to delete an image alloc that does not exist in address 0x{:x}", 1619 ASSERT_MSG(false, "Trying to delete an image alloc that does not exist in address 0x{:x}",
1620 gpu_addr); 1620 gpu_addr);
1621 return; 1621 return;
1622 } 1622 }
1623 const ImageAllocId alloc_id = alloc_it->second; 1623 const ImageAllocId alloc_id = alloc_it->second;
1624 std::vector<ImageId>& alloc_images = slot_image_allocs[alloc_id].images; 1624 std::vector<ImageId>& alloc_images = slot_image_allocs[alloc_id].images;
1625 const auto alloc_image_it = std::ranges::find(alloc_images, image_id); 1625 const auto alloc_image_it = std::ranges::find(alloc_images, image_id);
1626 if (alloc_image_it == alloc_images.end()) { 1626 if (alloc_image_it == alloc_images.end()) {
1627 UNREACHABLE_MSG("Trying to delete an image that does not exist"); 1627 ASSERT_MSG(false, "Trying to delete an image that does not exist");
1628 return; 1628 return;
1629 } 1629 }
1630 ASSERT_MSG(False(image.flags & ImageFlagBits::Tracked), "Image was not untracked"); 1630 ASSERT_MSG(False(image.flags & ImageFlagBits::Tracked), "Image was not untracked");
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index c81343850..9b6b8527b 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -87,7 +87,7 @@ void Swizzle(std::span<u8> output, std::span<const u8> input, u32 bytes_per_pixe
87 BPP_CASE(16) 87 BPP_CASE(16)
88#undef BPP_CASE 88#undef BPP_CASE
89 default: 89 default:
90 UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); 90 ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel);
91 } 91 }
92} 92}
93 93
@@ -209,7 +209,7 @@ void SwizzleSubrect(u32 subrect_width, u32 subrect_height, u32 source_pitch, u32
209 BPP_CASE(16) 209 BPP_CASE(16)
210#undef BPP_CASE 210#undef BPP_CASE
211 default: 211 default:
212 UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); 212 ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel);
213 } 213 }
214} 214}
215 215
@@ -230,7 +230,7 @@ void UnswizzleSubrect(u32 line_length_in, u32 line_count, u32 pitch, u32 width,
230 BPP_CASE(16) 230 BPP_CASE(16)
231#undef BPP_CASE 231#undef BPP_CASE
232 default: 232 default:
233 UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); 233 ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel);
234 } 234 }
235} 235}
236 236
@@ -253,7 +253,7 @@ void SwizzleSliceToVoxel(u32 line_length_in, u32 line_count, u32 pitch, u32 widt
253 BPP_CASE(16) 253 BPP_CASE(16)
254#undef BPP_CASE 254#undef BPP_CASE
255 default: 255 default:
256 UNREACHABLE_MSG("Invalid bytes_per_pixel={}", bytes_per_pixel); 256 ASSERT_MSG(false, "Invalid bytes_per_pixel={}", bytes_per_pixel);
257 } 257 }
258} 258}
259 259
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index b3a77e07f..11ce865a7 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -738,9 +738,10 @@ VkFormat Device::GetSupportedFormat(VkFormat wanted_format, VkFormatFeatureFlags
738 // The wanted format is not supported by hardware, search for alternatives 738 // The wanted format is not supported by hardware, search for alternatives
739 const VkFormat* alternatives = GetFormatAlternatives(wanted_format); 739 const VkFormat* alternatives = GetFormatAlternatives(wanted_format);
740 if (alternatives == nullptr) { 740 if (alternatives == nullptr) {
741 UNREACHABLE_MSG("Format={} with usage={} and type={} has no defined alternatives and host " 741 ASSERT_MSG(false,
742 "hardware does not support it", 742 "Format={} with usage={} and type={} has no defined alternatives and host "
743 wanted_format, wanted_usage, format_type); 743 "hardware does not support it",
744 wanted_format, wanted_usage, format_type);
744 return wanted_format; 745 return wanted_format;
745 } 746 }
746 747
@@ -756,9 +757,10 @@ VkFormat Device::GetSupportedFormat(VkFormat wanted_format, VkFormatFeatureFlags
756 } 757 }
757 758
758 // No alternatives found, panic 759 // No alternatives found, panic
759 UNREACHABLE_MSG("Format={} with usage={} and type={} is not supported by the host hardware and " 760 ASSERT_MSG(false,
760 "doesn't support any of the alternatives", 761 "Format={} with usage={} and type={} is not supported by the host hardware and "
761 wanted_format, wanted_usage, format_type); 762 "doesn't support any of the alternatives",
763 wanted_format, wanted_usage, format_type);
762 return wanted_format; 764 return wanted_format;
763} 765}
764 766
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
index caae6dfdc..6442898bd 100644
--- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
+++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp
@@ -49,7 +49,7 @@ struct Range {
49 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | 49 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
50 VK_MEMORY_PROPERTY_HOST_CACHED_BIT; 50 VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
51 } 51 }
52 UNREACHABLE_MSG("Invalid memory usage={}", usage); 52 ASSERT_MSG(false, "Invalid memory usage={}", usage);
53 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; 53 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
54} 54}
55 55
@@ -325,7 +325,7 @@ VkMemoryPropertyFlags MemoryAllocator::MemoryPropertyFlags(u32 type_mask,
325 // Remove device local, if it's not supported by the requested resource 325 // Remove device local, if it's not supported by the requested resource
326 return MemoryPropertyFlags(type_mask, flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); 326 return MemoryPropertyFlags(type_mask, flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
327 } 327 }
328 UNREACHABLE_MSG("No compatible memory types found"); 328 ASSERT_MSG(false, "No compatible memory types found");
329 return 0; 329 return 0;
330} 330}
331 331
@@ -349,7 +349,7 @@ bool IsHostVisible(MemoryUsage usage) noexcept {
349 case MemoryUsage::Download: 349 case MemoryUsage::Download:
350 return true; 350 return true;
351 } 351 }
352 UNREACHABLE_MSG("Invalid memory usage={}", usage); 352 ASSERT_MSG(false, "Invalid memory usage={}", usage);
353 return false; 353 return false;
354} 354}
355 355