Commit d42df5c7 by Gert Wollny

Capture: Only capture texels of initialized textures

If a texture is not yet initialized then it may contain random pixels, and since it doesn't make sense to capture this random data, skip its serialization and only mark the data as not initialized in the capture. This also avoid the texture syncronization that would lead to a crash for incomplete cube maps. Bug: angleproject:6034 Change-Id: I0cb30a03a29aecd605f3c61b6df4cd897e1f9093 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2944954 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent e543ad94
......@@ -1171,10 +1171,17 @@ Result SerializeTextureData(JsonSerializer *json,
gl::PixelPackState packState;
packState.alignment = 1;
ANGLE_TRY(texture->getTexImage(context, packState, nullptr, index.getTarget(),
index.getLevelIndex(), getFormat, getType,
texelsPtr->data()));
json->addBlob("Texels", texelsPtr->data(), texelsPtr->size());
if (texture->getState().getInitState() == gl::InitState::Initialized)
{
ANGLE_TRY(texture->getTexImage(context, packState, nullptr, index.getTarget(),
index.getLevelIndex(), getFormat, getType,
texelsPtr->data()));
json->addBlob("Texels", texelsPtr->data(), texelsPtr->size());
}
else
{
json->addCString("Texels", "not initialized");
}
}
return Result::Continue;
}
......
......@@ -58,7 +58,6 @@ GLSLTest.MixedShaderLengths/*
GLSLTest.ZeroShaderLength/*
GPUTestConfigTest.GPUTestConfigConditions_D3D11/*
ImageTest.SourceCubeTargetExternal/*
ImageTest.ValidationGLImage/*
IndexedPointsTestUByte.*
IndexedPointsTestUInt.*
IndexedPointsTestUShort.*
......
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