• 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         bool do_allocate_reserved_registers() override;
19         bool emit_intrinsic_instruction_override(nir_intrinsic_instr* instr) override;
20         bool emit_load_tess_coord(nir_intrinsic_instr* instr);
21         bool load_tess_z_coord(nir_intrinsic_instr* instr);
22 
23         bool do_process_inputs(nir_variable *input) override;
24         bool do_process_outputs(nir_variable *output) override;
do_emit_load_deref(const nir_variable * in_var,nir_intrinsic_instr * instr)25         bool do_emit_load_deref(const nir_variable *in_var, nir_intrinsic_instr* instr) override { return true;}
26         bool do_emit_store_deref(const nir_variable *out_var, nir_intrinsic_instr* instr) override;
27         void do_finalize() override;
28 
29 
30         unsigned m_reserved_registers;
31         PValue m_tess_coord[3];
32         PValue m_rel_patch_id;
33         PValue m_primitive_id;
34 
35         std::unique_ptr<VertexStageExportBase> m_export_processor;
36         const r600_shader_key& m_key;
37 };
38 
39 
40 }
41 
42 #endif // TEVALSHADERFROMNIR_H
43