mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Ensure specialization constants come sorted from reflection
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -265,6 +265,8 @@ Error RenderingDeviceDriver::_reflect_spirv(VectorView<ShaderStageSPIRVData> p_s
|
||||
r_reflection.specialization_constants.push_back(sconst);
|
||||
}
|
||||
}
|
||||
|
||||
r_reflection.specialization_constants.sort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user