anv: Drop the anv_validate block helper

Over the course of driver development, we've come up with a number of
different schemes for adding giant blocks of asserts inside the driver.
This one is only being used once in anv_pipeline.c and the way it's
being used actually generates compiler warnings in release builds.  This
commit drops the anv_validate macro and just puts the contents of the
one validation function in side of a "#ifdef DEBUG" guard.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2017-03-07 09:25:14 -08:00
parent a316d8f406
commit 33301d949f
2 changed files with 3 additions and 13 deletions

View File

@@ -1119,6 +1119,7 @@ copy_non_dynamic_state(struct anv_pipeline *pipeline,
static void
anv_pipeline_validate_create_info(const VkGraphicsPipelineCreateInfo *info)
{
#ifdef DEBUG
struct anv_render_pass *renderpass = NULL;
struct anv_subpass *subpass = NULL;
@@ -1158,6 +1159,7 @@ anv_pipeline_validate_create_info(const VkGraphicsPipelineCreateInfo *info)
break;
}
}
#endif
}
/**
@@ -1189,9 +1191,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
{
VkResult result;
anv_validate {
anv_pipeline_validate_create_info(pCreateInfo);
}
anv_pipeline_validate_create_info(pCreateInfo);
if (alloc == NULL)
alloc = &device->alloc;