mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 22:53:35 +00:00
Validate vertex format for Input State
BUG=chromium:935078, chromium:935026 Change-Id: I9c27cae2a0aa1ec23b8203a4d9b95e1d6d98a868 Reviewed-on: https://dawn-review.googlesource.com/c/5020 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
87bf834109
commit
83684f9c13
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "common/Assert.h"
|
#include "common/Assert.h"
|
||||||
#include "dawn_native/Device.h"
|
#include "dawn_native/Device.h"
|
||||||
|
#include "dawn_native/ValidationUtils_autogen.h"
|
||||||
|
|
||||||
namespace dawn_native {
|
namespace dawn_native {
|
||||||
|
|
||||||
@ -135,6 +136,9 @@ namespace dawn_native {
|
|||||||
HandleError("Binding slot out of bounds");
|
HandleError("Binding slot out of bounds");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (GetDevice()->ConsumedError(ValidateVertexFormat(attribute->format))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// If attribute->offset is close to 0xFFFFFFFF, the validation below to add
|
// If attribute->offset is close to 0xFFFFFFFF, the validation below to add
|
||||||
// attribute->offset and VertexFormatSize(attribute->format) might overflow on a
|
// attribute->offset and VertexFormatSize(attribute->format) might overflow on a
|
||||||
// 32bit machine, then it can pass the validation incorrectly. We need to catch it.
|
// 32bit machine, then it can pass the validation incorrectly. We need to catch it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user