mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
Make Dawn error macro more explicit and have an "error type"
The error type will help distinguish between validation errors, context losts and others which should be handled differently. Take advantage of advantage of this to change DAWN_RETURN_ERROR to "return DAWN_FOO_ERROR" to have the return be more explicit. Also removes usage of DAWN_TRY_ASSERT for more explicit checks. Change-Id: Icbce16b0c8d8eb084b0af2fc132acee776909a36
This commit is contained in:
committed by
Corentin Wallez
parent
cca9c698a0
commit
6fee61ca9c
@@ -117,19 +117,19 @@ namespace dawn_native {
|
||||
ASSERT(aspects.any());
|
||||
|
||||
if (aspects[VALIDATION_ASPECT_INDEX_BUFFER]) {
|
||||
DAWN_RETURN_ERROR("Missing index buffer");
|
||||
return DAWN_VALIDATION_ERROR("Missing index buffer");
|
||||
}
|
||||
|
||||
if (aspects[VALIDATION_ASPECT_VERTEX_BUFFERS]) {
|
||||
DAWN_RETURN_ERROR("Missing vertex buffer");
|
||||
return DAWN_VALIDATION_ERROR("Missing vertex buffer");
|
||||
}
|
||||
|
||||
if (aspects[VALIDATION_ASPECT_BIND_GROUPS]) {
|
||||
DAWN_RETURN_ERROR("Missing bind group");
|
||||
return DAWN_VALIDATION_ERROR("Missing bind group");
|
||||
}
|
||||
|
||||
if (aspects[VALIDATION_ASPECT_PIPELINE]) {
|
||||
DAWN_RETURN_ERROR("Missing pipeline");
|
||||
return DAWN_VALIDATION_ERROR("Missing pipeline");
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
|
||||
Reference in New Issue
Block a user