aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-11-06 21:10:29 -0800
committerMatt Turner <[email protected]>2017-01-20 11:40:52 -0800
commitae9c69e1cfd34597e8f8b9f724c62aadfec5b13f (patch)
treefeb3c8fa858686de25d64ccf08eac86bf1c6da61
parent25448e4b7ebb61cce99236312f13705cc20c1630 (diff)
i965: Add a CHECK macro to call more complicated validation funcs.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_validate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c
index e23f1ec1b95..322538637ca 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_validate.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c
@@ -53,6 +53,15 @@ cat(struct string *dest, const struct string src)
} \
} while(0)
+#define CHECK(func, args...) \
+ do { \
+ struct string __msg = func(devinfo, inst, ##args); \
+ if (__msg.str) { \
+ cat(&error_msg, __msg); \
+ free(__msg.str); \
+ } \
+ } while (0)
+
static bool
src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
{