Commit c1932fb5 by Gert Wollny Committed by Angle LUCI CQ

Serializer: Print FBO attachment name instead of a number

Bug: None Change-Id: I419a0ca6d1c2e3c47dc84b106baf40dc0abb85cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2943930 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 3bc28a27
......@@ -14,6 +14,9 @@
#include "common/Color.h"
#include "common/MemoryBuffer.h"
#include "common/angleutils.h"
#include "libANGLE/capture/gl_enum_utils.h"
#include "libANGLE/Buffer.h"
#include "libANGLE/Caps.h"
#include "libANGLE/Context.h"
......@@ -364,7 +367,8 @@ Result SerializeFramebufferAttachment(const gl::Context *context,
JsonSerializer *json,
ScratchBuffer *scratchBuffer,
gl::Framebuffer *framebuffer,
const gl::FramebufferAttachment &framebufferAttachment)
const gl::FramebufferAttachment &framebufferAttachment,
gl::GLenumGroup enumGroup)
{
if (framebufferAttachment.type() == GL_TEXTURE ||
framebufferAttachment.type() == GL_RENDERBUFFER)
......@@ -373,7 +377,7 @@ Result SerializeFramebufferAttachment(const gl::Context *context,
}
json->addScalar("Type", framebufferAttachment.type());
// serialize target variable
json->addScalar("Binding", framebufferAttachment.getBinding());
json->addString("Binding", gl::GLenumToString(enumGroup, framebufferAttachment.getBinding()));
if (framebufferAttachment.type() == GL_TEXTURE)
{
SerializeImageIndex(json, framebufferAttachment.getTextureImageIndex());
......@@ -430,14 +434,16 @@ Result SerializeFramebufferState(const gl::Context *context,
{
GroupScope colorAttachmentgroup(json, "ColorAttachment");
ANGLE_TRY(SerializeFramebufferAttachment(context, json, scratchBuffer, framebuffer,
colorAttachment));
colorAttachment,
gl::GLenumGroup::ColorBuffer));
}
}
if (framebuffer->getDepthStencilAttachment())
{
GroupScope dsAttachmentgroup(json, "DepthStencilAttachment");
ANGLE_TRY(SerializeFramebufferAttachment(context, json, scratchBuffer, framebuffer,
*framebuffer->getDepthStencilAttachment()));
*framebuffer->getDepthStencilAttachment(),
gl::GLenumGroup::DefaultGroup));
}
else
{
......@@ -445,13 +451,15 @@ Result SerializeFramebufferState(const gl::Context *context,
{
GroupScope depthAttachmentgroup(json, "DepthAttachment");
ANGLE_TRY(SerializeFramebufferAttachment(context, json, scratchBuffer, framebuffer,
*framebuffer->getDepthAttachment()));
*framebuffer->getDepthAttachment(),
gl::GLenumGroup::FramebufferAttachment));
}
if (framebuffer->getStencilAttachment())
{
GroupScope stencilAttachmengroup(json, "StencilAttachment");
ANGLE_TRY(SerializeFramebufferAttachment(context, json, scratchBuffer, framebuffer,
*framebuffer->getStencilAttachment()));
*framebuffer->getStencilAttachment(),
gl::GLenumGroup::DefaultGroup));
}
}
return Result::Continue;
......
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