hlsl: Some fixes caught by Wine tests.
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
2455 2454 2456 2455 put_u32(&buffer, D3DSIO_END); 2457 2456 2458 if (!(ret = buffer.status)) 2457 if (buffer.status) 2458 ctx->result = buffer.status; 2459 2460 if (!ctx->result) 2459 2461 { 2460 2462 out->code = buffer.data; 2461 2463 out->size = buffer.size; 2462 2464 } 2463 return ret; 2465 return ctx->result; @@ -2627,7 +2627,8 @@ bool hlsl_sm4_usage_from_semantic(struct hlsl_ctx *ctx, const struct hlsl_semant return true; } -static void add_section(struct dxbc_writer *dxbc, uint32_t tag, struct vkd3d_bytecode_buffer *buffer) +static void add_section(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc, + uint32_t tag, struct vkd3d_bytecode_buffer *buffer) { /* Native D3DDisassemble() expects at least the sizes of the ISGN and OSGN * sections to be aligned. Without this, the sections themselves will be @@ -2635,6 +2636,9 @@ static void add_section(struct dxbc_writer *dxbc, uint32_t tag, struct vkd3d_byt size_t size = bytecode_align(buffer); dxbc_writer_add_section(dxbc, tag, buffer->data, size); + + if (buffer->status < 0) + ctx->result = buffer->status; } static void write_sm4_signature(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc, bool output)
I'll approve this, but I don't think this is quite right; ultimately we'd like to push hlsl_ctx out of e.g. write_sm4_shdr(), instead of into things like add_section().
Please register or sign in to reply