• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef SFN_TEST_SHADERS_H
2 #define SFN_TEST_SHADERS_H
3 #include <gtest/gtest.h>
4 
5 namespace r600 {
6 
7 class Shader;
8 
9 extern const char *red_triangle_fs_nir;
10 extern const char *red_triangle_fs_expect_from_nir;
11 extern const char *red_triangle_fs_expect_from_nir_dce;
12 
13 extern const char *add_add_1_nir;
14 extern const char *add_add_1_expect_from_nir;
15 extern const char *add_add_1_expect_from_nir_copy_prop_fwd;
16 extern const char *add_add_1_expect_from_nir_copy_prop_fwd_dce;
17 extern const char *add_add_1_expect_from_nir_copy_prop_fwd_dce_bwd;
18 
19 extern const char *basic_interpolation_nir;
20 extern const char *basic_interpolation_orig;
21 extern const char *basic_interpolation_translated_1;
22 extern const char *basic_interpolation_expect_from_nir;
23 extern const char *basic_interpolation_expect_from_nir_opt;
24 extern const char *basic_interpolation_expect_from_nir_sched;
25 
26 extern const char *glxgears_vs2_nir;
27 extern const char *glxgears_vs2_from_nir_expect;
28 extern const char *glxgears_vs2_from_nir_expect_optimized;
29 
30 extern const char *dot4_pre;
31 extern const char *dot4_copy_prop_dce;
32 
33 extern const char *glxgears_vs2_from_nir_expect_cayman;
34 extern const char *basic_interpolation_orig_cayman;
35 extern const char *basic_interpolation_expect_from_nir_sched_cayman;
36 extern const char *basic_interpolation_expect_opt_sched_cayman;
37 
38 extern const char *vs_nexted_loop_nir;
39 extern const char *vs_nexted_loop_from_nir_expect;
40 extern const char *vs_nexted_loop_from_nir_expect_opt;
41 
42 extern const char *shader_with_local_array_nir;
43 extern const char *shader_with_local_array_expect;
44 
45 extern const char *test_schedule_group;
46 extern const char *test_schedule_group_expect;
47 
48 extern const char *shader_with_bany_nir;
49 extern const char *shader_with_bany_expect_eg;
50 extern const char *shader_with_bany_expect_opt_sched_eg;
51 
52 extern const char *shader_copy_prop_dont_kill_double_use;
53 extern const char *shader_copy_prop_dont_kill_double_use_expect;
54 
55 extern const char *shader_with_dest_array;
56 extern const char *shader_with_dest_array_opt_expect;
57 extern const char *shader_with_dest_array_opt_scheduled;
58 
59 extern const char *shader_with_dest_array2;
60 extern const char *shader_with_dest_array2_scheduled;
61 
62 extern const char *shader_with_dest_array2_scheduled_ra;
63 
64 extern const char *shader_group_chan_pin_to_combine;
65 extern const char *shader_group_chan_pin_combined;
66 
67 extern const char *shader_group_chan_pin_combined_sheduled;
68 extern const char *shader_group_chan_pin_combined_sheduled_ra;
69 
70 extern const char *shader_group_chan_pin_to_combine_2;
71 extern const char *shader_group_chan_pin_to_combine_2_opt;
72 
73 extern const char *fs_with_loop_multislot_reuse;
74 extern const char *fs_with_loop_multislot_reuse_scheduled;
75 
76 extern const char *gs_abs_float_nir;
77 extern const char *gs_abs_float_expect;
78 
79 extern const char *vtx_for_tcs_nir;
80 extern const char *vtx_for_tcs_from_nir_expect;
81 
82 extern const char *tcs_nir;
83 extern const char *tcs_from_nir_expect;
84 
85 extern const char *tes_nir;
86 extern const char *tes_from_nir_expect;
87 
88 extern const char *tes_pre_op;
89 extern const char *tes_optimized;
90 extern const char *tes_optimized_pre_sched;
91 extern const char *tes_optimized_sched;
92 
93 extern const char *vtx_for_tcs_inp;
94 extern const char *vtx_for_tcs_opt;
95 extern const char *vtx_for_tcs_pre_sched;
96 extern const char *vtx_for_tcs_sched;
97 
98 class TestShader : public ::testing::Test {
99 
100    void SetUp() override;
101    void TearDown() override;
102 
103    virtual void SetUpMore();
104    virtual void TearDownMore();
105 
106 
107 protected:
108    Shader *from_string(const std::string& s);
109 };
110 
111 
112 }
113 
114 
115 #endif // SFN_TEST_SHADERS_H
116