diff options
Diffstat (limited to 'video/out/opengl/shader_cache.h')
-rw-r--r-- | video/out/opengl/shader_cache.h | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/video/out/opengl/shader_cache.h b/video/out/opengl/shader_cache.h index 8b3bd15735..c4fcefc391 100644 --- a/video/out/opengl/shader_cache.h +++ b/video/out/opengl/shader_cache.h @@ -1,13 +1,15 @@ #pragma once -#include "common.h" -#include "gl_utils.h" +#include "common/common.h" #include "misc/bstr.h" #include "ra.h" +struct mp_log; +struct mpv_global; struct gl_shader_cache; -struct gl_shader_cache *gl_sc_create(GL *gl, struct mp_log *log); +struct gl_shader_cache *gl_sc_create(struct ra *ra, struct mpv_global *global, + struct mp_log *log); void gl_sc_destroy(struct gl_shader_cache *sc); bool gl_sc_error_state(struct gl_shader_cache *sc); void gl_sc_reset_error(struct gl_shader_cache *sc); @@ -20,32 +22,32 @@ void gl_sc_haddf(struct gl_shader_cache *sc, const char *textf, ...) void gl_sc_hadd_bstr(struct gl_shader_cache *sc, struct bstr text); void gl_sc_paddf(struct gl_shader_cache *sc, const char *textf, ...) PRINTF_ATTRIBUTE(2, 3); -void gl_sc_uniform_tex(struct gl_shader_cache *sc, char *name, GLenum target, - GLuint texture); void gl_sc_uniform_texture(struct gl_shader_cache *sc, char *name, struct ra_tex *tex); -void gl_sc_uniform_tex_ui(struct gl_shader_cache *sc, char *name, GLuint texture); -void gl_sc_uniform_image2D(struct gl_shader_cache *sc, const char *name, - GLuint texture, GLuint iformat, GLenum access); -void gl_sc_ssbo(struct gl_shader_cache *sc, char *name, GLuint ssbo, +void gl_sc_uniform_image2D_wo(struct gl_shader_cache *sc, const char *name, + struct ra_tex *tex); +void gl_sc_ssbo(struct gl_shader_cache *sc, char *name, int gl_ssbo, char *format, ...) PRINTF_ATTRIBUTE(4, 5); -void gl_sc_uniform_f(struct gl_shader_cache *sc, char *name, GLfloat f); -void gl_sc_uniform_i(struct gl_shader_cache *sc, char *name, GLint f); -void gl_sc_uniform_vec2(struct gl_shader_cache *sc, char *name, GLfloat f[2]); -void gl_sc_uniform_vec3(struct gl_shader_cache *sc, char *name, GLfloat f[3]); +void gl_sc_uniform_f(struct gl_shader_cache *sc, char *name, float f); +void gl_sc_uniform_i(struct gl_shader_cache *sc, char *name, int f); +void gl_sc_uniform_vec2(struct gl_shader_cache *sc, char *name, float f[2]); +void gl_sc_uniform_vec3(struct gl_shader_cache *sc, char *name, float f[3]); void gl_sc_uniform_mat2(struct gl_shader_cache *sc, char *name, - bool transpose, GLfloat *v); + bool transpose, float *v); void gl_sc_uniform_mat3(struct gl_shader_cache *sc, char *name, - bool transpose, GLfloat *v); + bool transpose, float *v); void gl_sc_set_vertex_format(struct gl_shader_cache *sc, - const struct gl_vao_entry *entries, - size_t vertex_size); + const struct ra_renderpass_input *vertex_attribs, + int vertex_stride); +void gl_sc_blend(struct gl_shader_cache *sc, + enum ra_blend blend_src_rgb, + enum ra_blend blend_dst_rgb, + enum ra_blend blend_src_alpha, + enum ra_blend blend_dst_alpha); void gl_sc_enable_extension(struct gl_shader_cache *sc, char *name); -struct mp_pass_perf gl_sc_generate(struct gl_shader_cache *sc, GLenum type); -void gl_sc_draw_data(struct gl_shader_cache *sc, GLenum prim, void *ptr, - size_t num); -void gl_sc_reset(struct gl_shader_cache *sc); -struct mpv_global; -void gl_sc_set_cache_dir(struct gl_shader_cache *sc, struct mpv_global *global, - const char *dir); - +struct mp_pass_perf gl_sc_dispatch_draw(struct gl_shader_cache *sc, + struct ra_tex *target, + void *ptr, size_t num); +struct mp_pass_perf gl_sc_dispatch_compute(struct gl_shader_cache *sc, + int w, int h, int d); +void gl_sc_set_cache_dir(struct gl_shader_cache *sc, const char *dir); |