mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 11:10:10 +01:00
mesa: work around failed assertion for GL_RGBA16_SNORM accum buffer
We use this format to represent the accum buffer. No snorm texture sampling or rendering takes place. Fixes failed assertion with swrast and any app using the accum buffer (and glxinfo).
This commit is contained in:
parent
32a11e5324
commit
fdb04c0384
1 changed files with 14 additions and 1 deletions
|
|
@ -1122,7 +1122,20 @@ _mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *
|
|||
rb->Width = width;
|
||||
rb->Height = height;
|
||||
rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
|
||||
ASSERT(rb->_BaseFormat);
|
||||
|
||||
if (rb->Name == 0 &&
|
||||
internalFormat == GL_RGBA16_SNORM &&
|
||||
rb->_BaseFormat == 0) {
|
||||
/* NOTE: This is a special case just for accumulation buffers.
|
||||
* This is a very limited use case- there's no snorm texturing or
|
||||
* rendering going on.
|
||||
*/
|
||||
rb->_BaseFormat = GL_RGBA;
|
||||
}
|
||||
else {
|
||||
/* the internalFormat should have been error checked long ago */
|
||||
ASSERT(rb->_BaseFormat);
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue