mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
draw: Ensure that the vertex_header type size matches expectation.
This is failing sometimes, probably because TargetData keeps a structure layout cache, which can becomes bogus, ever since the InvalidateStructLayoutInfo API was removed in LLVM r135245. This change merely makes the problem easier to diagnose (an assertion failure instead of a random crash).
This commit is contained in:
parent
6e7756db14
commit
e48d26bf40
1 changed files with 3 additions and 0 deletions
|
|
@ -305,6 +305,9 @@ create_jit_vertex_header(struct gallivm_state *gallivm, int data_elems)
|
|||
target, vertex_header,
|
||||
DRAW_JIT_VERTEX_DATA);
|
||||
|
||||
assert(LLVMABISizeOfType(target, vertex_header) ==
|
||||
offsetof(struct vertex_header, data[data_elems]));
|
||||
|
||||
return vertex_header;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue