mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/ir: Store the global flags in struct vsir_program.
This commit is contained in:
Notes:
Henri Verbeet
2024-10-22 20:55:52 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1207
@@ -5912,11 +5912,8 @@ static size_t spirv_compiler_get_current_function_location(struct spirv_compiler
|
||||
return builder->main_function_location;
|
||||
}
|
||||
|
||||
static void spirv_compiler_emit_dcl_global_flags(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_instruction *instruction)
|
||||
static void spirv_compiler_emit_global_flags(struct spirv_compiler *compiler, enum vsir_global_flags flags)
|
||||
{
|
||||
enum vkd3d_shader_global_flags flags = instruction->declaration.global_flags;
|
||||
|
||||
if (flags & VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL)
|
||||
{
|
||||
spirv_compiler_emit_execution_mode(compiler, SpvExecutionModeEarlyFragmentTests, NULL, 0);
|
||||
@@ -10185,9 +10182,6 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
|
||||
|
||||
switch (instruction->opcode)
|
||||
{
|
||||
case VKD3DSIH_DCL_GLOBAL_FLAGS:
|
||||
spirv_compiler_emit_dcl_global_flags(compiler, instruction);
|
||||
break;
|
||||
case VKD3DSIH_DCL_INDEXABLE_TEMP:
|
||||
spirv_compiler_emit_dcl_indexable_temp(compiler, instruction);
|
||||
break;
|
||||
@@ -10675,6 +10669,7 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler, struct
|
||||
spirv_compiler_allocate_ssa_register_ids(compiler, program->ssa_count);
|
||||
if (compiler->shader_type == VKD3D_SHADER_TYPE_COMPUTE)
|
||||
spirv_compiler_emit_thread_group_size(compiler, &program->thread_group_size);
|
||||
spirv_compiler_emit_global_flags(compiler, program->global_flags);
|
||||
|
||||
spirv_compiler_emit_descriptor_declarations(compiler);
|
||||
|
||||
|
Reference in New Issue
Block a user