-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
In ParseBufferReferences in track_back_instruction it needs to handle pointer math
Here is an example godot based spirv bad.spv.txt
But you can see this with a simple GLSL shader https://godbolt.org/z/nj55vrMq4
You need to handle a case like
%load_a = OpLoad %uint64 %24
%load_b = OpLoad %uint32 %26
%1 = OpUConvert %uint64 %load_b
%2 = OpIAdd %uint64 %load_a %1
%3 = OpConvertUToPtr %ptr_type %2
OpStore %var %3Note, there are now 2 loads that are used to calculate the pointer, a simpler version would be like https://godbolt.org/z/qWTMa7ac4 (no cast)
But a nasty case (not sure if real or not) is when you have 2 different variables used to generate the math like https://godbolt.org/z/EjMWrjb6x
@fabian-lunarg feel free to ping me for help/ideas around this if you want
Metadata
Metadata
Assignees
Labels
No labels