mirror of
https://github.com/mpv-player/mpv
synced 2025-03-02 04:11:03 +00:00
vo_opengl: use the same type for cached and current uniform values
Slightly improvement over the previous commit.
This commit is contained in:
parent
5199c2ee3a
commit
0e1e4005fb
@ -526,29 +526,28 @@ enum uniform_type {
|
||||
UT_buffer,
|
||||
};
|
||||
|
||||
union uniform_val {
|
||||
GLfloat f[9];
|
||||
GLint i[4];
|
||||
struct {
|
||||
char* text;
|
||||
GLint binding;
|
||||
} buffer;
|
||||
};
|
||||
|
||||
struct sc_uniform {
|
||||
char *name;
|
||||
enum uniform_type type;
|
||||
const char *glsl_type;
|
||||
int size;
|
||||
GLint loc;
|
||||
union {
|
||||
GLfloat f[9];
|
||||
GLint i[4];
|
||||
struct {
|
||||
char* text;
|
||||
GLint binding;
|
||||
} buffer;
|
||||
} v;
|
||||
union uniform_val v;
|
||||
};
|
||||
|
||||
struct sc_entry {
|
||||
GLuint gl_shader;
|
||||
GLint uniform_locs[SC_UNIFORM_ENTRIES];
|
||||
union {
|
||||
GLfloat f[9];
|
||||
GLint i[4];
|
||||
} cached_v[SC_UNIFORM_ENTRIES];
|
||||
union uniform_val cached_v[SC_UNIFORM_ENTRIES];
|
||||
// the following fields define the shader's contents
|
||||
char *key; // vertex+frag shader (mangled)
|
||||
struct gl_vao *vao;
|
||||
|
Loading…
Reference in New Issue
Block a user