gfxstream: Remove extra dispatch variable
... to addresss variable shadowing warnings and handle the 2 global commands that do not require a dispatch. Reviewed-by: Aaron Ruby <aruby@qnx.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
This commit is contained in:
@@ -29,6 +29,11 @@ DELAYED_DECODER_DELETE_DICT_ENTRIES = [
|
||||
"vkDestroyShaderModule",
|
||||
]
|
||||
|
||||
GLOBAL_COMMANDS_WITHOUT_DISPATCH = [
|
||||
"vkEnumerateInstanceExtensionProperties",
|
||||
"vkEnumerateInstanceLayerProperties",
|
||||
]
|
||||
|
||||
SNAPSHOT_API_CALL_INFO_VARNAME = "snapshotApiCallInfo"
|
||||
|
||||
global_state_prefix = "m_state->on_"
|
||||
@@ -338,7 +343,11 @@ def emit_dispatch_call(api, cgen):
|
||||
else:
|
||||
cgen.stmt("m_state->lock()")
|
||||
|
||||
cgen.vkApiCall(api, customPrefix="vk->", customParameters=customParams, \
|
||||
whichDispatch = "vk->"
|
||||
if api.name in GLOBAL_COMMANDS_WITHOUT_DISPATCH:
|
||||
whichDispatch = "m_vk->"
|
||||
|
||||
cgen.vkApiCall(api, customPrefix=whichDispatch, customParameters=customParams, \
|
||||
globalStatePrefix=global_state_prefix, checkForDeviceLost=True,
|
||||
checkForOutOfMemory=True)
|
||||
|
||||
@@ -944,8 +953,6 @@ size_t VkDecoder::Impl::decode(void* buf, size_t len, IOStream* ioStream,
|
||||
.build();
|
||||
""")
|
||||
|
||||
self.cgen.stmt("auto vk = m_vk")
|
||||
|
||||
self.cgen.line("switch (opcode)")
|
||||
self.cgen.beginBlock() # switch stmt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user