mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Implement the "earlydepthstencil" attribute.
This commit is contained in:
committed by
Henri Verbeet
parent
fe8a2f820b
commit
e61046fb23
Notes:
Henri Verbeet
2024-09-12 18:57:32 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1063
@@ -4630,6 +4630,17 @@ static void write_sm4_dcl_thread_group(const struct tpf_writer *tpf, const uint3
|
||||
write_sm4_instruction(tpf, &instr);
|
||||
}
|
||||
|
||||
static void write_sm4_dcl_global_flags(const struct tpf_writer *tpf, uint32_t flags)
|
||||
{
|
||||
struct sm4_instruction instr =
|
||||
{
|
||||
.opcode = VKD3D_SM4_OP_DCL_GLOBAL_FLAGS,
|
||||
.extra_bits = flags << VKD3D_SM4_GLOBAL_FLAGS_SHIFT,
|
||||
};
|
||||
|
||||
write_sm4_instruction(tpf, &instr);
|
||||
}
|
||||
|
||||
static void write_sm4_ret(const struct tpf_writer *tpf)
|
||||
{
|
||||
struct sm4_instruction instr =
|
||||
@@ -6119,6 +6130,9 @@ static void write_sm4_shdr(struct hlsl_ctx *ctx, const struct hlsl_ir_function_d
|
||||
write_sm4_dcl_textures(&tpf, resource, true);
|
||||
}
|
||||
|
||||
if (entry_func->early_depth_test && profile->major_version >= 5)
|
||||
write_sm4_dcl_global_flags(&tpf, VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry)
|
||||
{
|
||||
if ((var->is_input_semantic && var->last_read) || (var->is_output_semantic && var->first_write))
|
||||
|
Reference in New Issue
Block a user