2015-11-23 17:03:04 +00:00
|
|
|
LIBCOMPILER_FILES = \
|
2017-10-11 17:54:55 +01:00
|
|
|
blob.c \
|
|
|
|
blob.h \
|
2016-01-18 08:47:13 +00:00
|
|
|
builtin_type_macros.h \
|
2016-01-18 09:35:29 +00:00
|
|
|
glsl_types.cpp \
|
|
|
|
glsl_types.h \
|
2015-11-25 16:03:26 +00:00
|
|
|
nir_types.cpp \
|
|
|
|
nir_types.h \
|
2016-01-18 08:47:13 +00:00
|
|
|
shader_enums.c \
|
2016-10-26 12:02:27 +01:00
|
|
|
shader_enums.h \
|
|
|
|
shader_info.h
|
2016-01-18 10:54:03 +00:00
|
|
|
|
2016-01-18 10:16:48 +00:00
|
|
|
# libglsl
|
|
|
|
|
|
|
|
LIBGLSL_FILES = \
|
|
|
|
glsl/ast.h \
|
|
|
|
glsl/ast_array_index.cpp \
|
|
|
|
glsl/ast_expr.cpp \
|
|
|
|
glsl/ast_function.cpp \
|
|
|
|
glsl/ast_to_hir.cpp \
|
|
|
|
glsl/ast_type.cpp \
|
|
|
|
glsl/builtin_functions.cpp \
|
2016-10-14 19:02:18 +01:00
|
|
|
glsl/builtin_functions.h \
|
2016-10-15 02:11:51 +01:00
|
|
|
glsl/builtin_int64.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/builtin_types.cpp \
|
|
|
|
glsl/builtin_variables.cpp \
|
2016-10-15 02:11:51 +01:00
|
|
|
glsl/generate_ir.cpp \
|
2018-04-30 11:39:43 +01:00
|
|
|
glsl/gl_nir_lower_atomics.c \
|
2019-03-24 19:43:55 +00:00
|
|
|
glsl/gl_nir_lower_bindless_images.c \
|
2019-03-09 16:12:46 +00:00
|
|
|
glsl/gl_nir_lower_buffers.c \
|
2018-04-30 11:39:43 +01:00
|
|
|
glsl/gl_nir_lower_samplers.c \
|
|
|
|
glsl/gl_nir_lower_samplers_as_deref.c \
|
2017-11-28 12:39:44 +00:00
|
|
|
glsl/gl_nir_link_atomics.c \
|
2018-02-23 16:09:22 +00:00
|
|
|
glsl/gl_nir_link_uniform_initializers.c \
|
nir/linker: Add gl_nir_link_uniforms()
This function will be the entry point for linking the uniforms from
the nir_shader objects associated with the gl_linked_shaders of a
program.
This patch includes initial support for linking uniforms from NIR
shaders. It is tailored for the ARB_gl_spirv needs, and it is far from
complete, but it should handle most cases of uniforms, array
uniforms, structs, samplers and images.
There are some FIXMEs related to specific features that will be
implemented in following patches, like atomic counters, UBOs and
SSBOs.
Also, note that ARB_gl_spirv makes mandatory explicit location for
normal uniforms, so this code only handles uniforms with explicit
location. But there are cases, like uniform atomic counters, that
doesn't have a location from the OpenGL point of view (they have a
binding), but that Mesa assign internally a location. That will be
handled on following patches.
A nir_linker.h file is also added. More NIR-linking related API will
be added in subsequent patches and those will include stuff from Mesa,
so reusing nir.h didn't seem a good idea.
v2: move from compiler/nir to compiler/glsl (Timothy Arceri)
v3: sets var->driver.location if the uniform was found from a previous
stage (Neil Roberts).
Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Neil Roberts <nroberts@igalia.com
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-11-14 11:25:47 +00:00
|
|
|
glsl/gl_nir_link_uniforms.c \
|
2017-12-12 16:27:44 +00:00
|
|
|
glsl/gl_nir_link_xfb.c \
|
2017-11-14 23:29:28 +00:00
|
|
|
glsl/gl_nir_linker.c \
|
nir/linker: Add gl_nir_link_uniforms()
This function will be the entry point for linking the uniforms from
the nir_shader objects associated with the gl_linked_shaders of a
program.
This patch includes initial support for linking uniforms from NIR
shaders. It is tailored for the ARB_gl_spirv needs, and it is far from
complete, but it should handle most cases of uniforms, array
uniforms, structs, samplers and images.
There are some FIXMEs related to specific features that will be
implemented in following patches, like atomic counters, UBOs and
SSBOs.
Also, note that ARB_gl_spirv makes mandatory explicit location for
normal uniforms, so this code only handles uniforms with explicit
location. But there are cases, like uniform atomic counters, that
doesn't have a location from the OpenGL point of view (they have a
binding), but that Mesa assign internally a location. That will be
handled on following patches.
A nir_linker.h file is also added. More NIR-linking related API will
be added in subsequent patches and those will include stuff from Mesa,
so reusing nir.h didn't seem a good idea.
v2: move from compiler/nir to compiler/glsl (Timothy Arceri)
v3: sets var->driver.location if the uniform was found from a previous
stage (Neil Roberts).
Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Neil Roberts <nroberts@igalia.com
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-11-14 11:25:47 +00:00
|
|
|
glsl/gl_nir_linker.h \
|
2018-04-30 11:39:43 +01:00
|
|
|
glsl/gl_nir.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/glsl_parser_extras.cpp \
|
|
|
|
glsl/glsl_parser_extras.h \
|
|
|
|
glsl/glsl_symbol_table.cpp \
|
|
|
|
glsl/glsl_symbol_table.h \
|
2016-05-26 00:00:38 +01:00
|
|
|
glsl/glsl_to_nir.cpp \
|
|
|
|
glsl/glsl_to_nir.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/hir_field_selection.cpp \
|
2016-12-12 21:37:46 +00:00
|
|
|
glsl/ir_array_refcount.cpp \
|
|
|
|
glsl/ir_array_refcount.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/ir_basic_block.cpp \
|
|
|
|
glsl/ir_basic_block.h \
|
|
|
|
glsl/ir_builder.cpp \
|
|
|
|
glsl/ir_builder.h \
|
|
|
|
glsl/ir_clone.cpp \
|
|
|
|
glsl/ir_constant_expression.cpp \
|
|
|
|
glsl/ir.cpp \
|
|
|
|
glsl/ir.h \
|
|
|
|
glsl/ir_equals.cpp \
|
|
|
|
glsl/ir_expression_flattening.cpp \
|
|
|
|
glsl/ir_expression_flattening.h \
|
|
|
|
glsl/ir_function_can_inline.cpp \
|
|
|
|
glsl/ir_function_detect_recursion.cpp \
|
|
|
|
glsl/ir_function_inlining.h \
|
|
|
|
glsl/ir_function.cpp \
|
|
|
|
glsl/ir_hierarchical_visitor.cpp \
|
|
|
|
glsl/ir_hierarchical_visitor.h \
|
|
|
|
glsl/ir_hv_accept.cpp \
|
|
|
|
glsl/ir_optimization.h \
|
|
|
|
glsl/ir_print_visitor.cpp \
|
|
|
|
glsl/ir_print_visitor.h \
|
|
|
|
glsl/ir_reader.cpp \
|
|
|
|
glsl/ir_reader.h \
|
|
|
|
glsl/ir_rvalue_visitor.cpp \
|
|
|
|
glsl/ir_rvalue_visitor.h \
|
|
|
|
glsl/ir_set_program_inouts.cpp \
|
|
|
|
glsl/ir_uniform.h \
|
|
|
|
glsl/ir_validate.cpp \
|
|
|
|
glsl/ir_variable_refcount.cpp \
|
|
|
|
glsl/ir_variable_refcount.h \
|
|
|
|
glsl/ir_visitor.h \
|
|
|
|
glsl/linker.cpp \
|
|
|
|
glsl/linker.h \
|
2018-03-28 13:59:26 +01:00
|
|
|
glsl/linker_util.h \
|
2018-05-12 08:59:32 +01:00
|
|
|
glsl/linker_util.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/link_atomics.cpp \
|
|
|
|
glsl/link_functions.cpp \
|
|
|
|
glsl/link_interface_blocks.cpp \
|
|
|
|
glsl/link_uniforms.cpp \
|
|
|
|
glsl/link_uniform_initializers.cpp \
|
|
|
|
glsl/link_uniform_block_active_visitor.cpp \
|
|
|
|
glsl/link_uniform_block_active_visitor.h \
|
|
|
|
glsl/link_uniform_blocks.cpp \
|
|
|
|
glsl/link_varyings.cpp \
|
|
|
|
glsl/link_varyings.h \
|
|
|
|
glsl/list.h \
|
|
|
|
glsl/loop_analysis.cpp \
|
|
|
|
glsl/loop_analysis.h \
|
|
|
|
glsl/loop_unroll.cpp \
|
2016-06-27 19:32:16 +01:00
|
|
|
glsl/lower_blend_equation_advanced.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/lower_buffer_access.cpp \
|
|
|
|
glsl/lower_buffer_access.h \
|
|
|
|
glsl/lower_const_arrays_to_uniforms.cpp \
|
2017-10-21 20:15:41 +01:00
|
|
|
glsl/lower_cs_derived.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/lower_discard.cpp \
|
|
|
|
glsl/lower_discard_flow.cpp \
|
2016-05-08 21:44:04 +01:00
|
|
|
glsl/lower_distance.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/lower_if_to_cond_assign.cpp \
|
|
|
|
glsl/lower_instructions.cpp \
|
2016-10-15 02:17:16 +01:00
|
|
|
glsl/lower_int64.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/lower_jumps.cpp \
|
|
|
|
glsl/lower_mat_op_to_vec.cpp \
|
|
|
|
glsl/lower_noise.cpp \
|
|
|
|
glsl/lower_offset_array.cpp \
|
|
|
|
glsl/lower_packed_varyings.cpp \
|
|
|
|
glsl/lower_named_interface_blocks.cpp \
|
|
|
|
glsl/lower_packing_builtins.cpp \
|
|
|
|
glsl/lower_subroutine.cpp \
|
|
|
|
glsl/lower_tess_level.cpp \
|
|
|
|
glsl/lower_texture_projection.cpp \
|
|
|
|
glsl/lower_variable_index_to_cond_assign.cpp \
|
|
|
|
glsl/lower_vec_index_to_cond_assign.cpp \
|
|
|
|
glsl/lower_vec_index_to_swizzle.cpp \
|
|
|
|
glsl/lower_vector.cpp \
|
|
|
|
glsl/lower_vector_derefs.cpp \
|
|
|
|
glsl/lower_vector_insert.cpp \
|
|
|
|
glsl/lower_vertex_id.cpp \
|
|
|
|
glsl/lower_output_reads.cpp \
|
|
|
|
glsl/lower_shared_reference.cpp \
|
|
|
|
glsl/lower_ubo_reference.cpp \
|
|
|
|
glsl/opt_algebraic.cpp \
|
|
|
|
glsl/opt_array_splitting.cpp \
|
|
|
|
glsl/opt_conditional_discard.cpp \
|
|
|
|
glsl/opt_constant_folding.cpp \
|
|
|
|
glsl/opt_constant_propagation.cpp \
|
|
|
|
glsl/opt_constant_variable.cpp \
|
|
|
|
glsl/opt_copy_propagation_elements.cpp \
|
|
|
|
glsl/opt_dead_builtin_variables.cpp \
|
|
|
|
glsl/opt_dead_builtin_varyings.cpp \
|
|
|
|
glsl/opt_dead_code.cpp \
|
|
|
|
glsl/opt_dead_code_local.cpp \
|
|
|
|
glsl/opt_dead_functions.cpp \
|
|
|
|
glsl/opt_flatten_nested_if_blocks.cpp \
|
|
|
|
glsl/opt_flip_matrices.cpp \
|
|
|
|
glsl/opt_function_inlining.cpp \
|
|
|
|
glsl/opt_if_simplification.cpp \
|
|
|
|
glsl/opt_minmax.cpp \
|
|
|
|
glsl/opt_rebalance_tree.cpp \
|
|
|
|
glsl/opt_redundant_jumps.cpp \
|
|
|
|
glsl/opt_structure_splitting.cpp \
|
2017-11-01 06:37:14 +00:00
|
|
|
glsl/opt_swizzle.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/opt_tree_grafting.cpp \
|
|
|
|
glsl/opt_vectorize.cpp \
|
|
|
|
glsl/program.h \
|
2016-03-17 20:58:40 +00:00
|
|
|
glsl/propagate_invariance.cpp \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/s_expression.cpp \
|
2017-08-26 02:37:11 +01:00
|
|
|
glsl/s_expression.h \
|
2017-10-27 09:04:53 +01:00
|
|
|
glsl/serialize.cpp \
|
|
|
|
glsl/serialize.h \
|
2017-08-26 02:37:11 +01:00
|
|
|
glsl/string_to_uint_map.cpp \
|
|
|
|
glsl/string_to_uint_map.h
|
2016-01-18 10:16:48 +00:00
|
|
|
|
2016-04-14 02:08:32 +01:00
|
|
|
LIBGLSL_SHADER_CACHE_FILES = \
|
|
|
|
glsl/shader_cache.cpp \
|
|
|
|
glsl/shader_cache.h
|
|
|
|
|
2016-01-18 10:16:48 +00:00
|
|
|
# glsl_compiler
|
|
|
|
|
|
|
|
GLSL_COMPILER_CXX_FILES = \
|
2016-09-15 19:36:16 +01:00
|
|
|
glsl/ir_builder_print_visitor.cpp \
|
|
|
|
glsl/ir_builder_print_visitor.h \
|
2016-11-11 14:45:02 +00:00
|
|
|
glsl/opt_add_neg_to_sub.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/standalone_scaffolding.cpp \
|
|
|
|
glsl/standalone_scaffolding.h \
|
2016-05-14 16:59:26 +01:00
|
|
|
glsl/standalone.cpp \
|
|
|
|
glsl/standalone.h
|
2016-01-18 10:16:48 +00:00
|
|
|
|
|
|
|
# libglsl generated sources
|
2016-07-14 02:02:10 +01:00
|
|
|
LIBGLSL_GENERATED_FILES = \
|
2015-04-16 00:59:43 +01:00
|
|
|
glsl/ir_expression_operation.h \
|
2016-07-13 00:42:36 +01:00
|
|
|
glsl/ir_expression_operation_constant.h \
|
2015-04-16 01:50:57 +01:00
|
|
|
glsl/ir_expression_operation_strings.h \
|
2016-01-18 10:16:48 +00:00
|
|
|
glsl/glsl_lexer.cpp \
|
2016-07-14 02:02:10 +01:00
|
|
|
glsl/glsl_parser.cpp \
|
2018-11-15 18:18:12 +00:00
|
|
|
glsl/glsl_parser.h \
|
2019-01-29 17:52:39 +00:00
|
|
|
glsl/float64_glsl.h
|
2016-01-18 10:16:48 +00:00
|
|
|
|
|
|
|
# libglcpp
|
|
|
|
|
|
|
|
LIBGLCPP_FILES = \
|
|
|
|
glsl/glcpp/glcpp.h \
|
|
|
|
glsl/glcpp/pp.c
|
|
|
|
|
|
|
|
LIBGLCPP_GENERATED_FILES = \
|
|
|
|
glsl/glcpp/glcpp-lex.c \
|
|
|
|
glsl/glcpp/glcpp-parse.c
|
|
|
|
|
2016-01-18 10:54:03 +00:00
|
|
|
NIR_GENERATED_FILES = \
|
|
|
|
nir/nir_builder_opcodes.h \
|
|
|
|
nir/nir_constant_expressions.c \
|
2018-03-15 22:42:44 +00:00
|
|
|
nir/nir_intrinsics.c \
|
|
|
|
nir/nir_intrinsics.h \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opcodes.c \
|
|
|
|
nir/nir_opcodes.h \
|
|
|
|
nir/nir_opt_algebraic.c
|
|
|
|
|
|
|
|
NIR_FILES = \
|
|
|
|
nir/nir.c \
|
|
|
|
nir/nir.h \
|
|
|
|
nir/nir_builder.h \
|
2018-04-25 17:19:23 +01:00
|
|
|
nir/nir_builtin_builder.c \
|
|
|
|
nir/nir_builtin_builder.h \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_clone.c \
|
|
|
|
nir/nir_constant_expressions.h \
|
|
|
|
nir/nir_control_flow.c \
|
|
|
|
nir/nir_control_flow.h \
|
|
|
|
nir/nir_control_flow_private.h \
|
2018-03-16 08:15:47 +00:00
|
|
|
nir/nir_deref.c \
|
2018-03-20 18:11:25 +00:00
|
|
|
nir/nir_deref.h \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_dominance.c \
|
2017-10-20 17:35:48 +01:00
|
|
|
nir/nir_format_convert.h \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_from_ssa.c \
|
2016-02-05 23:03:04 +00:00
|
|
|
nir/nir_gather_info.c \
|
2019-01-05 15:13:44 +00:00
|
|
|
nir/nir_gather_ssa_types.c \
|
2018-10-05 15:13:25 +01:00
|
|
|
nir/nir_gather_xfb_info.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_gs_count_vertices.c \
|
2016-02-05 23:03:04 +00:00
|
|
|
nir/nir_inline_functions.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_instr_set.c \
|
|
|
|
nir/nir_instr_set.h \
|
2017-09-07 14:27:59 +01:00
|
|
|
nir/nir_linking_helpers.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_liveness.c \
|
2016-12-13 03:39:51 +00:00
|
|
|
nir/nir_loop_analyze.c \
|
|
|
|
nir/nir_loop_analyze.h \
|
2017-02-23 00:53:18 +00:00
|
|
|
nir/nir_lower_alpha_test.c \
|
2018-05-08 19:24:40 +01:00
|
|
|
nir/nir_lower_alu.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_alu_to_scalar.c \
|
2019-03-11 23:47:39 +00:00
|
|
|
nir/nir_lower_array_deref_of_vec.c \
|
2017-04-12 18:26:54 +01:00
|
|
|
nir/nir_lower_atomics_to_ssbo.c \
|
2015-12-22 02:54:00 +00:00
|
|
|
nir/nir_lower_bitmap.c \
|
2018-04-26 09:02:04 +01:00
|
|
|
nir/nir_lower_bit_size.c \
|
2018-10-22 22:44:59 +01:00
|
|
|
nir/nir_lower_bool_to_float.c \
|
2018-10-18 18:04:09 +01:00
|
|
|
nir/nir_lower_bool_to_int32.c \
|
2016-02-01 22:29:22 +00:00
|
|
|
nir/nir_lower_clamp_color_outputs.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_clip.c \
|
2016-10-04 06:37:40 +01:00
|
|
|
nir/nir_lower_clip_cull_distance_arrays.c \
|
2016-07-16 00:44:53 +01:00
|
|
|
nir/nir_lower_constant_initializers.c \
|
2015-07-31 19:57:48 +01:00
|
|
|
nir/nir_lower_double_ops.c \
|
2015-12-22 02:27:25 +00:00
|
|
|
nir/nir_lower_drawpixels.c \
|
2019-05-02 21:36:11 +01:00
|
|
|
nir/nir_lower_fb_read.c \
|
2018-08-18 19:46:46 +01:00
|
|
|
nir/nir_lower_flrp.c \
|
2019-04-26 14:01:43 +01:00
|
|
|
nir/nir_lower_fragcoord_wtrans.c \
|
2019-03-22 08:24:57 +00:00
|
|
|
nir/nir_lower_frexp.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_global_vars_to_local.c \
|
|
|
|
nir/nir_lower_gs_intrinsics.c \
|
|
|
|
nir/nir_lower_load_const_to_scalar.c \
|
|
|
|
nir/nir_lower_locals_to_regs.c \
|
|
|
|
nir/nir_lower_idiv.c \
|
2016-02-14 01:45:37 +00:00
|
|
|
nir/nir_lower_indirect_derefs.c \
|
2017-02-23 21:56:15 +00:00
|
|
|
nir/nir_lower_int64.c \
|
2019-05-01 06:25:05 +01:00
|
|
|
nir/nir_lower_int_to_float.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_io.c \
|
2017-10-23 05:51:29 +01:00
|
|
|
nir/nir_lower_io_arrays_to_elements.c \
|
2016-03-25 17:52:26 +00:00
|
|
|
nir/nir_lower_io_to_temporaries.c \
|
2016-08-04 20:42:45 +01:00
|
|
|
nir/nir_lower_io_to_scalar.c \
|
2019-03-06 21:21:51 +00:00
|
|
|
nir/nir_lower_io_to_vector.c \
|
2019-02-27 20:36:44 +00:00
|
|
|
nir/nir_lower_non_uniform_access.c \
|
2018-04-27 08:28:48 +01:00
|
|
|
nir/nir_lower_packing.c \
|
2016-02-01 22:34:12 +00:00
|
|
|
nir/nir_lower_passthrough_edgeflags.c \
|
2016-10-01 20:34:36 +01:00
|
|
|
nir/nir_lower_patch_vertices.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_phis_to_scalar.c \
|
2016-12-14 02:19:42 +00:00
|
|
|
nir/nir_lower_regs_to_ssa.c \
|
2016-02-05 23:03:04 +00:00
|
|
|
nir/nir_lower_returns.c \
|
2016-12-02 19:36:42 +00:00
|
|
|
nir/nir_lower_scratch.c \
|
2019-04-07 21:24:45 +01:00
|
|
|
nir/nir_lower_sincos.c \
|
2017-08-22 21:23:59 +01:00
|
|
|
nir/nir_lower_subgroups.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_system_values.c \
|
|
|
|
nir/nir_lower_tex.c \
|
|
|
|
nir/nir_lower_to_source_mods.c \
|
|
|
|
nir/nir_lower_two_sided_color.c \
|
2019-02-08 21:36:37 +00:00
|
|
|
nir/nir_lower_uniforms_to_ubo.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_lower_vars_to_ssa.c \
|
|
|
|
nir/nir_lower_var_copies.c \
|
|
|
|
nir/nir_lower_vec_to_movs.c \
|
2019-04-14 16:43:13 +01:00
|
|
|
nir/nir_lower_viewport_transform.c \
|
2016-05-18 19:38:32 +01:00
|
|
|
nir/nir_lower_wpos_center.c \
|
2015-11-07 15:59:09 +00:00
|
|
|
nir/nir_lower_wpos_ytransform.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_metadata.c \
|
2018-06-06 15:11:45 +01:00
|
|
|
nir/nir_move_load_const.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_move_vec_src_uses_to_dest.c \
|
|
|
|
nir/nir_normalize_cubemap_coords.c \
|
2019-03-08 18:08:20 +00:00
|
|
|
nir/nir_opt_combine_stores.c \
|
2018-05-23 02:19:16 +01:00
|
|
|
nir/nir_opt_comparison_pre.c \
|
2016-11-02 01:22:07 +00:00
|
|
|
nir/nir_opt_conditional_discard.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_constant_folding.c \
|
2016-12-10 06:31:26 +00:00
|
|
|
nir/nir_opt_copy_prop_vars.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_copy_propagate.c \
|
|
|
|
nir/nir_opt_cse.c \
|
|
|
|
nir/nir_opt_dce.c \
|
|
|
|
nir/nir_opt_dead_cf.c \
|
2018-07-27 21:56:35 +01:00
|
|
|
nir/nir_opt_dead_write_vars.c \
|
2018-07-24 03:16:56 +01:00
|
|
|
nir/nir_opt_find_array_copies.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_gcm.c \
|
2017-12-28 21:06:28 +00:00
|
|
|
nir/nir_opt_idiv_const.c \
|
2016-12-19 21:11:43 +00:00
|
|
|
nir/nir_opt_if.c \
|
2017-06-22 20:13:25 +01:00
|
|
|
nir/nir_opt_intrinsics.c \
|
2016-09-15 06:49:57 +01:00
|
|
|
nir/nir_opt_loop_unroll.c \
|
2018-06-29 03:16:58 +01:00
|
|
|
nir/nir_opt_large_constants.c \
|
2016-08-08 21:57:29 +01:00
|
|
|
nir/nir_opt_move_comparisons.c \
|
2018-01-26 11:38:57 +00:00
|
|
|
nir/nir_opt_move_load_ubo.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_peephole_select.c \
|
nir: Rematerialize compare instructions
On some architectures, Boolean values used to control conditional
branches or condtional selection must be propagated into a flag. This
generally means that a stored Boolean value must be compared with zero.
Rather than force the generation of extra compares with zero, re-emit
the original comparison instruction. This can save register pressure by
not needing to store the Boolean value.
There are several possible ares for future improvement to this pass:
1. Be more conservative. If both sources to the comparison instruction
are non-constants, it may be better for register pressure to emit the
extra compare. The current shader-db results on Intel GPUs (next
commit) lead me to believe that this is not currently a problem.
2. Be less conservative. Currently the pass requires that all users of
the comparison match the pattern. The idea is that after the pass is
complete, no instruction will use the resulting Boolean value. The only
uses will be of the flag value. It may be beneficial to relax this
requirement in some cases.
3. Be less conservative. Also try to rematerialize comparisons used for
discard_if intrinsics. After changing the way the Intel compiler
generates cod e for discard_if (see MR!935), I tried implementing this
already. The changes were pretty small. Instructions were helped in 19
shaders, but, overall, cycles were hurt. A commit "nir: Rematerialize
comparisons for nir_intrinsic_discard_if too" is on my fd.o cgit.
4. Copy the preceeding ALU instruction. If the comparison is a
comparison with zero, and it is the only user of a particular ALU
instruction (e.g., (a+b) != 0.0), it may be a further improvment to also
copy the preceeding ALU instruction. On Intel GPUs, this may enable
cmod propagation to make additional progress.
v2: Use much simpler method to get the prev_block for an if-statement.
Suggested by Tim.
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-05-20 19:22:12 +01:00
|
|
|
nir/nir_opt_rematerialize_compares.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_remove_phis.c \
|
2018-01-29 16:19:00 +00:00
|
|
|
nir/nir_opt_shrink_load.c \
|
2016-12-17 00:54:17 +00:00
|
|
|
nir/nir_opt_trivial_continues.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_opt_undef.c \
|
2015-11-15 01:26:47 +00:00
|
|
|
nir/nir_opt_vectorize.c \
|
2016-02-05 23:03:04 +00:00
|
|
|
nir/nir_phi_builder.c \
|
|
|
|
nir/nir_phi_builder.h \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_print.c \
|
2016-06-13 20:47:19 +01:00
|
|
|
nir/nir_propagate_invariant.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_remove_dead_variables.c \
|
2016-02-05 23:03:04 +00:00
|
|
|
nir/nir_repair_ssa.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_search.c \
|
|
|
|
nir/nir_search.h \
|
2016-06-04 00:18:40 +01:00
|
|
|
nir/nir_search_helpers.h \
|
2017-09-13 04:17:51 +01:00
|
|
|
nir/nir_serialize.c \
|
|
|
|
nir/nir_serialize.h \
|
2019-03-04 16:51:12 +00:00
|
|
|
nir/nir_strip.c \
|
2018-03-21 23:48:35 +00:00
|
|
|
nir/nir_split_per_member_structs.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_split_var_copies.c \
|
2018-07-24 18:08:06 +01:00
|
|
|
nir/nir_split_vars.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_sweep.c \
|
2016-08-29 01:02:34 +01:00
|
|
|
nir/nir_to_lcssa.c \
|
2016-01-18 10:54:03 +00:00
|
|
|
nir/nir_validate.c \
|
|
|
|
nir/nir_vla.h \
|
|
|
|
nir/nir_worklist.c \
|
2018-10-05 15:13:25 +01:00
|
|
|
nir/nir_worklist.h \
|
|
|
|
nir/nir_xfb_info.h
|
2016-02-05 23:03:04 +00:00
|
|
|
|
2017-07-17 20:31:06 +01:00
|
|
|
SPIRV_GENERATED_FILES = \
|
2017-12-06 06:31:02 +00:00
|
|
|
spirv/spirv_info.c \
|
|
|
|
spirv/vtn_gather_types.c
|
2017-07-17 20:31:06 +01:00
|
|
|
|
2016-02-05 23:03:04 +00:00
|
|
|
SPIRV_FILES = \
|
2018-03-19 12:08:32 +00:00
|
|
|
spirv/GLSL.ext.AMD.h \
|
2016-04-29 18:53:15 +01:00
|
|
|
spirv/GLSL.std.450.h \
|
2018-01-18 11:31:52 +00:00
|
|
|
spirv/gl_spirv.c \
|
2016-04-14 18:28:45 +01:00
|
|
|
spirv/nir_spirv.h \
|
2018-07-12 14:02:27 +01:00
|
|
|
spirv/OpenCL.std.h \
|
2016-04-29 18:53:15 +01:00
|
|
|
spirv/spirv.h \
|
2016-06-02 22:06:30 +01:00
|
|
|
spirv/spirv_info.h \
|
2016-04-14 18:28:45 +01:00
|
|
|
spirv/spirv_to_nir.c \
|
|
|
|
spirv/vtn_alu.c \
|
2018-03-07 23:37:52 +00:00
|
|
|
spirv/vtn_amd.c \
|
2016-04-14 18:28:45 +01:00
|
|
|
spirv/vtn_cfg.c \
|
|
|
|
spirv/vtn_glsl450.c \
|
2018-07-12 14:02:27 +01:00
|
|
|
spirv/vtn_opencl.c \
|
2016-04-14 18:28:45 +01:00
|
|
|
spirv/vtn_private.h \
|
2017-04-28 12:45:50 +01:00
|
|
|
spirv/vtn_subgroup.c \
|
2016-04-14 18:28:45 +01:00
|
|
|
spirv/vtn_variables.c
|