mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-21 01:38:23 +02:00
gfxstream: Avoid transfering VkAllocationCallbacks between guest and host
Test: cvd create --gpu_mode=gfxstream_guest_angle Reviewed-by: David Gilhooley <djgilhooley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42224>
This commit is contained in:
parent
a8ae5b35c6
commit
4bfc03020a
3 changed files with 10 additions and 5 deletions
|
|
@ -553,7 +553,7 @@ class VulkanType(object):
|
|||
def getFullName(self) -> str:
|
||||
if self.parent is None:
|
||||
return self.paramName
|
||||
return f"{self.parent.name}.{self.paramName}"
|
||||
return f"{self.parent.name}.{self.paramName}"
|
||||
|
||||
def getProtectStreamFeature(self) -> Optional[str]:
|
||||
key = self.getFullName()
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ from .common.vulkantypes import \
|
|||
from .wrapperdefs import VulkanWrapperGenerator
|
||||
from .wrapperdefs import STRUCT_EXTENSION_PARAM, STRUCT_EXTENSION_PARAM_FOR_WRITE, EXTENSION_SIZE_API_NAME
|
||||
|
||||
|
||||
VULKAN_TYPES_THAT_ARE_NEVER_TRANSMITTED = [
|
||||
"VkAllocationCallbacks",
|
||||
]
|
||||
|
||||
class DeepcopyCodegen(VulkanTypeIterator):
|
||||
def __init__(self, cgen, inputVars, poolVarName, rootVarName, prefix, skipValues=False):
|
||||
self.cgen = cgen
|
||||
|
|
@ -41,7 +46,7 @@ class DeepcopyCodegen(VulkanTypeIterator):
|
|||
self.checked = False
|
||||
|
||||
def needSkip(self, vulkanType):
|
||||
return False
|
||||
return vulkanType.typeName in VULKAN_TYPES_THAT_ARE_NEVER_TRANSMITTED
|
||||
|
||||
def makeCastExpr(self, vulkanType):
|
||||
return "(%s)" % (
|
||||
|
|
@ -75,7 +80,7 @@ class DeepcopyCodegen(VulkanTypeIterator):
|
|||
def onCompoundType(self, vulkanType):
|
||||
|
||||
if self.needSkip(vulkanType):
|
||||
self.cgen.line("// TODO: Unsupported : %s" %
|
||||
self.cgen.line("// Deepcopy intentionally skipped for `%s`" %
|
||||
self.cgen.makeCTypeDecl(vulkanType))
|
||||
return
|
||||
|
||||
|
|
@ -200,7 +205,7 @@ class DeepcopyCodegen(VulkanTypeIterator):
|
|||
self.cgen.stmt("%s = %s(%s, %s)" % (
|
||||
sizeVar, EXTENSION_SIZE_API_NAME, self.rootVarName, nextVar))
|
||||
self.cgen.endWhile()
|
||||
|
||||
|
||||
self.cgen.stmt("%s = nullptr" % rhs)
|
||||
|
||||
self.cgen.beginIf(sizeVar)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def deviceMemoryTransform(resourceTrackerVarName, structOrApiInfo, getExpr, getL
|
|||
"size",
|
||||
"typeIndex",
|
||||
"typeBits",]
|
||||
|
||||
|
||||
casts = {
|
||||
"handle" : "VkDeviceMemory*",
|
||||
"offset" : "VkDeviceSize*",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue