mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Fix] (MG_Backend/DirectVulkan): support Voxy rendering
Implemented: - Advertise Voxy-required DirectVulkan extensions without raising the reported OpenGL version. - Add DirectVulkan compute, indirect draw count, DSA, readback, and buffer state paths needed by Voxy. Fixed: - Enable Vulkan shaderInt64 and drawIndirectFirstInstance so Voxy baseInstance-driven LOD draws address the correct section data. - Fix DirectVulkan synchronization, framebuffer, texture readback, and shader interface handling used by Voxy and Minecraft screenshots. Tests: - Add MG_Test coverage for DirectVulkan extension advertising, DSA buffer/texture/framebuffer/vertex-array behavior, persistent mapped readback, and shader/program paths.
This commit is contained in:
@@ -168,6 +168,21 @@ namespace MobileGL::MG_Impl::GLImpl {
|
||||
MG_State::pGLContext->SetFrontFaceMode(frontFaceMode);
|
||||
}
|
||||
|
||||
void ProvokingVertex_State(GLenum mode) {
|
||||
ProvokingVertexMode provokingVertexMode = MG_Util::ConvertGLEnumToProvokingVertexMode(mode);
|
||||
if (provokingVertexMode == ProvokingVertexMode::Unknown) {
|
||||
MG_State::pGLContext->RecordError(
|
||||
ErrorCode::InvalidEnum,
|
||||
MakeUnique<GenericErrorInfo>("MG_Impl/GLImpl", "ProvokingVertex_State",
|
||||
"Provoking vertex mode enum " +
|
||||
MG_Util::ConvertProvokingVertexModeToString(provokingVertexMode) +
|
||||
"(" + MG_Util::ConvertGLEnumToString(mode) + ") is not supported."));
|
||||
return;
|
||||
}
|
||||
|
||||
MG_State::pGLContext->SetProvokingVertexMode(provokingVertexMode);
|
||||
}
|
||||
|
||||
void Enable_State(GLenum cap) {
|
||||
CapabilityInput capInput = MG_Util::ConvertGLEnumToCapabilityInput(cap);
|
||||
if (capInput == CapabilityInput::Unknown) {
|
||||
@@ -499,6 +514,10 @@ namespace MobileGL::MG_Impl::GLImpl {
|
||||
FrontFace_State(mode);
|
||||
}
|
||||
|
||||
void ProvokingVertex(GLenum mode) {
|
||||
ProvokingVertex_State(mode);
|
||||
}
|
||||
|
||||
void Enable(GLenum cap) {
|
||||
Enable_State(cap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user