Commit 6c90ebb0 by Geoff Lang Committed by Commit Bot

glTexStorage3D: Disallow compressed formats on GL_TEXTURE_3D targets.

GLES 3.0.4 p147: "If internalformat is an ETC2/EAC format, CompressedTexImage3D will generate an INVALID_OPERATION error if target is not TEXTURE_2D_ARRAY." This matches the validation of glTexImage3D. TEST=conformance2/textures/misc/tex-storage-compressed-formats.html BUG=chromium:983142 Change-Id: Ifc4ea9503182c43de7e58c4b45b59bb03ae2f901 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698648Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 943fe34e
...@@ -1157,6 +1157,12 @@ bool ValidateES3TexStorageParametersBase(Context *context, ...@@ -1157,6 +1157,12 @@ bool ValidateES3TexStorageParametersBase(Context *context,
return false; return false;
} }
if (formatInfo.compressed && target == TextureType::_3D)
{
context->validationError(GL_INVALID_OPERATION, kInvalidTextureTarget);
return false;
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment