-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: BGFX_TEXTURE_MSAA_SAMPLE and msaa sampling bugs with gl #3351
base: master
Are you sure you want to change the base?
Changes from all commits
96d6e3b
a4d7a4d
ef4bc18
e0b73d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4535,13 +4535,13 @@ namespace bgfx | |
++depth; | ||
|
||
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. | ||
// if BGFX_TEXTURE_RT_MSAA_X2 or greater than either BGFX_TEXTURE_RT_WRITE_ONLY or BGFX_TEXTURE_MSAA_SAMPLE is required | ||
// if BGFX_TEXTURE_RT with no MSSA then this is not required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
(1 == ((tr.m_flags & BGFX_TEXTURE_RT_MSAA_MASK) >> BGFX_TEXTURE_RT_MSAA_SHIFT)) | ||
|| (0 != (tr.m_flags & BGFX_TEXTURE_RT_WRITE_ONLY)) | ||
|| (0 != (tr.m_flags & (BGFX_TEXTURE_RT_WRITE_ONLY | BGFX_TEXTURE_MSAA_SAMPLE))) | ||
, _err | ||
, 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 either `BGFX_TEXTURE_RT_WRITE_ONLY` or `BGFX_TEXTURE_MSAA_SAMPLE` flag." | ||
, "Attachment %d, texture flags 0x%016" PRIx64 "." | ||
, ii | ||
, tr.m_flags | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1479,7 +1479,7 @@ namespace bgfx { namespace gl | |
, _internalFormat | ||
, _width | ||
, _height | ||
, false | ||
, true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When we have multiple |
||
); | ||
} | ||
else | ||
|
@@ -7101,7 +7101,7 @@ namespace bgfx { namespace gl | |
{ | ||
const TextureGL& texture = s_renderGL->m_textures[at.handle.idx]; | ||
|
||
if (0 != texture.m_id) | ||
if (0 != texture.m_rbo && 0 != texture.m_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't try to resolve multisample textures too, ensure it also has an rbo! |
||
{ | ||
|
||
GLenum attachment = GL_INVALID_ENUM; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We handle the
ir_txf_ms
case a few lines below, so this lead to a duplicate last parameter withtexelFetch(Sampler2DMS, ...)