mesa: do not use bitfields for advanced-blend state

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>
This commit is contained in:
Erik Faye-Lund
2020-06-24 15:40:34 +02:00
committed by Marge Bot
parent c36aac542a
commit 6ffa0e9254
4 changed files with 34 additions and 39 deletions

View File

@@ -329,8 +329,7 @@ calc_blend_result(ir_factory f,
unsigned choices = blend_qualifiers;
while (choices) {
enum gl_advanced_blend_mode choice = (enum gl_advanced_blend_mode)
(1u << u_bit_scan(&choices));
enum gl_advanced_blend_mode choice = (enum gl_advanced_blend_mode)u_bit_scan(&choices);
ir_if *iff = new(mem_ctx) ir_if(is_mode(mode, choice));
casefactory.emit(iff);
@@ -385,7 +384,6 @@ calc_blend_result(ir_factory f,
set_lum(&casefactory, factor, dst_rgb, src_rgb);
break;
case BLEND_NONE:
case BLEND_ALL:
unreachable("not real cases");
}