diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-01 20:32:47 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-01 21:05:22 +0300 |
commit | f39ade9e00fc24be6f45b33b391b3d6bfa6fee9f (patch) | |
tree | e7b2b0e3a9f5639e7f9872749ebdae454639228f /source/blender/gpu/intern | |
parent | 9505af72d4be79cb0c1ce1678db2e392ba74804d (diff) |
GPUShader: Rename createInfo storage Qualifiers
Using opt-in instead of opt-out to make code easier to read.
Add combined flag enum.
Making restrict an inverse flag option because it is so rare to
use it.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.hh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index e68f9929591..736a8ed0590 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -130,10 +130,13 @@ enum class ImageType { /* Storage qualifiers. */ enum class Qualifier { - RESTRICT = (1 << 0), - READ_ONLY = (1 << 1), - WRITE_ONLY = (1 << 2), - QUALIFIER_MAX = (WRITE_ONLY << 1) - 1, + /** Restrict flag is set by default. Unless specified otherwise. */ + NO_RESTRICT = (1 << 0), + READ = (1 << 1), + WRITE = (1 << 2), + /** Shorthand version of combined flags. */ + READ_WRITE = READ | WRITE, + QUALIFIER_MAX = (WRITE << 1) - 1, }; ENUM_OPERATORS(Qualifier, Qualifier::QUALIFIER_MAX); |