diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-19 18:10:18 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-19 18:13:53 +0300 |
commit | 1dafa87eb5ec355148e8cff86dd78e2727d34044 (patch) | |
tree | 7f251d452bf4a99c77e5bf1a6fa163433a5f1450 /source/blender/gpu/intern/gpu_state_private.hh | |
parent | fccb38cf19bac0f7cc5914cce724994dcddcafc1 (diff) |
GPUState: Fix signed / bitfield conversion leading to wrong enum value
This was creating drawing issues on windows builds.
Diffstat (limited to 'source/blender/gpu/intern/gpu_state_private.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_state_private.hh | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh index 1ba79c7c048..f325f035f28 100644 --- a/source/blender/gpu/intern/gpu_state_private.hh +++ b/source/blender/gpu/intern/gpu_state_private.hh @@ -35,13 +35,20 @@ namespace gpu { * Try to keep small to reduce validation time. */ union GPUState { struct { - eGPUWriteMask write_mask : 13; - eGPUBlend blend : 4; - eGPUFaceCullTest culling_test : 2; - eGPUDepthTest depth_test : 3; - eGPUStencilTest stencil_test : 3; - eGPUStencilOp stencil_op : 3; - eGPUProvokingVertex provoking_vert : 1; + /** eGPUWriteMask */ + uint32_t write_mask : 13; + /** eGPUBlend */ + uint32_t blend : 4; + /** eGPUFaceCullTest */ + uint32_t culling_test : 2; + /** eGPUDepthTest */ + uint32_t depth_test : 3; + /** eGPUStencilTest */ + uint32_t stencil_test : 3; + /** eGPUStencilOp */ + uint32_t stencil_op : 3; + /** eGPUProvokingVertex */ + uint32_t provoking_vert : 1; /** Enable bits. */ uint32_t logic_op_xor : 1; uint32_t invert_facing : 1; |