Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport to 9] Fix SPIR-V global to function replacement for differing load types #2241

Merged
merged 1 commit into from
Nov 29, 2023

Commits on Nov 28, 2023

  1. [Backport to 9] Fix SPIR-V global to function replacement for differi…

    …ng load types (KhronosGroup#2160)
    
    In some cases, we will see IR with the following
    
    @__spirv_BuiltInGlobalInvocationId = external dso_local local_unnamed_addr addrspace(1) constant <3 x i64>, align 32
    
    ...
    
    %0 = load <6 x i32>, ptr addrspace(1) @__spirv_BuiltInGlobalInvocationId, align 32
    %1 = extractelement <6 x i32> %0, i64 0
    Note the global type and load type are different. Change the handling of vector loads from vector globals to reconstruct the global vector type and then bitcast to the load type.
    
    Thanks to @jcranmer-intel for helping me find the simplest solution.
    sarnex authored and mshelego committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    202b56c View commit details
    Browse the repository at this point in the history