if(gpu == nullptr)
{
char const str[] = "xglCreateDevice parameter, XGL_PHYSICAL_GPU gpu, is nullptr "\
- "(postcondition).";
+ "(precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if(pCreateInfo == nullptr)
{
char const str[] = "xglCreateDevice parameter, XGL_DEVICE_CREATE_INFO* pCreateInfo, is "\
- "nullptr (postcondition).";
+ "nullptr (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if(pCreateInfo->queueRecordCount == 0)
{
char const str[] = "xglCreateDevice parameter, uint32_t pCreateInfo->queueRecordCount, is "\
- "zero (postcondition).";
+ "zero (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if(pCreateInfo->pRequestedQueues == nullptr)
{
char const str[] = "xglCreateDevice parameter, XGL_DEVICE_QUEUE_CREATE_INFO* pCreateInfo->pRequestedQueues, is "\
- "nullptr (postcondition).";
+ "nullptr (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if(!validate_XGL_VALIDATION_LEVEL(pCreateInfo->maxValidationLevel))
{
char const str[] = "xglCreateDevice parameter, XGL_VALIDATION_LEVEL pCreateInfo->maxValidationLevel, is "\
- "unrecognized (postcondition).";
+ "unrecognized (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
{
if(pCreateInfo == nullptr)
{
- char const str[] = "xglCreateImage parameter, XGL_IMAGE_CREATE_INFO* pCreateInfo, is \
- nullptr (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_IMAGE_CREATE_INFO* pCreateInfo, is "\
+ "nullptr (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if(pCreateInfo->sType != XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO)
{
- char const str[] = "xglCreateImage parameter, XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO \
- pCreateInfo->sType, is not XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO "\
+ "pCreateInfo->sType, is not XGL_STRUCTURE_TYPE_IMAGE_CREATE_INFO (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if (!validate_XGL_IMAGE_TYPE(pCreateInfo->imageType))
{
- char const str[] = "xglCreateImage parameter, XGL_IMAGE_TYPE pCreateInfo->imageType, is \
- unrecognized (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_IMAGE_TYPE pCreateInfo->imageType, is "\
+ "unrecognized (precondition).";
layerCbMsg(XGL_DBG_MSG_UNKNOWN, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if (!validate_XGL_FORMAT(pCreateInfo->format))
{
- char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, is \
- unrecognized (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, is "\
+ "unrecognized (precondition).";
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
XGL_INFO_TYPE_FORMAT_PROPERTIES, &size, &properties);
if(result != XGL_SUCCESS)
{
- char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, cannot be \
- validated (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, cannot be "\
+ "validated (precondition).";
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if((properties.linearTilingFeatures) == 0 && (properties.optimalTilingFeatures == 0))
{
- char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, contains \
- unsupported format (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_FORMAT pCreateInfo->format, contains "\
+ "unsupported format (precondition).";
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
// TODO: Can we check device-specific limits?
if (!xgl_validate_xgl_extent3d(&pCreateInfo->extent))
{
- char const str[] = "xglCreateImage parameter, XGL_EXTENT3D pCreateInfo->extent, is invalid \
- (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_EXTENT3D pCreateInfo->extent, is invalid "\
+ "(precondition).";
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
if (!validate_XGL_IMAGE_TILING(pCreateInfo->tiling))
{
- char const str[] = "xglCreateImage parameter, XGL_IMAGE_TILING pCreateInfo->tiling, is \
- unrecoginized (precondition).";
+ char const str[] = "xglCreateImage parameter, XGL_IMAGE_TILING pCreateInfo->tiling, is "\
+ "unrecoginized (precondition).";
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
return;
}
+
+ if(pCreateInfo->pColorStoreOps == nullptr)
+ {
+ char const str[] = "xglCreateRenderPass parameter, XGL_ATTACHMENT_STORE_OP* pCreateInfo->pColorStoreOps, \
+ is nullptr (precondition).";
+ layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
+ return;
+ }
+
+ for(uint32_t i = 0; i < pCreateInfo->colorAttachmentCount; ++i)
+ {
+ if(!validate_XGL_ATTACHMENT_STORE_OP(pCreateInfo->pColorStoreOps[i]))
+ {
+ std::stringstream ss;
+ ss << "xglCreateRenderPass parameter, XGL_ATTACHMENT_STORE_OP pCreateInfo->pColorStoreOps[" << i <<
+ "], is unrecognized (precondition).";
+ layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", ss.str().c_str());
+ continue;
+ }
+ }
+
+ if(pCreateInfo->pColorLoadClearValues == nullptr)
+ {
+ char const str[] = "xglCreateRenderPass parameter, XGL_CLEAR_COLOR* pCreateInfo->\
+ pColorLoadClearValues, is nullptr (precondition).";
+ layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
+ return;
+ }
for(uint32_t i = 0; i < pCreateInfo->colorAttachmentCount; ++i)
{