summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-05-23 14:02:36 +0800
committerChia-I Wu <[email protected]>2013-05-27 11:02:57 +0800
commit11c9aaf30ab63ef856d0fe6f794a74db136afea0 (patch)
treeef4c6235b224ae4c3c7495a24a43e5a90c6dd2e0 /src
parentfb40aca8791a8dc6b5777fd4cc0b060553e799ef (diff)
ilo: advertise supports for pure integer formats
For pure integer formats, no filtering nor blending is needed.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_format.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_format.c b/src/gallium/drivers/ilo/ilo_format.c
index 50c70d43aa7..65fb8201726 100644
--- a/src/gallium/drivers/ilo/ilo_format.c
+++ b/src/gallium/drivers/ilo/ilo_format.c
@@ -608,6 +608,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
{
struct ilo_screen *is = ilo_screen(screen);
const int gen = ILO_GEN_GET_MAJOR(is->dev.gen * 10);
+ const bool is_pure_int = util_format_is_pure_integer(format);
const struct surface_format_info *info;
unsigned bind;
@@ -641,7 +642,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
if (gen < info->render_target)
return false;
- if (gen < info->alpha_blend)
+ if (!is_pure_int && gen < info->alpha_blend)
return false;
}
@@ -652,7 +653,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
if (gen < info->sampling)
return false;
- if (gen < info->filtering)
+ if (!is_pure_int && gen < info->filtering)
return false;
}