mesa/main: relax alignment check when ARB_sparse_texture2 available

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14362>
This commit is contained in:
Qiang Yu 2021-12-30 15:52:17 +08:00
parent 6da5136c66
commit d44f725ea6
1 changed files with 3 additions and 1 deletions

View File

@ -387,7 +387,9 @@ sparse_texture_error_check(struct gl_context *ctx, GLuint dims,
}
}
if (width % px || height % py || depth % pz) {
/* ARB_sparse_texture2 allow non-page-aligned base texture size. */
if (!_mesa_has_ARB_sparse_texture2(ctx) &&
(width % px || height % py || depth % pz)) {
_mesa_error(ctx, GL_INVALID_VALUE, "glTex%sStorage%uD(sparse page size)",
suffix, dims);
return GL_TRUE;