Commit 0d3b84ef by Cody Northrop Committed by Commit Bot

FrameCapture: Fix GLSync creation for MEC on 64-bit

GLSyncs created during MEC were getting garbage for the high order bits when when run on 64-bit applications. That's because the iterator is 32-bit and was being bitcast to 64-bit. This change zero extends the iterator before converting to a GLSync. Test: Lots of traces were hitting this Bug: angleproject:4048 Change-Id: Ia22da945e014de0caad2a3663a33f996bb781b19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2486403Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 5eebf3a7
...@@ -3085,7 +3085,7 @@ void CaptureMidExecutionSetup(const gl::Context *context, ...@@ -3085,7 +3085,7 @@ void CaptureMidExecutionSetup(const gl::Context *context,
const gl::SyncManager &syncs = apiState.getSyncManagerForCapture(); const gl::SyncManager &syncs = apiState.getSyncManagerForCapture();
for (const auto &syncIter : syncs) for (const auto &syncIter : syncs)
{ {
GLsync syncID = gl::bitCast<GLsync>(syncIter.first); GLsync syncID = gl::bitCast<GLsync>(static_cast<size_t>(syncIter.first));
const gl::Sync *sync = syncIter.second; const gl::Sync *sync = syncIter.second;
if (!sync) if (!sync)
......
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