Talvos  0.1
SPIR-V interpreter and dynamic analysis framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EntryPoint.h
Go to the documentation of this file.
1 // Copyright (c) 2018 the Talvos developers. All rights reserved.
2 //
3 // This file is distributed under a three-clause BSD license. For full license
4 // terms please see the LICENSE file distributed with this source code.
5 
8 
9 #ifndef TALVOS_ENTRYPOINT_H
10 #define TALVOS_ENTRYPOINT_H
11 
12 #include <string>
13 #include <vector>
14 
15 namespace talvos
16 {
17 
18 class Function;
19 class Variable;
20 
22 typedef std::vector<const Variable *> VariableList;
23 
26 {
27 public:
29  EntryPoint(uint32_t Id, std::string Name, uint32_t ExecutionModel,
30  const Function *Func, const VariableList &Variables)
31  : Id(Id), Name(Name), ExecutionModel(ExecutionModel), Func(Func),
32  Variables(Variables){};
33 
35  uint32_t getExecutionModel() const { return ExecutionModel; }
36 
38  const Function *getFunction() const { return Func; }
39 
41  uint32_t getId() const { return Id; }
42 
44  const std::string &getName() const { return Name; }
45 
47  const VariableList &getVariables() const { return Variables; }
48 
49 private:
51  uint32_t Id;
52 
54  std::string Name;
55 
57  uint32_t ExecutionModel;
58 
60  const Function *Func;
61 
64 };
65 
66 } // namespace talvos
67 
68 #endif
This class represents a module-scope variable declaration.
Definition: Variable.h:21
std::vector< const Variable * > VariableList
A list of module scope variables.
Definition: EntryPoint.h:19
const Function * getFunction() const
Returns the function specified by this entry point.
Definition: EntryPoint.h:38
uint32_t getId() const
Returns the SPIR-V result ID of this entry point.
Definition: EntryPoint.h:41
This class represents a function in a SPIR-V Module.
Definition: Function.h:23
std::string Name
The name of the entry point.
Definition: EntryPoint.h:54
EntryPoint(uint32_t Id, std::string Name, uint32_t ExecutionModel, const Function *Func, const VariableList &Variables)
Create an EntryPoint.
Definition: EntryPoint.h:29
const std::string & getName() const
Returns the name of this entry point.
Definition: EntryPoint.h:44
VariableList Variables
List of input/output variables used.
Definition: EntryPoint.h:63
const VariableList & getVariables() const
Returns the input/output variables used by this entry point.
Definition: EntryPoint.h:47
uint32_t Id
The SPIR-V result ID.
Definition: EntryPoint.h:51
uint32_t ExecutionModel
The shader execution mode.
Definition: EntryPoint.h:57
const Function * Func
The function that will be used.
Definition: EntryPoint.h:60
uint32_t getExecutionModel() const
Returns the shader execution model of this entry point.
Definition: EntryPoint.h:35
This class represents a shader entry point.
Definition: EntryPoint.h:25