Fix Opengl Error with glBlitFramebuffer
This was caused by 93936b8643
From GL spec :
GL_INVALID_OPERATION is generated if mask contains GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT and the source and destination depth and stencil formats do not match.
So blitting framebuffer with depth or stencil require the SAME FORMAT.
This commit is contained in:
@@ -532,9 +532,11 @@ void GPU_framebuffer_blit(
|
||||
|
||||
if (use_depth) {
|
||||
BLI_assert(GPU_texture_depth(read_tex) && GPU_texture_depth(write_tex));
|
||||
BLI_assert(GPU_texture_format(read_tex) == GPU_texture_format(write_tex));
|
||||
}
|
||||
else if (use_stencil) {
|
||||
BLI_assert(GPU_texture_stencil(read_tex) && GPU_texture_stencil(write_tex));
|
||||
BLI_assert(GPU_texture_format(read_tex) == GPU_texture_format(write_tex));
|
||||
}
|
||||
|
||||
/* read from multi-sample buffer */
|
||||
|
||||
Reference in New Issue
Block a user