Skip to content

Commit

Permalink
LibSoftGPU: Be less lenient towards unknown enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
gmta authored and awesomekling committed Dec 30, 2021
1 parent 9d90bab commit 079c149
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Userland/Libraries/LibSoftGPU/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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();
}
}

Expand All @@ -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
Expand Down

0 comments on commit 079c149

Please sign in to comment.