diff options
author | Dylan Baker <[email protected]> | 2017-02-21 10:58:32 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2017-03-22 16:22:00 -0700 |
commit | dd3830d11b69612ea5ae5befde030885e0f6df63 (patch) | |
tree | 51c0d477ac1c45e666557dbc12f975b9c08c2cae /src | |
parent | 8211e3e60d941ed62c4a0d22de3967a8ded7d805 (diff) |
anv: anv-entrypoints_gen.py: rename hash to cal_hash.
hash is reserved name in python, it's the interface to access an
object's hash protocol.
Signed-off-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_entrypoints_gen.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py index 895ec949986..a63badb4770 100644 --- a/src/intel/vulkan/anv_entrypoints_gen.py +++ b/src/intel/vulkan/anv_entrypoints_gen.py @@ -256,7 +256,8 @@ PRIME_FACTOR = 5024183 PRIME_STEP = 19 -def hash(name): +def cal_hash(name): + """Calculate the same hash value that Mesa will calculate in C.""" h = 0 for c in name: h = (h * PRIME_FACTOR + ord(c)) & U32_MASK @@ -300,7 +301,7 @@ def get_entrypoints(doc, entrypoints_to_defines): guard = entrypoints_to_defines[fullname] else: guard = None - entrypoints.append((type, shortname, params, index, hash(fullname), guard)) + entrypoints.append((type, shortname, params, index, cal_hash(fullname), guard)) index += 1 return entrypoints @@ -370,7 +371,7 @@ def main(): 'const VkAllocationCallbacks* pAllocator,' + 'VkDeviceMemory* pMem,' + 'VkImage* pImage', len(entrypoints), - hash('vkCreateDmaBufImageINTEL'), None)) + cal_hash('vkCreateDmaBufImageINTEL'), None)) # For outputting entrypoints.h we generate a anv_EntryPoint() prototype # per entry point. |