You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cbuffer SPIRV_Cross_VertexInfo
{
int SPIRV_Cross_BaseVertex;
int SPIRV_Cross_BaseInstance;
};
Since no particular binding register is specified, it gonna be assigned automatically by DXIL.
Normally it's lowest positive value that is unused by other cbuffers
Register that assigned automatically may overlap with some else cbuffer in fragment shader, causing link/runtime issues.
Problem is somewhat outside of spirv-cross scope, and apparently there is no perfect solution to it. My current idea is to add new parameter CompilerHLSL::Options::vertexInfoRegister, that can be provided by game engine to specify exact register.
(Note: engine also can't provide sensible value, but can specify "magic" value like 255 or something)
What do you think about such solution? Thanks!
UPD:
Need to double check, but push-constant possible can have same issue
The text was updated successfully, but these errors were encountered:
Face issue with my pet-game-engine:
Normally it's lowest positive value that is unused by other
cbuffer
scbuffer
in fragment shader, causing link/runtime issues.Problem is somewhat outside of spirv-cross scope, and apparently there is no perfect solution to it. My current idea is to add new parameter
CompilerHLSL::Options::vertexInfoRegister
, that can be provided by game engine to specify exact register.(Note: engine also can't provide sensible value, but can specify "magic" value like 255 or something)
What do you think about such solution? Thanks!
UPD:
Need to double check, but push-constant possible can have same issue
The text was updated successfully, but these errors were encountered: