llvmpipe: use enum blend types instead of unsigned

Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
This commit is contained in:
Brian Paul
2022-06-09 11:18:02 -06:00
committed by Marge Bot
parent cde8d3479e
commit 9c19ed1b88
3 changed files with 16 additions and 16 deletions
+7 -6
View File
@@ -43,7 +43,7 @@
* Is (a OP b) == (b OP a)?
*/
boolean
lp_build_blend_func_commutative(unsigned func)
lp_build_blend_func_commutative(enum pipe_blend_func func)
{
switch (func) {
case PIPE_BLEND_ADD:
@@ -64,7 +64,8 @@ lp_build_blend_func_commutative(unsigned func)
* Whether the blending functions are the reverse of each other.
*/
boolean
lp_build_blend_func_reverse(unsigned rgb_func, unsigned alpha_func)
lp_build_blend_func_reverse(enum pipe_blend_func rgb_func,
enum pipe_blend_func alpha_func)
{
if (rgb_func == alpha_func)
return FALSE;
@@ -145,7 +146,7 @@ lp_build_mul_norm_expand(struct lp_build_context *bld,
*/
LLVMValueRef
lp_build_blend_func(struct lp_build_context *bld,
unsigned func,
enum pipe_blend_func func,
LLVMValueRef term1,
LLVMValueRef term2)
{
@@ -189,9 +190,9 @@ lp_build_blend_func(struct lp_build_context *bld,
*/
LLVMValueRef
lp_build_blend(struct lp_build_context *bld,
unsigned func,
unsigned factor_src,
unsigned factor_dst,
enum pipe_blend_func func,
enum pipe_blendfactor factor_src,
enum pipe_blendfactor factor_dst,
LLVMValueRef src,
LLVMValueRef dst,
LLVMValueRef src_factor,
+8 -9
View File
@@ -43,9 +43,9 @@ struct lp_build_mask_context;
LLVMValueRef
lp_build_blend(struct lp_build_context *bld,
unsigned func,
unsigned factor_src,
unsigned factor_dst,
enum pipe_blend_func func,
enum pipe_blendfactor factor_src,
enum pipe_blendfactor factor_dst,
LLVMValueRef src,
LLVMValueRef dst,
LLVMValueRef src_factor,
@@ -80,25 +80,24 @@ lp_build_blend_aos(struct gallivm_state *gallivm,
*/
LLVMValueRef
lp_build_logicop(LLVMBuilderRef builder,
unsigned logicop_func,
enum pipe_logicop logicop_func,
LLVMValueRef src,
LLVMValueRef dst);
LLVMValueRef
lp_build_blend_func(struct lp_build_context *bld,
unsigned func,
enum pipe_blend_func func,
LLVMValueRef term1,
LLVMValueRef term2);
boolean
lp_build_blend_func_reverse(unsigned rgb_func,
unsigned alpha_func);
lp_build_blend_func_reverse(enum pipe_blend_func rgb_func,
enum pipe_blend_func alpha_func);
boolean
lp_build_blend_func_commutative(unsigned func);
lp_build_blend_func_commutative(enum pipe_blend_func func);
void
lp_build_alpha_to_coverage(struct gallivm_state *gallivm,
@@ -42,7 +42,7 @@
LLVMValueRef
lp_build_logicop(LLVMBuilderRef builder,
unsigned logicop_func,
enum pipe_logicop logicop_func,
LLVMValueRef src,
LLVMValueRef dst)
{