mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
mesa: Fix multiview attachment completeness check
Fix the FBO attachment completeness test to ensure that multiview attachments have all views referring to layers in range of the underlying texture. The OVR_multiview spec states: Add the following to the list of conditions required for framebuffer attachment completeness in section 9.4.1 (Framebuffer Attachment Completeness): "If <image> is a two-dimensional array and the attachment is multiview, all the selected layers, [<baseViewIndex>, <baseViewIndex> + <numViews>), are less than the layer count of the texture." Fixes:328c29d600("mesa,glsl,gallium: add GL_OVR_multiview") Signed-off-by: James Hogan <james@albanarts.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346> (cherry picked from commit39491da1b6)
This commit is contained in:
parent
fdb7f38da0
commit
def5f68269
2 changed files with 6 additions and 1 deletions
|
|
@ -74,7 +74,7 @@
|
|||
"description": "mesa: Fix multiview attachment completeness check",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "328c29d6007ed7677d5c5307bd6997d84a32104a",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1000,6 +1000,11 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
|
|||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
if (att->Zoffset + att->NumViews > texImage->Depth) {
|
||||
att_incomplete("bad 2D-array view range");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
if (att->Zoffset >= texImage->Depth) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue