blob: 576a52c1835ea6ba40ac4b13d57455310c33a242 [file] [log] [blame]
Geoff Langd08f3b32016-09-23 15:56:30 -04001//
2// Copyright 2016 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6// ProgramNULL.h:
7// Defines the class interface for ProgramNULL, implementing ProgramImpl.
8//
9
10#ifndef LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_
11#define LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_
12
13#include "libANGLE/renderer/ProgramImpl.h"
14
15namespace rx
16{
17
18class ProgramNULL : public ProgramImpl
19{
20 public:
21 ProgramNULL(const gl::ProgramState &state);
22 ~ProgramNULL() override;
23
24 LinkResult load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) override;
25 gl::Error save(gl::BinaryOutputStream *stream) override;
26 void setBinaryRetrievableHint(bool retrievable) override;
27
28 LinkResult link(const gl::ContextState &data, gl::InfoLog &infoLog) override;
29 GLboolean validate(const gl::Caps &caps, gl::InfoLog *infoLog) override;
30
31 void setUniform1fv(GLint location, GLsizei count, const GLfloat *v) override;
32 void setUniform2fv(GLint location, GLsizei count, const GLfloat *v) override;
33 void setUniform3fv(GLint location, GLsizei count, const GLfloat *v) override;
34 void setUniform4fv(GLint location, GLsizei count, const GLfloat *v) override;
35 void setUniform1iv(GLint location, GLsizei count, const GLint *v) override;
36 void setUniform2iv(GLint location, GLsizei count, const GLint *v) override;
37 void setUniform3iv(GLint location, GLsizei count, const GLint *v) override;
38 void setUniform4iv(GLint location, GLsizei count, const GLint *v) override;
39 void setUniform1uiv(GLint location, GLsizei count, const GLuint *v) override;
40 void setUniform2uiv(GLint location, GLsizei count, const GLuint *v) override;
41 void setUniform3uiv(GLint location, GLsizei count, const GLuint *v) override;
42 void setUniform4uiv(GLint location, GLsizei count, const GLuint *v) override;
43 void setUniformMatrix2fv(GLint location,
44 GLsizei count,
45 GLboolean transpose,
46 const GLfloat *value) override;
47 void setUniformMatrix3fv(GLint location,
48 GLsizei count,
49 GLboolean transpose,
50 const GLfloat *value) override;
51 void setUniformMatrix4fv(GLint location,
52 GLsizei count,
53 GLboolean transpose,
54 const GLfloat *value) override;
55 void setUniformMatrix2x3fv(GLint location,
56 GLsizei count,
57 GLboolean transpose,
58 const GLfloat *value) override;
59 void setUniformMatrix3x2fv(GLint location,
60 GLsizei count,
61 GLboolean transpose,
62 const GLfloat *value) override;
63 void setUniformMatrix2x4fv(GLint location,
64 GLsizei count,
65 GLboolean transpose,
66 const GLfloat *value) override;
67 void setUniformMatrix4x2fv(GLint location,
68 GLsizei count,
69 GLboolean transpose,
70 const GLfloat *value) override;
71 void setUniformMatrix3x4fv(GLint location,
72 GLsizei count,
73 GLboolean transpose,
74 const GLfloat *value) override;
75 void setUniformMatrix4x3fv(GLint location,
76 GLsizei count,
77 GLboolean transpose,
78 const GLfloat *value) override;
79
80 // TODO: synchronize in syncState when dirty bits exist.
81 void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) override;
82
83 // May only be called after a successful link operation.
84 // Return false for inactive blocks.
85 bool getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const override;
86
87 // May only be called after a successful link operation.
88 // Returns false for inactive members.
89 bool getUniformBlockMemberInfo(const std::string &memberUniformName,
90 sh::BlockMemberInfo *memberInfoOut) const override;
91 // CHROMIUM_path_rendering
92 // Set parameters to control fragment shader input variable interpolation
93 void setPathFragmentInputGen(const std::string &inputName,
94 GLenum genMode,
95 GLint components,
96 const GLfloat *coeffs) override;
97};
98
99} // namespace rx
100
101#endif // LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_