mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
mesa: Check views don't exceed GL_MAX_ARRAY_TEXTURE_LAYERS
The OVR_multiview spec specifies the INVALID_VALUE error to be generated by FramebufferTextureMultiviewOVR if: "- <texture> is a two-dimensional array texture and <baseViewIndex> + <numViews> is larger than the value of MAX_ARRAY_TEXTURE_LAYERS." Implement this in check_multiview_texture_target(), similar to the test in check_layer(). Fixes:328c29d600("mesa,glsl,gallium: add GL_OVR_multiview") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Signed-off-by: James Hogan <james@albanarts.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992> (cherry picked from commit60509e187f)
This commit is contained in:
parent
b0a3bb0d6d
commit
280d2fee72
2 changed files with 7 additions and 1 deletions
|
|
@ -944,7 +944,7 @@
|
|||
"description": "mesa: Check views don't exceed GL_MAX_ARRAY_TEXTURE_LAYERS",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "328c29d6007ed7677d5c5307bd6997d84a32104a",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3773,6 +3773,12 @@ check_multiview_texture_target(struct gl_context *ctx, GLuint texture, GLenum ta
|
|||
"%s baseViewIndex is less than 0)", caller);
|
||||
ret = false;
|
||||
}
|
||||
else if (baseViewIndex + numViews > ctx->Const.MaxArrayTextureLayers)
|
||||
{
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s baseViewIndex + numViews > GL_MAX_ARRAY_TEXTURE_LAYERS", caller);
|
||||
ret = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue