[SPIR-V] Add support for loops

This commit is contained in:
DrChat
2017-12-22 22:23:28 -06:00
parent 80b0b66e5d
commit fb89973266
2 changed files with 163 additions and 28 deletions

View File

@@ -145,7 +145,9 @@ class SpirvShaderTranslator : public ShaderTranslator {
// Array of AMD registers.
// These values are all pointers.
spv::Id registers_ptr_ = 0, registers_type_ = 0;
spv::Id consts_ = 0, a0_ = 0, aL_ = 0, p0_ = 0;
spv::Id consts_ = 0, a0_ = 0, p0_ = 0;
spv::Id aL_ = 0; // Loop index stack - .x is active loop
spv::Id loop_count_ = 0; // Loop counter stack
spv::Id ps_ = 0, pv_ = 0; // IDs of previous results
spv::Id pc_ = 0; // Program counter
spv::Id pos_ = 0;