зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1170893 - Return null for invalid internal format. r=kamidphish
This commit is contained in:
Родитель
cd06229252
Коммит
aac1f28011
|
@ -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(
|
||||||
|
|
Загрузка…
Ссылка в новой задаче