Merge pull request #89420 from RandomShaper/sort_scs

Ensure specialization constants come sorted from reflection
This commit is contained in:
Rémi Verschelde 2024-03-12 16:28:12 +01:00
commit 61282068f4
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 4 additions and 0 deletions

View File

@ -912,6 +912,8 @@ public:
struct ShaderSpecializationConstant : public PipelineSpecializationConstant {
BitField<ShaderStage> stages;
bool operator<(const ShaderSpecializationConstant &p_other) const { return constant_id < p_other.constant_id; }
};
struct ShaderDescription {

View File

@ -265,6 +265,8 @@ Error RenderingDeviceDriver::_reflect_spirv(VectorView<ShaderStageSPIRVData> p_s
r_reflection.specialization_constants.push_back(sconst);
}
}
r_reflection.specialization_constants.sort();
}
}