vulkan-cereal: VirglCtxId --> VirtioGpuCtxId
* Name change to better reflect meaning.
BUG=202552093
TEST=run Cuttlefish
Change-Id: Ib9de6769e4e74f060ae073a87ab45d8acb3cb1b0
diff --git a/stream-servers/virtio-gpu-gfxstream-renderer.cpp b/stream-servers/virtio-gpu-gfxstream-renderer.cpp
index 810c1e3..69fcff2 100644
--- a/stream-servers/virtio-gpu-gfxstream-renderer.cpp
+++ b/stream-servers/virtio-gpu-gfxstream-renderer.cpp
@@ -170,7 +170,7 @@
} __attribute__((packed));
struct PipeCtxEntry {
- VirglCtxId ctxId;
+ VirtioGpuCtxId ctxId;
GoldfishHostPipe* hostPipe;
int fence;
uint32_t addressSpaceHandle;
@@ -184,7 +184,7 @@
void* linear;
size_t linearSize;
GoldfishHostPipe* hostPipe;
- VirglCtxId ctxId;
+ VirtioGpuCtxId ctxId;
uint64_t hva;
uint64_t hvaSize;
uint64_t hvaId;
@@ -555,7 +555,7 @@
void resetPipe(GoldfishHwPipe* hwPipe, GoldfishHostPipe* hostPipe) {
VGPLOG("Want to reset hwpipe %p to hostpipe %p", hwPipe, hostPipe);
- VirglCtxId asCtxId = (VirglCtxId)(uintptr_t)hwPipe;
+ VirtioGpuCtxId asCtxId = (VirtioGpuCtxId)(uintptr_t)hwPipe;
auto it = mContexts.find(asCtxId);
if (it == mContexts.end()) {
GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER))
@@ -586,7 +586,7 @@
}
}
- int createContext(VirglCtxId handle, uint32_t nlen, const char* name) {
+ int createContext(VirtioGpuCtxId handle, uint32_t nlen, const char* name) {
AutoLock lock(mLock);
VGPLOG("ctxid: %u len: %u name: %s", handle, nlen, name);
auto ops = ensureAndGetServiceOps();
@@ -612,7 +612,7 @@
return 0;
}
- int destroyContext(VirglCtxId handle) {
+ int destroyContext(VirtioGpuCtxId handle) {
AutoLock lock(mLock);
VGPLOG("ctxid: %u", handle);
@@ -641,7 +641,7 @@
return 0;
}
- void setContextAddressSpaceHandleLocked(VirglCtxId ctxId, uint32_t handle) {
+ void setContextAddressSpaceHandleLocked(VirtioGpuCtxId ctxId, uint32_t handle) {
auto ctxIt = mContexts.find(ctxId);
if (ctxIt == mContexts.end()) {
GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER))
@@ -653,7 +653,7 @@
ctxEntry.hasAddressSpaceHandle = true;
}
- uint32_t getAddressSpaceHandleLocked(VirglCtxId ctxId) {
+ uint32_t getAddressSpaceHandleLocked(VirtioGpuCtxId ctxId) {
auto ctxIt = mContexts.find(ctxId);
if (ctxIt == mContexts.end()) {
GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER))
@@ -689,7 +689,7 @@
memcpy(iovWords, dwords, sizeof(uint32_t) * dwordCount);
}
- void addressSpaceProcessCmd(VirglCtxId ctxId, uint32_t* dwords, int dwordCount) {
+ void addressSpaceProcessCmd(VirtioGpuCtxId ctxId, uint32_t* dwords, int dwordCount) {
uint32_t opcode = dwords[0];
switch (opcode) {
@@ -800,7 +800,7 @@
}
}
- int submitCmd(VirglCtxId ctxId, void* buffer, int dwordCount) {
+ int submitCmd(VirtioGpuCtxId ctxId, void* buffer, int dwordCount) {
VGPLOG("ctxid: %u buffer: %p dwords: %d", ctxId, buffer, dwordCount);
if (!buffer) {
@@ -1358,7 +1358,7 @@
auto contextsIt = mResourceContexts.find(resId);
if (contextsIt == mResourceContexts.end()) {
- std::vector<VirglCtxId> ids;
+ std::vector<VirtioGpuCtxId> ids;
ids.push_back(ctxId);
mResourceContexts[resId] = ids;
} else {
@@ -1623,10 +1623,10 @@
const GoldfishPipeServiceOps* mServiceOps = nullptr;
- std::unordered_map<VirglCtxId, PipeCtxEntry> mContexts;
+ std::unordered_map<VirtioGpuCtxId, PipeCtxEntry> mContexts;
std::unordered_map<VirglResId, PipeResEntry> mResources;
- std::unordered_map<VirglCtxId, std::vector<VirglResId>> mContextResources;
- std::unordered_map<VirglResId, std::vector<VirglCtxId>> mResourceContexts;
+ std::unordered_map<VirtioGpuCtxId, std::vector<VirglResId>> mContextResources;
+ std::unordered_map<VirglResId, std::vector<VirtioGpuCtxId>> mResourceContexts;
// For use with the async fence cb.
// When we wait for gpu or wait for gpu vulkan, the next (and subsequent)