Mesa (master): galahad: Check that texture format is supported.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Jul 6 19:38:51 UTC 2012
Module: Mesa
Branch: master
Commit: 8b1f1900d191b01a6a58090228a8056f3c0cad1c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b1f1900d191b01a6a58090228a8056f3c0cad1c
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Jul 6 20:38:41 2012 +0100
galahad: Check that texture format is supported.
---
src/gallium/drivers/galahad/glhd_screen.c | 7 +++++++
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 309e55d..2596a14 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);
More information about the mesa-commit
mailing list