Commit 4f723d2c by Cody Northrop Committed by Commit Bot

Capture/Replay: Support glBufferStorageEXT

Add the entrypoint, and when a buffer is immutable, recreate it with glBufferStorageEXT. Test: MEC for Dota Underlords Bug: b/185192780 Bug: angleproject:5857 Change-Id: I29b934bdff4185d19594e49e9387dd79c6031aa5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821945Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 68f1203d
...@@ -2191,9 +2191,19 @@ void CaptureMidExecutionSetup(const gl::Context *context, ...@@ -2191,9 +2191,19 @@ void CaptureMidExecutionSetup(const gl::Context *context,
cap(CaptureBindBuffer(replayState, true, gl::BufferBinding::Array, id)); cap(CaptureBindBuffer(replayState, true, gl::BufferBinding::Array, id));
} }
if (buffer->isImmutable())
{
cap(CaptureBufferStorageEXT(replayState, true, gl::BufferBinding::Array,
static_cast<GLsizeiptr>(buffer->getSize()),
buffer->getMapPointer(),
buffer->getStorageExtUsageFlags()));
}
else
{
cap(CaptureBufferData(replayState, true, gl::BufferBinding::Array, cap(CaptureBufferData(replayState, true, gl::BufferBinding::Array,
static_cast<GLsizeiptr>(buffer->getSize()), buffer->getMapPointer(), static_cast<GLsizeiptr>(buffer->getSize()),
buffer->getUsage())); buffer->getMapPointer(), buffer->getUsage()));
}
if (bufferMapped) if (bufferMapped)
{ {
......
...@@ -3453,7 +3453,10 @@ void CaptureBufferStorageEXT_data(const State &glState, ...@@ -3453,7 +3453,10 @@ void CaptureBufferStorageEXT_data(const State &glState,
GLbitfield flags, GLbitfield flags,
angle::ParamCapture *paramCapture) angle::ParamCapture *paramCapture)
{ {
UNIMPLEMENTED(); if (data)
{
CaptureMemory(data, size, paramCapture);
}
} }
// GL_EXT_separate_shader_objects // GL_EXT_separate_shader_objects
......
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