|
@@ -4503,9 +4503,11 @@ namespace bgfx
|
|
|
{
|
|
{
|
|
|
++depth;
|
|
++depth;
|
|
|
|
|
|
|
|
- BGFX_ERROR_CHECK(true
|
|
|
|
|
- && 0 != (tr.m_flags & BGFX_TEXTURE_RT_MSAA_MASK)
|
|
|
|
|
- && 0 != (tr.m_flags & BGFX_TEXTURE_RT_WRITE_ONLY)
|
|
|
|
|
|
|
+ BGFX_ERROR_CHECK(
|
|
|
|
|
+ // if BGFX_TEXTURE_RT_MSAA_X2 or greater than BGFX_TEXTURE_RT_WRITE_ONLY is required
|
|
|
|
|
+ // if BGFX_TEXTURE_RT with no MSSA then WRITE_ONLY is not required.
|
|
|
|
|
+ (1 == ((tr.m_flags & BGFX_TEXTURE_RT_MSAA_MASK) >> BGFX_TEXTURE_RT_MSAA_SHIFT))
|
|
|
|
|
+ || (0 != (tr.m_flags & BGFX_TEXTURE_RT_WRITE_ONLY))
|
|
|
, _err
|
|
, _err
|
|
|
, BGFX_ERROR_FRAME_BUFFER_VALIDATION
|
|
, BGFX_ERROR_FRAME_BUFFER_VALIDATION
|
|
|
, "Frame buffer depth MSAA texture cannot be resolved. It must be created with `BGFX_TEXTURE_RT_WRITE_ONLY` flag."
|
|
, "Frame buffer depth MSAA texture cannot be resolved. It must be created with `BGFX_TEXTURE_RT_WRITE_ONLY` flag."
|