layers: Add Idx buffer alignment check to DrawState
At vkCmdBindIndexBuffer() time, verify that offset param falls on an aligment boundary as set by indexType param. New check enum is DRAWSTATE_VTX_INDEX_ALIGNMENT_ERROR.
Removed checks for this from the driver and added a validation test and documentation for the new check.
ParamChecker has a check to verify indexType param is an acceptable value, but it's after the call so documented a TODO for ParamChecker to push this check prior to call.
diff --git a/icd/intel/cmd_pipeline.c b/icd/intel/cmd_pipeline.c
index 4dc5abb..67bd7a8 100644
--- a/icd/intel/cmd_pipeline.c
+++ b/icd/intel/cmd_pipeline.c
@@ -263,18 +263,10 @@
offset_align = 4;
break;
default:
- /* TODOVV: Make sure covered in validation test */
-// cmd_fail(cmd, VK_ERROR_INVALID_VALUE);
- return;
+ assert(!"unsupported index type");
break;
}
- if (offset % offset_align) {
- /* TODOVV: Make sure covered in validation test */
-// cmd_fail(cmd, VK_ERROR_INVALID_VALUE);
- return;
- }
-
/* aligned and inclusive */
end_offset = buf->size - (buf->size % offset_align) - 1;