summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-07-06 20:38:41 +0100
committerJosé Fonseca <[email protected]>2012-07-06 20:38:41 +0100
commit8b1f1900d191b01a6a58090228a8056f3c0cad1c (patch)
treed05c48b905b46f99a4caa9deca68a4820742de0f /src
parentff8ddf399adb58d7c33863ec9c6eeaa7aed71599 (diff)
galahad: Check that texture format is supported.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/galahad/glhd_screen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index 309e55d3b47..2596a148ce5 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -31,6 +31,7 @@
#include "pipe/p_state.h"
#include "util/u_memory.h"
#include "util/u_math.h"
+#include "util/u_format.h"
#include "glhd_public.h"
#include "glhd_screen.h"
@@ -213,6 +214,12 @@ galahad_screen_resource_create(struct pipe_screen *_screen,
glhd_warn("Requested NPOT (%ux%u) non-rectangle texture without NPOT support", templat->width0, templat->height0);
}
+ if (templat->target != PIPE_BUFFER &&
+ !screen->is_format_supported(screen, templat->format, templat->target, templat->nr_samples, templat->bind)) {
+ glhd_warn("Requested format=%s target=%u samples=%u bind=0x%x unsupported",
+ util_format_name(templat->format), templat->target, templat->nr_samples, templat->bind);
+ }
+
result = screen->resource_create(screen,
templat);