[Feat] (...): advertise GL_OVR_multiview and GL_OVR_multiview2 on DirectGLES

- Each string follows the driver's own extension; DirectVulkan advertises neither yet
- The attachment's view count crosses the wire in MGPSurface, and num_views reaches
  the ESSL after a capability strip, outside the translation memo
This commit is contained in:
swung0x48 committed 2026-11-24 01:37:51 -04:00
1 parent 2bdbe052c6
commit bf87d75d70
45 files changed
+1450 -101

No files matched your search

@@ -324,6 +324,7 @@ public:
source(EShSourceNone),
useVulkanMemoryModel(false),
invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet),
numViews(TQualifier::layoutNotSet),
inputPrimitive(ElgNone), outputPrimitive(ElgNone),
pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false),
vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
@@ -901,6 +902,16 @@ public:
return true;
}
int getInvocations() const { return invocations; }
// GL_OVR_multiview's layout(num_views = N) in; of a vertex shader. SPIR-V has no way to say
// it, so a consumer that emits GLSL from the module reads it here.
bool setNumViews(int n)
{
if (numViews != TQualifier::layoutNotSet)
return numViews == n;
numViews = n;
return true;
}
int getNumViews() const { return numViews; }
bool setVertices(int m)
{
if (vertices != TQualifier::layoutNotSet)
@@ -1286,6 +1297,7 @@ protected:
bool useVulkanMemoryModel;
int invocations;
int vertices;
int numViews;
TLayoutGeometry inputPrimitive;
TLayoutGeometry outputPrimitive;
bool pixelCenterInteger;