Commit a44d96dc by Alexey Knyazev Committed by Commit Bot

Apply compressed format workarounds to texStorage entrypoints

Bug: angleproject:4266 Change-Id: I70b3cdef35395b3a92bd460c9911b1ed963e0dcd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2038573 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent eb63016d
......@@ -751,8 +751,18 @@ TexStorageFormat GetTexStorageFormat(const FunctionsGL *functions,
GLenum internalFormat)
{
TexStorageFormat result;
result.internalFormat = GetNativeInternalFormat(functions, features,
gl::GetSizedInternalFormatInfo(internalFormat));
// TexStorage entrypoints accept both compressed and uncompressed formats.
// All compressed formats are sized.
gl::InternalFormat sizedFormatInfo = gl::GetSizedInternalFormatInfo(internalFormat);
if (sizedFormatInfo.compressed)
{
result.internalFormat = GetNativeCompressedFormat(functions, features, internalFormat);
}
else
{
result.internalFormat = GetNativeInternalFormat(functions, features, sizedFormatInfo);
}
return result;
}
......
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