diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-13 20:25:28 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-13 20:25:28 -0300 |
commit | cbea8c74de38dab25a927e6d217878cb8c98fbb4 (patch) | |
tree | 07c2624f689e8377cf3f37d5748c8f1291d8a536 /src/core/gdbstub/gdbstub.cpp | |
parent | 8b9a56033acbcb707f8eeca578973db266052ee3 (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/core/gdbstub/gdbstub.cpp')
0 files changed, 0 insertions, 0 deletions