Generate SPV_EXT_replicated_composites when requested by pragma.

Implement GL_EXT_spec_constant_composites.
This commit is contained in:
Jeff Bolz 2024-05-31 12:00:03 -05:00 committed by arcady-lunarg
parent 6a8b2b2439
commit 4da479aa6a
19 changed files with 656 additions and 14 deletions

View file

@ -872,6 +872,8 @@ public:
// Check if the builder is generating code for spec constants.
bool isInSpecConstCodeGenMode() { return generatingOpCodeForSpecConst; }
void setUseReplicatedComposites(bool use) { useReplicatedComposites = use; }
protected:
Id makeIntConstant(Id typeId, unsigned value, bool specConstant);
Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant);
@ -938,6 +940,7 @@ public:
Id uniqueId;
Function* entryPointFunction;
bool generatingOpCodeForSpecConst;
bool useReplicatedComposites { false };
AccessChain accessChain;
// special blocks of instructions for output