summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-02-13 20:25:28 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-13 20:25:28 -0300
commitcbea8c74de38dab25a927e6d217878cb8c98fbb4 (patch)
tree07c2624f689e8377cf3f37d5748c8f1291d8a536 /src/common/file_util.cpp
parent8b9a56033acbcb707f8eeca578973db266052ee3 (diff)
vk_shader_decompiler: Fix vertex id and instance id
Vulkan's VertexIndex and InstanceIndex don't match with hardware. This is because Nvidia implements gl_VertexID and gl_InstanceID. The math that relates these is: gl_VertexIndex = gl_BaseVertex + gl_VertexID gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID To emulate it using what Vulkan's SPIR-V offers (the *Index variants) this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and hardware's equivalent.
Diffstat (limited to 'src/common/file_util.cpp')
0 files changed, 0 insertions, 0 deletions