mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 04:50:11 +01:00
spirv: Delete the impl for prototype-only functions
Previously, when we had a prototype-only function in SPIR-V, we would compile it just fine and the function would have an impl that did nothing. This commit changes that so that the nir_function::impl is NULL to indicate a prototype-only function. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9069>
This commit is contained in:
parent
9d1d55f0fd
commit
1ef04f56c1
1 changed files with 6 additions and 0 deletions
|
|
@ -220,6 +220,12 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
|
||||||
|
|
||||||
case SpvOpFunctionEnd:
|
case SpvOpFunctionEnd:
|
||||||
b->func->end = w;
|
b->func->end = w;
|
||||||
|
if (b->func->start_block == NULL) {
|
||||||
|
/* In this case, the function didn't have any actual blocks. It's
|
||||||
|
* just a prototype so delete the function_impl.
|
||||||
|
*/
|
||||||
|
b->func->nir_func->impl = NULL;
|
||||||
|
}
|
||||||
b->func = NULL;
|
b->func = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue