• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef TEVALSHADERFROMNIR_H
2 #define TEVALSHADERFROMNIR_H
3 
4 #include "sfn_shader_base.h"
5 #include "sfn_vertexstageexport.h"
6 
7 namespace r600 {
8 
9 class TEvalShaderFromNir : public VertexStage
10 {
11 public:
12 	TEvalShaderFromNir(r600_pipe_shader *sh, r600_pipe_shader_selector& sel,
13                            const r600_shader_key& key, r600_shader *gs_shader,
14                            enum chip_class chip_class);
15         bool scan_sysvalue_access(nir_instr *instr) override;
primitive_id()16         PValue primitive_id() override {return m_primitive_id;}
17      private:
18         void emit_shader_start() override;
19         bool do_allocate_reserved_registers() override;
20         bool emit_intrinsic_instruction_override(nir_intrinsic_instr* instr) override;
21         bool emit_load_tess_coord(nir_intrinsic_instr* instr);
22         bool load_tess_z_coord(nir_intrinsic_instr* instr);
23 
24         void do_finalize() override;
25 
26 
27         unsigned m_reserved_registers;
28         PValue m_tess_coord[3];
29         PValue m_rel_patch_id;
30         PValue m_primitive_id;
31 
32         std::unique_ptr<VertexStageExportBase> m_export_processor;
33         const r600_shader_key& m_key;
34 };
35 
36 
37 }
38 
39 #endif // TEVALSHADERFROMNIR_H
40