diff options
author | Niklas Haas <git@haasn.xyz> | 2017-08-26 05:39:53 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-08-27 14:36:00 +0200 |
commit | 7684fda6ac69265ca21cdf2f1d8ae8483bb36607 (patch) | |
tree | 75aa03a8f3e106a4481bc05585a2ad4a99f10ec5 /video/out/opengl/ra.h | |
parent | 45bae90f4d98c64f01ec2fe419a6aa6c068331b2 (diff) | |
download | mpv-7684fda6ac69265ca21cdf2f1d8ae8483bb36607.tar.bz2 mpv-7684fda6ac69265ca21cdf2f1d8ae8483bb36607.tar.xz |
vo_opengl: refactor shader_cache binding
There's no reason to be needlessly wasteful with our binding points
here. Just add a CAP for it.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r-- | video/out/opengl/ra.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h index f09fa6c861..6d77255180 100644 --- a/video/out/opengl/ra.h +++ b/video/out/opengl/ra.h @@ -45,6 +45,7 @@ enum { RA_CAP_DIRECT_UPLOAD = 1 << 4, // supports tex_upload without ra_buf RA_CAP_BUF_RW = 1 << 5, // supports RA_VARTYPE_BUF_RW RA_CAP_NESTED_ARRAY = 1 << 6, // supports nested arrays + RA_CAP_SHARED_BINDING = 1 << 7, // sampler/image/buffer namespaces are disjoint }; enum ra_ctype { @@ -174,6 +175,7 @@ enum ra_vartype { // ra_tex.params.storage_dst must be true RA_VARTYPE_BYTE_UNORM, // C: uint8_t, GLSL: int, vec* (vertex data only) RA_VARTYPE_BUF_RW, // C: ra_buf*, GLSL: buffer block + RA_VARTYPE_COUNT }; // Represents a uniform, texture input parameter, and similar things. @@ -189,6 +191,8 @@ struct ra_renderpass_input { // RA_VARTYPE_IMG_W: image unit // RA_VARTYPE_BUF_* buffer binding point // Other uniforms: unused + // If RA_CAP_SHARED_BINDING is set, these may only be unique per input type. + // Otherwise, these must be unique for all input values. int binding; }; |