summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--servers/rendering/rendering_device_commons.h2
-rw-r--r--servers/rendering/rendering_device_driver.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/rendering_device_commons.h b/servers/rendering/rendering_device_commons.h
index 591752bc0e..28d641c879 100644
--- a/servers/rendering/rendering_device_commons.h
+++ b/servers/rendering/rendering_device_commons.h
@@ -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 {
diff --git a/servers/rendering/rendering_device_driver.cpp b/servers/rendering/rendering_device_driver.cpp
index 9e05a6a133..be74467340 100644
--- a/servers/rendering/rendering_device_driver.cpp
+++ b/servers/rendering/rendering_device_driver.cpp
@@ -265,6 +265,8 @@ Error RenderingDeviceDriver::_reflect_spirv(VectorView<ShaderStageSPIRVData> p_s
r_reflection.specialization_constants.push_back(sconst);
}
}
+
+ r_reflection.specialization_constants.sort();
}
}