bug-14538: Remove validation error codes
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14538
diff --git a/icd/intel/cmd_meta.c b/icd/intel/cmd_meta.c
index 1cfd117..0b3c976 100644
--- a/icd/intel/cmd_meta.c
+++ b/icd/intel/cmd_meta.c
@@ -448,7 +448,7 @@
intel_dev_log(cmd->dev, VK_DBG_REPORT_ERROR_BIT,
&cmd->obj.base, 0, 0,
"unaligned vkCmdCopyBuffer unsupported");
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
+ cmd_fail(cmd, VK_ERROR_VALIDATION_FAILED);
continue;
}
@@ -489,18 +489,15 @@
bool raw_copy = false;
uint32_t i;
- if (src->type != dst->type) {
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
- return;
- }
+ /* TODOVV: verify validation */
+ assert((src->type == dst->type) && "Mismatched source and destination types");
if (src->layout.format == dst->layout.format) {
raw_copy = true;
raw_format = cmd_meta_img_raw_format(cmd, src->layout.format);
- } else if (icd_format_is_compressed(src->layout.format) ||
- icd_format_is_compressed(dst->layout.format)) {
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
- return;
+ } else {
+ assert((icd_format_is_compressed(src->layout.format) ||
+ icd_format_is_compressed(dst->layout.format)) && "Compressed formats not supported");
}
memset(&meta, 0, sizeof(meta));
@@ -569,12 +566,10 @@
const VkImageBlit* pRegions,
VkTexFilter filter)
{
- struct intel_cmd *cmd = intel_cmd(cmdBuffer);
-
/*
* TODO: Implement actual blit function.
*/
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
+ assert(0 && "vkCmdBlitImage not implemented");
}
ICD_EXPORT void VKAPI vkCmdCopyBufferToImage(
@@ -685,7 +680,6 @@
&cmd->obj.base, 0, 0,
"vkCmdCopyImageToBuffer with bpp %d unsupported",
icd_format_get_size(img->layout.format));
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
return;
}
@@ -732,11 +726,9 @@
uint32_t *ptr;
uint32_t offset;
+ /* TODOVV: Is this an API requirement or driver requirement? */
/* must be 4-byte aligned */
- if ((destOffset | dataSize) & 3) {
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
- return;
- }
+ assert(!((destOffset | dataSize) & 3) && "Offset and Size must be 4-byte aligned");
/* write to dynamic state writer first */
offset = cmd_state_pointer(cmd, INTEL_CMD_ITEM_BLOB, 32,
@@ -778,11 +770,9 @@
struct intel_cmd_meta meta;
VkFormat format;
+ /* TODOVV: Is this an API requirement or driver requirement? */
/* must be 4-byte aligned */
- if ((destOffset | fillSize) & 3) {
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
- return;
- }
+ assert(!((destOffset | fillSize) & 3) && "Offset and Size must be 4-byte aligned");
memset(&meta, 0, sizeof(meta));
meta.mode = INTEL_CMD_META_VS_POINTS;
@@ -1075,11 +1065,9 @@
VkFormat format;
uint32_t i;
- if (src->samples <= 1 || dst->samples > 1 ||
- src->layout.format != dst->layout.format) {
- cmd_fail(cmd, VK_ERROR_UNKNOWN);
- return;
- }
+ /* TODOVV: Add validation */
+ assert(!(src->samples <= 1 || dst->samples > 1 ||
+ src->layout.format != dst->layout.format) && "Invalid vkCmdResolveImage");
memset(&meta, 0, sizeof(meta));
meta.mode = INTEL_CMD_META_FS_RECT;