Compiler and runtime support for global allocation metadata

On the compiler side, enumerate used global allocations, assign each used
global allocation a unique ID, and record the mapping in an OpString
in the result SPIR-V code. The ID is the index of the metadata
for the global allocation.

On the runtime side, added a new RSoVBuffer for metadata, and with code
marshaling them for the kernel according to the mapping reported by the
compiler. SPIRIT is linked against the driver for extracting metadata
out of the SPIR-V module.

Added a new testcase for global allocation metadata in RSoVTest.

Bug: 30964317
Test: RSoVTest on Angler, RSoV LIT Tests
Change-Id: I66b3cfa8b66ee2b60b984320900dbe2dc3d15f21
13 files changed
tree: c63e484624f3f5c93878e12f2aefc4c439888181
  1. cpp/
  2. cpu_ref/
  3. driver/
  4. rsov/
  5. script_api/
  6. support/
  7. tests/
  8. Android.bp
  9. Android.mk
  10. build_rs.py
  11. CleanSpec.mk
  12. libRS.map
  13. rs.h
  14. rs.spec
  15. rs_compat.spec
  16. rs_hal.h
  17. rsAllocation.cpp
  18. rsAllocation.h
  19. rsAnimation.cpp
  20. rsAnimation.h
  21. rsApiAllocation.cpp
  22. rsApiContext.cpp
  23. rsApiDevice.cpp
  24. rsApiElement.cpp
  25. rsApiFileA3D.cpp
  26. rsApiMesh.cpp
  27. rsApiStubs.cpp
  28. rsApiStubs.h
  29. rsApiType.cpp
  30. rsClosure.cpp
  31. rsClosure.h
  32. rsCompatibilityLib.h
  33. rsComponent.cpp
  34. rsComponent.h
  35. rsContext.cpp
  36. rsContext.h
  37. rsCppUtils.cpp
  38. rsCppUtils.h
  39. rsDebugHelper.h
  40. rsDefines.h
  41. rsDevice.cpp
  42. rsDevice.h
  43. rsDriverLoader.cpp
  44. rsElement.cpp
  45. rsElement.h
  46. rsEnv.h
  47. rsFallbackAdaptation.cpp
  48. rsFallbackAdaptation.h
  49. rsFBOCache.cpp
  50. rsFBOCache.h
  51. rsFifo.h
  52. rsFifoSocket.cpp
  53. rsFifoSocket.h
  54. rsFileA3D.cpp
  55. rsFileA3D.h
  56. rsFont.cpp
  57. rsFont.h
  58. rsg.spec
  59. rsg_generator.c
  60. rsgApi.cpp.rsg
  61. rsgApiFuncDecl.h.rsg
  62. rsgApiReplay.cpp.rsg
  63. rsgApiStructs.h.rsg
  64. rsGrallocConsumer.cpp
  65. rsGrallocConsumer.h
  66. rsHidlAdaptation.cpp
  67. rsHidlAdaptation.h
  68. rsInternalDefines.h
  69. rsList.h
  70. rsMap.h
  71. rsMatrix2x2.cpp
  72. rsMatrix2x2.h
  73. rsMatrix3x3.cpp
  74. rsMatrix3x3.h
  75. rsMatrix4x4.cpp
  76. rsMatrix4x4.h
  77. rsMesh.cpp
  78. rsMesh.h
  79. rsMutex.cpp
  80. rsMutex.h
  81. rsObjectBase.cpp
  82. rsObjectBase.h
  83. rsProgram.cpp
  84. rsProgram.h
  85. rsProgramBase.h
  86. rsProgramFragment.cpp
  87. rsProgramFragment.h
  88. rsProgramRaster.cpp
  89. rsProgramRaster.h
  90. rsProgramStore.cpp
  91. rsProgramStore.h
  92. rsProgramVertex.cpp
  93. rsProgramVertex.h
  94. rsRuntime.h
  95. rsSampler.cpp
  96. rsSampler.h
  97. rsScript.cpp
  98. rsScript.h
  99. rsScriptC.cpp
  100. rsScriptC.h
  101. rsScriptC_Lib.cpp
  102. rsScriptC_LibGL.cpp
  103. rsScriptGroup.cpp
  104. rsScriptGroup.h
  105. rsScriptGroup2.cpp
  106. rsScriptGroup2.h
  107. rsScriptGroupBase.h
  108. rsScriptIntrinsic.cpp
  109. rsScriptIntrinsic.h
  110. rsSignal.cpp
  111. rsSignal.h
  112. rsStream.cpp
  113. rsStream.h
  114. rsThreadIO.cpp
  115. rsThreadIO.h
  116. rsType.cpp
  117. rsType.h
  118. rsUtils.h
  119. run_rs_cts.sh
  120. spec.h
  121. spec.l
  122. update-prebuilts.py
  123. update_rs_prebuilts.sh