rework the binding system

This commit is contained in:
Samuliak 2024-08-22 13:58:50 +02:00
parent 3d0055af6a
commit 67a64c9fe9
10 changed files with 168 additions and 161 deletions

View file

@ -57,12 +57,14 @@ struct LatteDecompilerShaderResourceMapping
// texture
sint8 textureUnitToBindingPoint[LATTE_NUM_MAX_TEX_UNITS];
// uniform buffer
sint8 uniformVarsBufferBindingPoint{}; // special block for uniform registers/remapped array/custom variables
sint8 uniformVarsBufferBindingPoint{-1}; // special block for uniform registers/remapped array/custom variables
sint8 uniformBuffersBindingPoint[LATTE_NUM_MAX_UNIFORM_BUFFERS];
// shader storage buffer for transform feedback (if alternative mode is used)
sint8 tfStorageBindingPoint{-1};
// attributes (vertex shader only)
sint8 attributeMapping[LATTE_NUM_MAX_ATTRIBUTE_LOCATIONS];
// Metal exclusive
sint8 indexBufferBinding{-1};
sint32 getTextureCount()
{
@ -288,6 +290,7 @@ struct LatteDecompilerOutput_t
// mapping and binding information
LatteDecompilerShaderResourceMapping resourceMappingGL;
LatteDecompilerShaderResourceMapping resourceMappingVK;
LatteDecompilerShaderResourceMapping resourceMappingMTL;
};
struct LatteDecompilerSubroutineInfo;