diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-12-30 00:34:53 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-30 14:24:29 +0100 |
commit | 079c14931f83cca35decb57d7ba95fcb33f7113f (patch) | |
tree | 33bf777aab15b9bc720c04eadcc589cfab3c3bd0 | |
parent | 9d90bab91ba69e8e67604c2b713a4937304b129b (diff) | |
download | serenity-079c14931f83cca35decb57d7ba95fcb33f7113f.zip |
LibSoftGPU: Be less lenient towards unknown enum values
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 0aa9efc912..4dbde51b94 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -707,7 +707,6 @@ void Device::submit_triangle(const Triangle& triangle, Vector<size_t> const& ena // FIXME: Implement more blend modes switch (sampler.config().fixed_function_texture_env_mode) { case TextureEnvMode::Modulate: - default: fragment = fragment * texel; break; case TextureEnvMode::Replace: @@ -721,6 +720,8 @@ void Device::submit_triangle(const Triangle& triangle, Vector<size_t> const& ena fragment.set_z(texel.z() * src_alpha + fragment.z() * one_minus_src_alpha); break; } + default: + VERIFY_NOT_REACHED(); } } @@ -739,7 +740,7 @@ void Device::submit_triangle(const Triangle& triangle, Vector<size_t> const& ena factor = exp(-((m_options.fog_density * z) * (m_options.fog_density * z))); break; default: - break; + VERIFY_NOT_REACHED(); } // Mix texel's RGB with fog's RBG - leave alpha alone |