Update replayd to match latest internal changes
diff --git a/cc/replayd/build.gradle b/cc/replayd/build.gradle
index 7e33c7a..bb1a3e9 100644
--- a/cc/replayd/build.gradle
+++ b/cc/replayd/build.gradle
@@ -112,11 +112,11 @@
gcc(Gcc) {
target('windows64') {
cppCompiler.withArguments { it << '-DTARGET_OS_WINDOWS' }
- cppCompiler.executable 'x86_64-w64-mingw32-g++'
- cCompiler.executable 'x86_64-w64-mingw32-gcc'
- linker.executable 'x86_64-w64-mingw32-g++'
- assembler.executable 'x86_64-w64-mingw32-as'
- staticLibArchiver.executable 'x86_64-w64-mingw32-ar'
+ cppCompiler.executable 'g++'
+ cCompiler.executable 'gcc'
+ linker.executable 'g++'
+ assembler.executable 'as'
+ staticLibArchiver.executable 'ar'
}
}
break
diff --git a/cc/replayd/src/GfxApi.cpp.tmpl b/cc/replayd/src/GfxApi.cpp.tmpl
index cad80b4..599f8fa 100644
--- a/cc/replayd/src/GfxApi.cpp.tmpl
+++ b/cc/replayd/src/GfxApi.cpp.tmpl
@@ -20,10 +20,10 @@
Entry point.
-------------------------------------------------------------------------------
*/}}
-{{define "Main"}}
+{{define "Api"}}
{{template "AOSPCopyright"}}
¶
-{{template "Go.GeneratedHeader"}}
+{{template "C++.GeneratedHeader"}}
¶
#include "GetGfxProcAddress.h"
#include "GfxApi.h"
@@ -82,7 +82,7 @@
void Register(Interpreter* interpreter) {
{{range $i, $c := $.Functions}}
{{if not (GetAnnotation $c "synthetic")}}
- interpreter->registerFunction(Ids::{{Macro "Go.Public" $c.Name}}, call{{Macro "Go.Public" $c.Name}});
+ interpreter->registerFunction(Ids::{{Macro "C++.Public" $c.Name}}, call{{Macro "C++.Public" $c.Name}});
{{end}}
{{end}}
}
@@ -107,7 +107,7 @@
{{define "CommandHandler"}}
-bool call{{Macro "Go.Public" $.Name}}(Stack* stack, bool pushReturn) {
+bool call{{Macro "C++.Public" $.Name}}(Stack* stack, bool pushReturn) {
{{range $i, $p := (Reverse $.CallParameters)}}
{{Macro "C++.ParameterType" $p}} {{$p.Name}} = stack->pop<{{Macro "C++.ParameterType" $p}}>();
{{end}}
@@ -154,3 +154,6 @@
}
¶
{{end}}
+
+{{Include "GfxApiCommon.tmpl" "../../../gfxapi/cpp_common.tmpl"}}
+{{$ | Macro "Api" | Format (Global "clang-format") | Write "GfxApi.cpp"}}
diff --git a/cc/replayd/src/GfxApi.h b/cc/replayd/src/GfxApi.h
index 73b1380..a790a21 100644
--- a/cc/replayd/src/GfxApi.h
+++ b/cc/replayd/src/GfxApi.h
@@ -926,19 +926,6 @@
static const uint32_t GL_MAP_UNSYNCHRONIZED_BIT = 32;
}; // end of namespace MapBufferRangeAccess
-namespace SyncCondition {
-static const uint32_t GL_SYNC_GPU_COMMANDS_COMPLETE = 37143;
-}; // end of namespace SyncCondition
-
-namespace ClientWaitSyncSignal {
-static const uint32_t GL_ALREADY_SIGNALED = 37146;
-static const uint32_t GL_TIMEOUT_EXPIRED = 37147;
-static const uint32_t GL_CONDITION_SATISFIED = 37148;
-static const uint32_t GL_WAIT_FAILED = 37149;
-}; // end of namespace ClientWaitSyncSignal
-
-namespace SyncFlags {}; // end of namespace SyncFlags
-
typedef uint32_t RenderbufferId;
typedef uint32_t TextureId;
typedef uint32_t FramebufferId;
@@ -947,7 +934,6 @@
typedef uint32_t ProgramId;
typedef uint32_t VertexArrayId;
typedef uint32_t QueryId;
-typedef uint32_t SyncObjectId;
typedef int32_t UniformLocation;
typedef int32_t AttributeLocation;
typedef void* IndicesPointer;
diff --git a/cc/replayd/src/GfxApi.h.tmpl b/cc/replayd/src/GfxApi.h.tmpl
index cc136ca..765c8f2 100644
--- a/cc/replayd/src/GfxApi.h.tmpl
+++ b/cc/replayd/src/GfxApi.h.tmpl
@@ -20,10 +20,10 @@
Entry point.
-------------------------------------------------------------------------------
*/}}
-{{define "Main"}}
+{{define "Api"}}
{{template "AOSPCopyright"}}
¶
-{{template "Go.GeneratedHeader"}}
+{{template "C++.GeneratedHeader"}}
¶
#ifndef ANDROID_CAZE_GFXAPI_FUNCTIONS_H
#define ANDROID_CAZE_GFXAPI_FUNCTIONS_H
@@ -49,7 +49,7 @@
// List of the function ids for the API functions. This list have to be consistent with the
// function ids on the server side because they are part of the communication protocol
{{range $i, $c := $.Functions}}
- static const uint16_t {{Macro "Go.Public" $c.Name}} = {{$i}};
+ static const uint16_t {{Macro "C++.Public" $c.Name}} = {{$i}};
{{end}}
} // end of namespace FunctionIds
¶
@@ -108,3 +108,6 @@
extern {{Macro "FunctionPtrType" $}} {{$.Name}};
{{end}}
+
+{{Include "GfxApiCommon.tmpl" "../../../gfxapi/cpp_common.tmpl"}}
+{{$ | Macro "Api" | Format (Global "clang-format") | Write "GfxApi.h"}}
diff --git a/cc/replayd/src/ReplayRequest.cpp b/cc/replayd/src/ReplayRequest.cpp
index 0244e58..589ce0b 100644
--- a/cc/replayd/src/ReplayRequest.cpp
+++ b/cc/replayd/src/ReplayRequest.cpp
@@ -67,8 +67,8 @@
return mConstantMemory;
}
-const std::pair<std::string, uint32_t>& ReplayRequest::getResourceData(uint32_t resourceId) const {
- return mResources[resourceId];
+const std::pair<std::string, uint32_t>& ReplayRequest::getResourceData(uint32_t resourceIdx) const {
+ return mResources[resourceIdx];
}
const std::pair<const uint32_t*, uint32_t>& ReplayRequest::getInstructionList() const {
diff --git a/cc/replayd/src/ReplayRequest.h b/cc/replayd/src/ReplayRequest.h
index 9752bb3..17346e9 100644
--- a/cc/replayd/src/ReplayRequest.h
+++ b/cc/replayd/src/ReplayRequest.h
@@ -54,7 +54,7 @@
const std::vector<std::pair<std::string, uint32_t>>& getResources() const;
// Get the name and the size of a resource identified by the given index
- const std::pair<std::string, uint32_t>& getResourceData(uint32_t resourceId) const;
+ const std::pair<std::string, uint32_t>& getResourceData(uint32_t resourceIdx) const;
// Get the base address and the size (count of instructions) of the instruction list
const std::pair<const uint32_t*, uint32_t>& getInstructionList() const;