зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1670232 - swgl: Add a get_name() function to ProgramImpl. r=lsalzman
This is very useful when used when printing timings of draw calls. Differential Revision: https://phabricator.services.mozilla.com/D93115
This commit is contained in:
Родитель
d5e4596a8f
Коммит
6583e56861
|
@ -250,6 +250,7 @@ fn translate_shader(
|
|||
write!(state, " return this;\n}}\n");
|
||||
write!(state, "FragmentShaderImpl* get_fragment_shader() override {{\n");
|
||||
write!(state, " return this;\n}}\n");
|
||||
write!(state, "const char* get_name() const override {{ return \"{}\"; }}\n", name);
|
||||
write!(state, "static ProgramImpl* loader() {{ return new {}_program; }}\n", name);
|
||||
write!(state, "}};\n\n");
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ struct ProgramImpl {
|
|||
virtual size_t interpolants_size() const = 0;
|
||||
virtual VertexShaderImpl* get_vertex_shader() = 0;
|
||||
virtual FragmentShaderImpl* get_fragment_shader() = 0;
|
||||
virtual const char* get_name() const = 0;
|
||||
};
|
||||
|
||||
typedef ProgramImpl* (*ProgramLoader)();
|
||||
|
|
Загрузка…
Ссылка в новой задаче