diff options
author | Ben Clayton <bclayton@google.com> | 2015-02-24 14:16:19 +0000 |
---|---|---|
committer | Ben Clayton <bclayton@google.com> | 2015-02-24 14:16:19 +0000 |
commit | 79d927ba21a44cebb519df06792bfeda237c5e56 (patch) | |
tree | b580d2784263ce9828d72c7a4f86da2400050082 | |
parent | 3d3eed264af4bcf16614b47f066fa2f8e60016bf (diff) | |
download | gpu-studio-1.2-release.tar.gz |
Update replayd to match latest internal changesstudio-1.2-release
-rw-r--r-- | cc/replayd/build.gradle | 10 | ||||
-rw-r--r-- | cc/replayd/src/GfxApi.cpp.tmpl | 11 | ||||
-rw-r--r-- | cc/replayd/src/GfxApi.h | 14 | ||||
-rw-r--r-- | cc/replayd/src/GfxApi.h.tmpl | 9 | ||||
-rw-r--r-- | cc/replayd/src/ReplayRequest.cpp | 4 | ||||
-rw-r--r-- | cc/replayd/src/ReplayRequest.h | 2 |
6 files changed, 21 insertions, 29 deletions
diff --git a/cc/replayd/build.gradle b/cc/replayd/build.gradle index 7e33c7a6b..bb1a3e9e3 100644 --- a/cc/replayd/build.gradle +++ b/cc/replayd/build.gradle @@ -112,11 +112,11 @@ model { 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 cad80b40f..599f8fa5a 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 @@ namespace { 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 @@ void Initialize() { {{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 @@ bool call{{Macro "Go.Public" $.Name}}(Stack* stack, bool pushReturn) { } ¶ {{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 73b138026..a790a215b 100644 --- a/cc/replayd/src/GfxApi.h +++ b/cc/replayd/src/GfxApi.h @@ -926,19 +926,6 @@ static const uint32_t GL_MAP_FLUSH_EXPLICIT_BIT = 16; 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 ShaderId; 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 cc136ca1d..765c8f248 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 @@ namespace Ids { // 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 @@ namespace Ids { 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 0244e5820..589ce0b85 100644 --- a/cc/replayd/src/ReplayRequest.cpp +++ b/cc/replayd/src/ReplayRequest.cpp @@ -67,8 +67,8 @@ const std::pair<const void*, uint32_t>& ReplayRequest::getConstantMemory() const 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 9752bb3a6..17346e953 100644 --- a/cc/replayd/src/ReplayRequest.h +++ b/cc/replayd/src/ReplayRequest.h @@ -54,7 +54,7 @@ public: 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; |