Commit 19e4cf86 by Shahbaz Youssefi Committed by Commit Bot

Capture/Replay: Some fixes for capturing WebGL

Bug: angleproject:5635 Change-Id: I756471fbad34660c494fb7f9ba1144accd5c08b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686119 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 3500b434
......@@ -2814,14 +2814,16 @@ void CaptureMidExecutionSetup(const gl::Context *context,
const gl::FramebufferAttachment *depthAttachment = framebuffer->getDepthAttachment();
if (depthAttachment)
{
ASSERT(depthAttachment->getBinding() == GL_DEPTH_ATTACHMENT);
ASSERT(depthAttachment->getBinding() == GL_DEPTH_ATTACHMENT ||
depthAttachment->getBinding() == GL_DEPTH_STENCIL_ATTACHMENT);
CaptureFramebufferAttachment(setupCalls, replayState, *depthAttachment);
}
const gl::FramebufferAttachment *stencilAttachment = framebuffer->getStencilAttachment();
if (stencilAttachment)
{
ASSERT(stencilAttachment->getBinding() == GL_STENCIL_ATTACHMENT);
ASSERT(stencilAttachment->getBinding() == GL_STENCIL_ATTACHMENT ||
depthAttachment->getBinding() == GL_DEPTH_STENCIL_ATTACHMENT);
CaptureFramebufferAttachment(setupCalls, replayState, *stencilAttachment);
}
......
......@@ -668,7 +668,9 @@ void CaptureShaderSource_length(const State &glState,
ParamCapture *paramCapture)
{
if (!length)
{
return;
}
CaptureMemory(length, count * sizeof(GLint), paramCapture);
}
......
......@@ -804,7 +804,13 @@ void CaptureReadPixelsRobustANGLE_length(const State &glState,
void *pixels,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
if (!length)
{
return;
}
paramCapture->readBufferSizeBytes = sizeof(GLsizei);
CaptureMemory(length, paramCapture->readBufferSizeBytes, paramCapture);
}
void CaptureReadPixelsRobustANGLE_columns(const State &glState,
......@@ -822,7 +828,13 @@ void CaptureReadPixelsRobustANGLE_columns(const State &glState,
void *pixels,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
if (!columns)
{
return;
}
paramCapture->readBufferSizeBytes = sizeof(GLsizei);
CaptureMemory(columns, paramCapture->readBufferSizeBytes, paramCapture);
}
void CaptureReadPixelsRobustANGLE_rows(const State &glState,
......@@ -840,7 +852,13 @@ void CaptureReadPixelsRobustANGLE_rows(const State &glState,
void *pixels,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
if (!rows)
{
return;
}
paramCapture->readBufferSizeBytes = sizeof(GLsizei);
CaptureMemory(rows, paramCapture->readBufferSizeBytes, paramCapture);
}
void CaptureReadPixelsRobustANGLE_pixels(const State &glState,
......@@ -858,7 +876,14 @@ void CaptureReadPixelsRobustANGLE_pixels(const State &glState,
void *pixels,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
if (glState.getTargetBuffer(gl::BufferBinding::PixelPack))
{
// If a pixel pack buffer is bound, this is an offset, not a pointer
paramCapture->value.voidPointerVal = pixels;
return;
}
paramCapture->readBufferSizeBytes = bufSize;
}
void CaptureTexImage2DRobustANGLE_pixels(const State &glState,
......@@ -875,7 +900,17 @@ void CaptureTexImage2DRobustANGLE_pixels(const State &glState,
const void *pixels,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
if (glState.getTargetBuffer(gl::BufferBinding::PixelUnpack))
{
return;
}
if (!pixels)
{
return;
}
CaptureMemory(pixels, bufSize, paramCapture);
}
void CaptureTexParameterfvRobustANGLE_params(const State &glState,
......
......@@ -1553,9 +1553,6 @@ angle::Result RendererVk::initializeDevice(DisplayVk *displayVk, uint32_t queueF
enabledFeatures.features.inheritedQueries = mPhysicalDeviceFeatures.inheritedQueries;
}
// Used to support OES_sample_variables
enabledFeatures.features.sampleRateShading = mPhysicalDeviceFeatures.sampleRateShading;
// Setup device initialization struct
VkDeviceCreateInfo createInfo = {};
......
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