summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-29 20:04:38 -0400
committerIlia Mirkin <[email protected]>2015-04-02 00:09:14 -0400
commitf27ec5908416e6a3ea3d770026cd6a1c6ded188f (patch)
tree8ad0549b45650a87515dcff6dfce0c55eca5f0b7 /src
parent8efa3e340d13a9f373e7b2834f12d9fae43e6867 (diff)
freedreno/a3xx: add independent blend function support
This is needed for MRT support Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_blend.c11
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c6
2 files changed, 9 insertions, 8 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_blend.c b/src/gallium/drivers/freedreno/a3xx/fd3_blend.c
index 92295566147..6f5de9d47f7 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_blend.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_blend.c
@@ -86,11 +86,6 @@ fd3_blend_state_create(struct pipe_context *pctx,
}
}
- if (cso->independent_blend_enable) {
- DBG("Unsupported! independent blend state");
- return NULL;
- }
-
so = CALLOC_STRUCT(fd3_blend_stateobj);
if (!so)
return NULL;
@@ -98,7 +93,11 @@ fd3_blend_state_create(struct pipe_context *pctx,
so->base = *cso;
for (i = 0; i < ARRAY_SIZE(so->rb_mrt); i++) {
- const struct pipe_rt_blend_state *rt = &cso->rt[i];
+ const struct pipe_rt_blend_state *rt;
+ if (cso->independent_blend_enable)
+ rt = &cso->rt[i];
+ else
+ rt = &cso->rt[0];
so->rb_mrt[i].blend_control_rgb =
A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(fd_blend_factor(rt->rgb_src_factor)) |
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 68c81055f3d..bb488025ece 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -179,6 +179,10 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return is_a3xx(screen) || is_a4xx(screen);
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ case PIPE_CAP_INDEP_BLEND_FUNC:
+ return is_a3xx(screen);
+
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
@@ -188,8 +192,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return (is_a3xx(screen) || is_a4xx(screen)) ? 130 : 120;
/* Unsupported features. */
- case PIPE_CAP_INDEP_BLEND_ENABLE:
- case PIPE_CAP_INDEP_BLEND_FUNC:
case PIPE_CAP_DEPTH_CLIP_DISABLE:
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: