vkd3d-shader: Distinguish between resource exhaustion and invalid shaders when returning failure.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-05-21 00:32:23 -05:00
committed by Alexandre Julliard
parent ba1cc670e6
commit 6493953516
3 changed files with 11 additions and 10 deletions

View File

@@ -1968,8 +1968,8 @@ int hlsl_emit_dxbc(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun
allocate_const_registers(ctx, entry_func);
allocate_semantic_registers(ctx);
if (ctx->failed)
return VKD3D_ERROR_INVALID_SHADER;
if (ctx->result)
return ctx->result;
if (ctx->profile->major_version < 4)
return write_sm1_shader(ctx, entry_func, out);