[Fix] (MG_Backend/DirectVulkan): fixing Photon v1.1

- Flatten DailyWeatherVariation interface varyings
- Correct internal-format component counts
- Preserve GL draw-buffer slot semantics in render pass creation
- relax GL_NONE / vec4-to-RGB pipeline checks
This commit is contained in:
2026-05-09 09:56:45 +08:00
parent 407d4344c4
commit 39c5b28dfb
11 changed files with 1876 additions and 22 deletions
+42
View File
@@ -140,6 +140,48 @@ namespace MobileGL::MG_State {
return m_vertexArrayState.GetBoundVertexArray();
}
void GLContext::SetCurrentVertexAttributeFloat(Uint index, const Array<Float, 4>& value) {
MOBILEGL_ASSERT(index < m_currentVertexAttributes.size(),
"SetCurrentVertexAttributeFloat: index %u is out of range", index);
auto& current = m_currentVertexAttributes[index];
current.floatValue = value;
for (SizeT component = 0; component < value.size(); ++component) {
current.intValue[component] = static_cast<Int32>(value[component]);
current.uintValue[component] = static_cast<Uint32>(value[component]);
}
}
void GLContext::SetCurrentVertexAttributeInt(Uint index, const Array<Int32, 4>& value) {
MOBILEGL_ASSERT(index < m_currentVertexAttributes.size(),
"SetCurrentVertexAttributeInt: index %u is out of range", index);
auto& current = m_currentVertexAttributes[index];
current.intValue = value;
for (SizeT component = 0; component < value.size(); ++component) {
current.floatValue[component] = static_cast<Float>(value[component]);
current.uintValue[component] = static_cast<Uint32>(value[component]);
}
}
void GLContext::SetCurrentVertexAttributeUint(Uint index, const Array<Uint32, 4>& value) {
MOBILEGL_ASSERT(index < m_currentVertexAttributes.size(),
"SetCurrentVertexAttributeUint: index %u is out of range", index);
auto& current = m_currentVertexAttributes[index];
current.uintValue = value;
for (SizeT component = 0; component < value.size(); ++component) {
current.floatValue[component] = static_cast<Float>(value[component]);
current.intValue[component] = static_cast<Int32>(value[component]);
}
}
const CurrentVertexAttributeValue& GLContext::GetCurrentVertexAttribute(Uint index) const {
MOBILEGL_ASSERT(index < m_currentVertexAttributes.size(),
"GetCurrentVertexAttribute: index %u is out of range", index);
return m_currentVertexAttributes[index];
}
// Texture
void GLContext::GenTextureNames(Uint number, Vector<Uint>& textures) {
m_textureState.GenerateNames(number, textures);