mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
mesa: relax EXT_texture_integer validation
This updates mesa to avoid throwing an error if an attached fbo wont actually be drawn into. Fixes:705978e283("mesa: do integer FB / shader validation check in _mesa_valid_to_render()") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13144 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34949> (cherry picked from commit1d4ebe79b5)
This commit is contained in:
parent
349353dde6
commit
ab1edf76ed
2 changed files with 11 additions and 3 deletions
|
|
@ -134,7 +134,7 @@
|
|||
"description": "mesa: relax EXT_texture_integer validation",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "705978e2831eb8b8bb23bd11ee08ce51d9b2915c",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -155,8 +155,16 @@ _mesa_update_valid_to_render_state(struct gl_context *ctx)
|
|||
/* If drawing to integer-valued color buffers, there must be an
|
||||
* active fragment shader (GL_EXT_texture_integer).
|
||||
*/
|
||||
if (ctx->DrawBuffer->_IntegerBuffers)
|
||||
return;
|
||||
if (ctx->DrawBuffer->_IntegerBuffers) {
|
||||
for (int i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
|
||||
gl_buffer_index buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
|
||||
if (buf < BUFFER_COLOR0)
|
||||
continue;
|
||||
|
||||
if (ctx->DrawBuffer->_IntegerBuffers & (1 << (buf - BUFFER_COLOR0)))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue