Fix T80160: Workbench shadows are broken
In recent refactoring {a9f2ebb21508} an issue was introduced that the opengl rasterizer would be disabled when only writing to a stencil buffer. This fix adds stencil writing to the write mask and set it. This makes the write map not evaluate to GPU_WRITE_NONE and the rasterizer will be enabled in `GLStateManager::set_write_mask`. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8743
This commit is contained in:
parent
df8e2c76c9
commit
3198fec1fe
|
@ -99,6 +99,9 @@ void drw_state_set(DRWState state)
|
|||
if (state & DRW_STATE_WRITE_COLOR) {
|
||||
write_mask |= GPU_WRITE_COLOR;
|
||||
}
|
||||
if (state & DRW_STATE_WRITE_STENCIL_ENABLED) {
|
||||
write_mask |= GPU_WRITE_STENCIL;
|
||||
}
|
||||
|
||||
switch (state & (DRW_STATE_CULL_BACK | DRW_STATE_CULL_FRONT)) {
|
||||
case DRW_STATE_CULL_BACK:
|
||||
|
|
|
@ -29,6 +29,7 @@ typedef enum eGPUWriteMask {
|
|||
GPU_WRITE_BLUE = (1 << 2),
|
||||
GPU_WRITE_ALPHA = (1 << 3),
|
||||
GPU_WRITE_DEPTH = (1 << 4),
|
||||
GPU_WRITE_STENCIL = (1 << 5),
|
||||
GPU_WRITE_COLOR = (GPU_WRITE_RED | GPU_WRITE_GREEN | GPU_WRITE_BLUE | GPU_WRITE_ALPHA),
|
||||
} eGPUWriteMask;
|
||||
|
||||
|
|
Loading…
Reference in New Issue