mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1170893 - Return null for invalid internal format. r=kamidphish
This commit is contained in:
parent
b37a7e8f43
commit
bc882725e3
@ -1211,6 +1211,13 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx,
|
|||||||
if (IsExtensionEnabled(WebGLExtensionID::EXT_sRGB)) {
|
if (IsExtensionEnabled(WebGLExtensionID::EXT_sRGB)) {
|
||||||
const TexInternalFormat effectiveInternalFormat =
|
const TexInternalFormat effectiveInternalFormat =
|
||||||
fba.Texture()->ImageInfoBase().EffectiveInternalFormat();
|
fba.Texture()->ImageInfoBase().EffectiveInternalFormat();
|
||||||
|
|
||||||
|
if (effectiveInternalFormat == LOCAL_GL_NONE) {
|
||||||
|
ErrorInvalidOperation("getFramebufferAttachmentParameter: "
|
||||||
|
"texture contains no data");
|
||||||
|
return JS::NullValue();
|
||||||
|
}
|
||||||
|
|
||||||
TexInternalFormat unsizedinternalformat = LOCAL_GL_NONE;
|
TexInternalFormat unsizedinternalformat = LOCAL_GL_NONE;
|
||||||
TexType type = LOCAL_GL_NONE;
|
TexType type = LOCAL_GL_NONE;
|
||||||
UnsizedInternalFormatAndTypeFromEffectiveInternalFormat(
|
UnsizedInternalFormatAndTypeFromEffectiveInternalFormat(
|
||||||
|
Loading…
Reference in New Issue
Block a user