summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-26 05:33:00 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-27 14:36:00 +0200
commit45bae90f4d98c64f01ec2fe419a6aa6c068331b2 (patch)
treefeffd338887dd828212b64e3ab79f4c4bde256d5 /video/out/opengl/ra.h
parentf40717a66430c238fbe3fa28fc39a88d804bdc9c (diff)
downloadmpv-45bae90f4d98c64f01ec2fe419a6aa6c068331b2.tar.bz2
mpv-45bae90f4d98c64f01ec2fe419a6aa6c068331b2.tar.xz
vo_opengl: be explicit about IMG_RW
Both vulkan and opengl distinguish between rendering to an image and using an image as a storage attachment. So make this an explicit capability instead of lumping it in with render_dst. (That way we could support, for example, using an image as a storage attachment without requiring a framebuffer) The real reason for this change is that you can directly use the output FBO as a storage attachment on vulkan but you can't on opengl, which makes this param structly separate from render_dst.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index f2b41256db..f09fa6c861 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -90,6 +90,7 @@ struct ra_tex_params {
const struct ra_format *format;
bool render_src; // must be useable as source texture in a shader
bool render_dst; // must be useable as target texture in a shader
+ bool storage_dst; // must be usable as a storage image (RA_VARTYPE_IMG_W)
bool blit_src; // must be usable as a blit source
bool blit_dst; // must be usable as a blit destination
bool host_mutable; // texture may be updated with tex_upload
@@ -170,6 +171,7 @@ enum ra_vartype {
// ra_tex.params.render_src must be true
RA_VARTYPE_IMG_W, // C: ra_tex*, GLSL: various image types
// write-only (W) image for compute shaders
+ // 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
};