2021-02-17 04:59:28 +01:00
|
|
|
add_library(shader_recompiler STATIC
|
2021-02-16 08:10:22 +01:00
|
|
|
backend/spirv/emit_context.cpp
|
|
|
|
backend/spirv/emit_context.h
|
2021-02-08 06:54:35 +01:00
|
|
|
backend/spirv/emit_spirv.cpp
|
2021-02-06 03:11:23 +01:00
|
|
|
backend/spirv/emit_spirv.h
|
2021-04-11 08:07:02 +02:00
|
|
|
backend/spirv/emit_spirv_atomic.cpp
|
2021-04-02 19:27:30 +02:00
|
|
|
backend/spirv/emit_spirv_barriers.cpp
|
2021-02-08 06:54:35 +01:00
|
|
|
backend/spirv/emit_spirv_bitwise_conversion.cpp
|
|
|
|
backend/spirv/emit_spirv_composite.cpp
|
|
|
|
backend/spirv/emit_spirv_context_get_set.cpp
|
|
|
|
backend/spirv/emit_spirv_control_flow.cpp
|
2021-02-19 22:10:18 +01:00
|
|
|
backend/spirv/emit_spirv_convert.cpp
|
2021-02-08 06:54:35 +01:00
|
|
|
backend/spirv/emit_spirv_floating_point.cpp
|
2021-03-08 22:31:53 +01:00
|
|
|
backend/spirv/emit_spirv_image.cpp
|
2021-02-08 06:54:35 +01:00
|
|
|
backend/spirv/emit_spirv_integer.cpp
|
|
|
|
backend/spirv/emit_spirv_logical.cpp
|
|
|
|
backend/spirv/emit_spirv_memory.cpp
|
|
|
|
backend/spirv/emit_spirv_select.cpp
|
2021-03-29 00:53:34 +02:00
|
|
|
backend/spirv/emit_spirv_shared_memory.cpp
|
2021-03-24 05:33:45 +01:00
|
|
|
backend/spirv/emit_spirv_special.cpp
|
2021-02-08 06:54:35 +01:00
|
|
|
backend/spirv/emit_spirv_undefined.cpp
|
2021-03-25 16:31:37 +01:00
|
|
|
backend/spirv/emit_spirv_warp.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
environment.h
|
|
|
|
exception.h
|
|
|
|
frontend/ir/attribute.cpp
|
|
|
|
frontend/ir/attribute.h
|
|
|
|
frontend/ir/basic_block.cpp
|
|
|
|
frontend/ir/basic_block.h
|
2021-04-04 08:00:41 +02:00
|
|
|
frontend/ir/breadth_first_search.h
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/ir/condition.cpp
|
|
|
|
frontend/ir/condition.h
|
|
|
|
frontend/ir/flow_test.cpp
|
|
|
|
frontend/ir/flow_test.h
|
|
|
|
frontend/ir/ir_emitter.cpp
|
|
|
|
frontend/ir/ir_emitter.h
|
|
|
|
frontend/ir/microinstruction.cpp
|
2021-02-20 07:30:13 +01:00
|
|
|
frontend/ir/modifiers.h
|
2021-02-06 03:11:23 +01:00
|
|
|
frontend/ir/opcodes.cpp
|
|
|
|
frontend/ir/opcodes.h
|
|
|
|
frontend/ir/opcodes.inc
|
2021-04-16 03:46:11 +02:00
|
|
|
frontend/ir/patch.cpp
|
|
|
|
frontend/ir/patch.h
|
2021-02-15 00:15:42 +01:00
|
|
|
frontend/ir/post_order.cpp
|
|
|
|
frontend/ir/post_order.h
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/ir/pred.h
|
2021-02-06 03:11:23 +01:00
|
|
|
frontend/ir/program.cpp
|
|
|
|
frontend/ir/program.h
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/ir/reg.h
|
|
|
|
frontend/ir/type.cpp
|
|
|
|
frontend/ir/type.h
|
|
|
|
frontend/ir/value.cpp
|
|
|
|
frontend/ir/value.h
|
|
|
|
frontend/maxwell/control_flow.cpp
|
|
|
|
frontend/maxwell/control_flow.h
|
|
|
|
frontend/maxwell/decode.cpp
|
|
|
|
frontend/maxwell/decode.h
|
2021-03-27 22:30:24 +01:00
|
|
|
frontend/maxwell/indirect_branch_table_track.cpp
|
|
|
|
frontend/maxwell/indirect_branch_table_track.h
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/instruction.h
|
|
|
|
frontend/maxwell/location.h
|
|
|
|
frontend/maxwell/maxwell.inc
|
2021-02-06 03:11:23 +01:00
|
|
|
frontend/maxwell/opcodes.cpp
|
|
|
|
frontend/maxwell/opcodes.h
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/program.cpp
|
|
|
|
frontend/maxwell/program.h
|
2021-03-14 07:41:05 +01:00
|
|
|
frontend/maxwell/structured_control_flow.cpp
|
|
|
|
frontend/maxwell/structured_control_flow.h
|
2021-04-11 08:07:02 +02:00
|
|
|
frontend/maxwell/translate/impl/atomic_operations_global_memory.cpp
|
|
|
|
frontend/maxwell/translate/impl/atomic_operations_shared_memory.cpp
|
2021-04-04 02:42:58 +02:00
|
|
|
frontend/maxwell/translate/impl/attribute_memory_to_physical.cpp
|
2021-04-02 19:27:30 +02:00
|
|
|
frontend/maxwell/translate/impl/barrier_operations.cpp
|
2021-02-27 07:45:13 +01:00
|
|
|
frontend/maxwell/translate/impl/bitfield_extract.cpp
|
2021-02-27 22:37:49 +01:00
|
|
|
frontend/maxwell/translate/impl/bitfield_insert.cpp
|
2021-03-27 22:30:24 +01:00
|
|
|
frontend/maxwell/translate/impl/branch_indirect.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/common_encoding.h
|
2021-03-01 07:30:09 +01:00
|
|
|
frontend/maxwell/translate/impl/common_funcs.cpp
|
|
|
|
frontend/maxwell/translate/impl/common_funcs.h
|
2021-03-17 05:53:53 +01:00
|
|
|
frontend/maxwell/translate/impl/condition_code_set.cpp
|
2021-03-18 07:53:57 +01:00
|
|
|
frontend/maxwell/translate/impl/double_add.cpp
|
2021-03-22 00:28:37 +01:00
|
|
|
frontend/maxwell/translate/impl/double_compare_and_set.cpp
|
2021-03-21 07:09:14 +01:00
|
|
|
frontend/maxwell/translate/impl/double_fused_multiply_add.cpp
|
2021-03-22 00:28:37 +01:00
|
|
|
frontend/maxwell/translate/impl/double_min_max.cpp
|
2021-03-21 07:09:14 +01:00
|
|
|
frontend/maxwell/translate/impl/double_multiply.cpp
|
2021-03-22 00:28:37 +01:00
|
|
|
frontend/maxwell/translate/impl/double_set_predicate.cpp
|
2021-03-19 23:28:31 +01:00
|
|
|
frontend/maxwell/translate/impl/exit_program.cpp
|
2021-03-01 21:58:16 +01:00
|
|
|
frontend/maxwell/translate/impl/find_leading_one.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_add.cpp
|
2021-03-11 04:42:17 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_compare.cpp
|
2021-03-16 05:57:07 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_compare_and_set.cpp
|
2021-03-21 09:32:16 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_conversion_floating_point.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_fused_multiply_add.cpp
|
2021-03-14 07:23:56 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_min_max.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_multi_function.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_multiply.cpp
|
2021-02-23 02:59:16 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_range_reduction.cpp
|
2021-03-16 05:57:07 +01:00
|
|
|
frontend/maxwell/translate/impl/floating_point_set_predicate.cpp
|
2021-03-29 04:23:45 +02:00
|
|
|
frontend/maxwell/translate/impl/floating_point_swizzled_add.cpp
|
2021-03-03 07:07:19 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_add.cpp
|
2021-03-21 01:03:21 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_fused_multiply_add.cpp
|
2021-03-20 21:22:21 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_helper.cpp
|
|
|
|
frontend/maxwell/translate/impl/half_floating_point_helper.h
|
2021-03-21 02:08:04 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_multiply.cpp
|
2021-03-21 04:24:30 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_set_predicate.cpp
|
2021-03-21 03:48:40 +01:00
|
|
|
frontend/maxwell/translate/impl/half_floating_point_set.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/impl/impl.cpp
|
|
|
|
frontend/maxwell/translate/impl/impl.h
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_add.cpp
|
2021-03-02 20:59:28 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_add_three_input.cpp
|
2021-03-01 06:18:30 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_compare.cpp
|
2021-03-01 07:30:09 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_compare_and_set.cpp
|
2021-03-20 09:04:12 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_floating_point_conversion.cpp
|
2021-03-07 20:48:03 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_funnel_shift.cpp
|
2021-03-01 05:33:53 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_minimum_maximum.cpp
|
2021-02-27 03:41:46 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_popcount.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_scaled_add.cpp
|
|
|
|
frontend/maxwell/translate/impl/integer_set_predicate.cpp
|
|
|
|
frontend/maxwell/translate/impl/integer_shift_left.cpp
|
2021-02-25 06:46:40 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_shift_right.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_short_multiply_add.cpp
|
2021-03-04 07:02:44 +01:00
|
|
|
frontend/maxwell/translate/impl/integer_to_integer_conversion.cpp
|
2021-04-12 02:33:18 +02:00
|
|
|
frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp
|
2021-03-09 21:14:57 +01:00
|
|
|
frontend/maxwell/translate/impl/load_constant.cpp
|
2021-03-27 22:30:24 +01:00
|
|
|
frontend/maxwell/translate/impl/load_constant.h
|
2021-03-05 07:15:16 +01:00
|
|
|
frontend/maxwell/translate/impl/load_effective_address.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/impl/load_store_attribute.cpp
|
2021-03-29 00:53:34 +02:00
|
|
|
frontend/maxwell/translate/impl/load_store_local_shared.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/impl/load_store_memory.cpp
|
2021-03-03 06:41:05 +01:00
|
|
|
frontend/maxwell/translate/impl/logic_operation.cpp
|
|
|
|
frontend/maxwell/translate/impl/logic_operation_three_input.cpp
|
2021-02-21 21:50:14 +01:00
|
|
|
frontend/maxwell/translate/impl/move_predicate_to_register.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/move_register.cpp
|
2021-03-08 04:01:22 +01:00
|
|
|
frontend/maxwell/translate/impl/move_register_to_predicate.cpp
|
2021-02-03 20:43:04 +01:00
|
|
|
frontend/maxwell/translate/impl/move_special_register.cpp
|
2021-02-21 21:50:14 +01:00
|
|
|
frontend/maxwell/translate/impl/not_implemented.cpp
|
2021-04-12 08:48:15 +02:00
|
|
|
frontend/maxwell/translate/impl/output_geometry.cpp
|
2021-04-16 22:22:59 +02:00
|
|
|
frontend/maxwell/translate/impl/pixel_load.cpp
|
2021-03-02 19:42:09 +01:00
|
|
|
frontend/maxwell/translate/impl/predicate_set_predicate.cpp
|
|
|
|
frontend/maxwell/translate/impl/predicate_set_register.cpp
|
2021-02-25 02:31:15 +01:00
|
|
|
frontend/maxwell/translate/impl/select_source_with_predicate.cpp
|
2021-04-09 06:45:39 +02:00
|
|
|
frontend/maxwell/translate/impl/surface_load_store.cpp
|
2021-03-15 08:54:43 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_fetch.cpp
|
|
|
|
frontend/maxwell/translate/impl/texture_fetch_swizzled.cpp
|
2021-03-25 19:59:35 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_gather_swizzled.cpp
|
2021-03-24 23:41:55 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_gather.cpp
|
2021-03-29 02:52:52 +02:00
|
|
|
frontend/maxwell/translate/impl/texture_gradient.cpp
|
2021-03-27 01:45:20 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_load_swizzled.cpp
|
2021-03-26 20:51:05 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_load.cpp
|
2021-03-28 21:25:08 +02:00
|
|
|
frontend/maxwell/translate/impl/texture_mipmap_level.cpp
|
2021-03-26 22:45:38 +01:00
|
|
|
frontend/maxwell/translate/impl/texture_query.cpp
|
2021-03-28 00:47:00 +01:00
|
|
|
frontend/maxwell/translate/impl/video_helper.cpp
|
|
|
|
frontend/maxwell/translate/impl/video_helper.h
|
|
|
|
frontend/maxwell/translate/impl/video_minimum_maximum.cpp
|
|
|
|
frontend/maxwell/translate/impl/video_multiply_add.cpp
|
|
|
|
frontend/maxwell/translate/impl/video_set_predicate.cpp
|
2021-03-24 01:27:17 +01:00
|
|
|
frontend/maxwell/translate/impl/vote.cpp
|
2021-03-25 16:31:37 +01:00
|
|
|
frontend/maxwell/translate/impl/warp_shuffle.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
frontend/maxwell/translate/translate.cpp
|
|
|
|
frontend/maxwell/translate/translate.h
|
2021-02-16 08:10:22 +01:00
|
|
|
ir_opt/collect_shader_info_pass.cpp
|
2021-02-05 09:58:02 +01:00
|
|
|
ir_opt/constant_propagation_pass.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
ir_opt/dead_code_elimination_pass.cpp
|
2021-04-19 01:03:38 +02:00
|
|
|
ir_opt/dual_vertex_pass.cpp
|
2021-02-05 09:58:02 +01:00
|
|
|
ir_opt/global_memory_to_storage_buffer_pass.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
ir_opt/identity_removal_pass.cpp
|
2021-02-19 22:10:18 +01:00
|
|
|
ir_opt/lower_fp16_to_fp32.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
ir_opt/passes.h
|
2021-02-03 01:07:00 +01:00
|
|
|
ir_opt/ssa_rewrite_pass.cpp
|
2021-03-08 22:31:53 +01:00
|
|
|
ir_opt/texture_pass.cpp
|
2021-01-09 07:30:07 +01:00
|
|
|
ir_opt/verification_pass.cpp
|
2021-02-06 03:11:23 +01:00
|
|
|
object_pool.h
|
2021-03-19 23:28:31 +01:00
|
|
|
program_header.h
|
2021-02-17 04:59:28 +01:00
|
|
|
profile.h
|
2021-02-16 08:10:22 +01:00
|
|
|
shader_info.h
|
2021-01-09 07:30:07 +01:00
|
|
|
)
|
2021-02-08 06:54:35 +01:00
|
|
|
|
2021-04-21 09:45:14 +02:00
|
|
|
target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit)
|
2021-02-17 04:59:28 +01:00
|
|
|
|
2021-01-09 07:30:07 +01:00
|
|
|
if (MSVC)
|
|
|
|
target_compile_options(shader_recompiler PRIVATE
|
|
|
|
/W4
|
|
|
|
/WX
|
|
|
|
/we4018 # 'expression' : signed/unsigned mismatch
|
|
|
|
/we4244 # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point)
|
|
|
|
/we4245 # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
|
|
|
|
/we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
|
|
|
|
/we4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data
|
|
|
|
/we4305 # 'context' : truncation from 'type1' to 'type2'
|
|
|
|
/we4800 # Implicit conversion from 'type' to bool. Possible information loss
|
|
|
|
/we4826 # Conversion from 'type1' to 'type2' is sign-extended. This may cause unexpected runtime behavior.
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_compile_options(shader_recompiler PRIVATE
|
|
|
|
-Werror
|
|
|
|
-Werror=conversion
|
|
|
|
-Werror=ignored-qualifiers
|
|
|
|
-Werror=implicit-fallthrough
|
|
|
|
-Werror=shadow
|
|
|
|
-Werror=sign-compare
|
|
|
|
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
|
|
|
|
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
|
|
|
|
-Werror=unused-variable
|
2021-04-06 04:25:22 +02:00
|
|
|
|
2021-04-10 08:32:55 +02:00
|
|
|
# Bracket depth determines maximum size of a fold expression in Clang since 9c9974c3ccb6.
|
|
|
|
# And this in turns limits the size of a std::array.
|
2021-04-06 04:25:22 +02:00
|
|
|
$<$<CXX_COMPILER_ID:Clang>:-fbracket-depth=1024>
|
2021-01-09 07:30:07 +01:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
create_target_directory_groups(shader_recompiler)
|