summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r--src/gallium/drivers/r600/r600_state.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index a0ba1318e2c..31d7bd04519 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -157,6 +157,11 @@ static bool r600_is_zs_format_supported(enum pipe_format format)
return r600_translate_dbformat(format) != ~0U;
}
+static inline bool r600_is_blending_supported(enum pipe_format format)
+{
+ return !(util_format_is_pure_integer(format) || util_format_is_depth_or_stencil(format));
+}
+
boolean r600_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
@@ -235,6 +240,10 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
if (usage & PIPE_BIND_TRANSFER_WRITE)
retval |= PIPE_BIND_TRANSFER_WRITE;
+ if ((usage & PIPE_BIND_BLENDABLE) &&
+ r600_is_blending_supported(format))
+ retval |= PIPE_BIND_BLENDABLE;
+
return retval == usage;
}