mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Fix] (MG_Impl/GLImpl, MG_State/GLState): fix Vulkan depth-only fragment outputs
This commit is contained in:
@@ -890,6 +890,9 @@ namespace MobileGL::MG_Impl::GLImpl {
|
||||
case GL_MAX_DEBUG_GROUP_STACK_DEPTH:
|
||||
*params = 0; // debug-group entrypoints are stubbed
|
||||
return;
|
||||
case GL_MAX_DEBUG_MESSAGE_LENGTH:
|
||||
*params = 1024; // debug-message entrypoints are stubbed, but KHR_debug requires a valid limit
|
||||
return;
|
||||
case GL_DEBUG_GROUP_STACK_DEPTH:
|
||||
*params = 0; // debug-group entrypoints are stubbed
|
||||
return;
|
||||
|
||||
@@ -25,6 +25,11 @@ namespace {
|
||||
return bracket == MobileGL::String::npos ? name : name.substr(0, bracket);
|
||||
}
|
||||
|
||||
static bool IsBuiltInPipelineOutput(const glslang::TObjectReflection& output) {
|
||||
const auto* type = output.getType();
|
||||
return type && type->getQualifier().builtIn != glslang::EbvNone;
|
||||
}
|
||||
|
||||
static int GetVertexInputLocationSpan(GLenum glType) {
|
||||
switch (glType) {
|
||||
case GL_FLOAT_MAT2:
|
||||
@@ -645,6 +650,10 @@ namespace MobileGL::MG_State::GLState {
|
||||
const Int outputCount = m_program->getNumPipeOutputs();
|
||||
for (Int index = 0; index < outputCount; ++index) {
|
||||
const auto& output = m_program->getPipeOutput(index);
|
||||
if (IsBuiltInPipelineOutput(output)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const String outputName = StripArrayElementSuffix(output.name);
|
||||
const auto explicitLocation = m_explicitFragDataLocation.find(outputName);
|
||||
const Int location = explicitLocation != m_explicitFragDataLocation.end()
|
||||
|
||||
Reference in New Issue
Block a user