mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
microsoft/compiler: Move blob_init earlier to prevent crash on failure
Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Acked-by: Michael Tang <tangm@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846>
This commit is contained in:
parent
cb5120bcf7
commit
3f1b90d638
1 changed files with 1 additions and 1 deletions
|
|
@ -4232,6 +4232,7 @@ nir_to_dxil(struct nir_shader *s, const struct nir_to_dxil_options *opts,
|
|||
assert(opts);
|
||||
bool retval = true;
|
||||
debug_dxil = (int)debug_get_option_debug_dxil();
|
||||
blob_init(blob);
|
||||
|
||||
struct ntd_context *ctx = calloc(1, sizeof(*ctx));
|
||||
if (!ctx)
|
||||
|
|
@ -4323,7 +4324,6 @@ nir_to_dxil(struct nir_shader *s, const struct nir_to_dxil_options *opts,
|
|||
goto out;
|
||||
}
|
||||
|
||||
blob_init(blob);
|
||||
if (!dxil_container_write(&container, blob)) {
|
||||
debug_printf("D3D12: dxil_container_write failed\n");
|
||||
retval = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue