Commit 4b071880 by Cody Northrop Committed by Commit Bot

Capture/Replay: Add const to string pointer

Traces that have shader compiles in the middle of the run are reusing the string pointers on each go through. On some (multiple) platforms, the string pointer is no good on the second run through. This may only happen for large strings. Adding a const qualifier on the pointer itself, not just the string, avoids the issue. This has the effect of changing strings from this: const char *glShaderSource_string_0[] = { const char *glShaderSource_string_1[] = { to this: const char* const glShaderSource_string_0[] = { const char* const glShaderSource_string_1[] = { Test: Pokemon Go MEC Bug: b/188091629 Bug: angleproject:5968 Change-Id: Id6a05c955adb3e1c43d2723450be6b5278d99fba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2895328 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 83d22b66
...@@ -398,7 +398,7 @@ void WriteStringPointerParamReplay(DataTracker *dataTracker, ...@@ -398,7 +398,7 @@ void WriteStringPointerParamReplay(DataTracker *dataTracker,
counter = dataTracker->getCounters().getAndIncrement(call.entryPoint, param.name); counter = dataTracker->getCounters().getAndIncrement(call.entryPoint, param.name);
dataTracker->getStringCounters().setStringCounter(strings, counter); dataTracker->getStringCounters().setStringCounter(strings, counter);
header << "const char *"; header << "const char* const ";
WriteParamStaticVarName(call, param, counter, header); WriteParamStaticVarName(call, param, counter, header);
header << "[] = { \n"; header << "[] = { \n";
......
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