[Fix] (MG_Util/Program): Completely fix uniform conflicting.

This commit is contained in:
BZLZHH
2025-07-05 12:25:22 +08:00
committed by GitHub
parent 164c2f25d4
commit bf0c29b384
+2 -2
View File
@@ -804,7 +804,7 @@ namespace MG_Util::Program {
spvc_basetype base_type = spvc_type_get_basetype(type);
GLenum gl_type = GL_NONE;
if (spirv_location > 0 && base_type != SPVC_BASETYPE_SAMPLED_IMAGE) {
if (spirv_location >= 0 && base_type != SPVC_BASETYPE_SAMPLED_IMAGE) {
auto conflict_it = used_locations.find(spirv_location);
if (conflict_it != used_locations.end()) {
// Check if the conflicting uniform is a sampler
@@ -1095,4 +1095,4 @@ namespace MG_Util::Program {
return essl;
}
}
}