mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Write the SM4 dcl_temps instruction.
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:
committed by
Alexandre Julliard
parent
62456beeda
commit
40ec063a26
@@ -762,6 +762,19 @@ static void write_sm4_dcl_semantic(struct hlsl_ctx *ctx, struct vkd3d_bytecode_b
|
||||
write_sm4_instruction(buffer, &instr);
|
||||
}
|
||||
|
||||
static void write_sm4_dcl_temps(struct vkd3d_bytecode_buffer *buffer, uint32_t temp_count)
|
||||
{
|
||||
struct sm4_instruction instr =
|
||||
{
|
||||
.opcode = VKD3D_SM4_OP_DCL_TEMPS,
|
||||
|
||||
.idx = {temp_count},
|
||||
.idx_count = 1,
|
||||
};
|
||||
|
||||
write_sm4_instruction(buffer, &instr);
|
||||
}
|
||||
|
||||
static void write_sm4_shdr(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc)
|
||||
{
|
||||
const struct hlsl_profile_info *profile = ctx->profile;
|
||||
@@ -797,6 +810,9 @@ static void write_sm4_shdr(struct hlsl_ctx *ctx, struct dxbc_writer *dxbc)
|
||||
write_sm4_dcl_semantic(ctx, &buffer, var);
|
||||
}
|
||||
|
||||
if (ctx->temp_count)
|
||||
write_sm4_dcl_temps(&buffer, ctx->temp_count);
|
||||
|
||||
dxbc_writer_add_section(dxbc, TAG_SHDR, buffer.data, buffer.size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user