mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
mesa: Fix inconsistent multisampled CopyTexImage checks
According to the GL_EXT_multisampled_render_to_texture specification, copy operations should be allowed when the extension is supported. Previously, glCopyTexImage* would unconditionally fail with GL_INVALID_OPERATION when copying from any multisampled framebuffer (samples > 0), even when using render-to-texture attachments. Fixes:d7b9da2673("mesa/main: fix artifacts with GL_EXT_multisampled_render_to_texture") Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com> (cherry picked from commit2e340d63d2) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
This commit is contained in:
parent
d6ef5d4882
commit
ecdb0c153c
2 changed files with 7 additions and 3 deletions
|
|
@ -924,7 +924,7 @@
|
|||
"description": "mesa: Fix inconsistent multisampled CopyTexImage checks",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d7b9da2673a8aef49f83dc043aae6ff4fcb212a3",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2380,9 +2380,13 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
|
|||
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* From the GL_EXT_multisampled_render_to_texture spec:
|
||||
* Operations are allowed when the extension is supported.
|
||||
*/
|
||||
if (!ctx->st_opts->allow_multisampled_copyteximage &&
|
||||
ctx->ReadBuffer->Visual.samples > 0) {
|
||||
ctx->ReadBuffer->Visual.samples > 0 &&
|
||||
!_mesa_has_rtt_samples(ctx->ReadBuffer)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyTexImage%dD(multisample FBO)", dimensions);
|
||||
return GL_TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue