diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-06-04 14:55:25 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-06-04 15:17:06 +0300 |
commit | 5837de6879f424a0a26ad787b89f1ec98c91c3c6 (patch) | |
tree | 6db0a29b93aa9149424ea494410dd07a6b6f5da1 /source/blender/draw | |
parent | 7534bbfa344f47700a04e2a8c4dcdcd0310ea9f2 (diff) |
Cleanup: DRW: Add comment and remove bitfields.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 733711a06da..6cae2a4f9f6 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -316,10 +316,10 @@ struct DRWUniform { /* DRW_UNIFORM_INT_COPY */ int ivalue[4]; }; - int location; /* Use as binding point for textures and ubos. */ - uint32_t type : 5; /* DRWUniformType */ - uint32_t length : 5; /* cannot be more than 16 */ - uint32_t arraysize : 5; /* cannot be more than 16 too */ + int location; /* Uniform location or binding point for textures and ubos. */ + uint8_t type; /* DRWUniformType */ + uint8_t length; /* Length of vector types. */ + uint8_t arraysize; /* Array size of scalar/vector types. */ }; struct DRWShadingGroup { @@ -334,10 +334,13 @@ struct DRWShadingGroup { } cmd; union { + /* This struct is used during cache populate. */ struct { int objectinfo; /* Equal to 1 if the shader needs obinfos. */ DRWResourceHandle pass_handle; /* Memblock key to parent pass. */ }; + /* This struct is used after cache populate if using the Z sorting. + * It will not conflict with the above struct. */ struct { float distance; /* Distance from camera. */ uint original_index; /* Original position inside the shgroup list. */ |