From 5837de6879f424a0a26ad787b89f1ec98c91c3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 4 Jun 2020 13:55:25 +0200 Subject: Cleanup: DRW: Add comment and remove bitfields. --- source/blender/draw/intern/draw_manager.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/draw/intern/draw_manager.h') 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. */ -- cgit v1.2.3