diff --git a/gapii/cc/gles_context.cpp b/gapii/cc/gles_context.cpp index c31a7a7c4a..4a66d78fba 100644 --- a/gapii/cc/gles_context.cpp +++ b/gapii/cc/gles_context.cpp @@ -300,6 +300,7 @@ void GlesSpy::getContextConstants(Constants& out) { // Constants defined in extensions GET(glGetFloatv, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &out.mMaxTextureMaxAnisotropyExt); + GET(glGetIntegerv, GL_MAX_VIEWS_OVR, &out.mMaxViewsExt); } diff --git a/gapis/api/gles/api/constants.api b/gapis/api/gles/api/constants.api index 770a53b9eb..f88b7f678d 100644 --- a/gapis/api/gles/api/constants.api +++ b/gapis/api/gles/api/constants.api @@ -178,6 +178,7 @@ class Constants { // Constants defined in extensions GLfloat MaxTextureMaxAnisotropyExt + GLint MaxViewsExt } @internal diff --git a/gapis/api/gles/api/state_queries.api b/gapis/api/gles/api/state_queries.api index 8f38ad0dd1..e711733c71 100644 --- a/gapis/api/gles/api/state_queries.api +++ b/gapis/api/gles/api/state_queries.api @@ -1010,6 +1010,10 @@ sub void GetStateVariable!T(GLenum name, bool isIndexed, GLuint index, T* v) { case GL_MAX_VERTEX_UNIFORM_VECTORS: { v[0] = as!T(ctx.Constants.MaxVertexUniformVectors) } + @if(Extension.GL_OVR_multiview) + case GL_MAX_VIEWS_OVR: { + v[0] = as!T(ctx.Constants.MaxViewsExt) + } @if(Version.GLES20) case GL_MAX_VIEWPORT_DIMS: { s := v[0:2] diff --git a/gapis/api/gles/helpers.go b/gapis/api/gles/helpers.go index 7cc1d4782f..97bab7da7f 100644 --- a/gapis/api/gles/helpers.go +++ b/gapis/api/gles/helpers.go @@ -175,6 +175,7 @@ func DefaultConstants30() Constants { MaxTransformFeedbackSeparateAttribs: 4, MaxTransformFeedbackSeparateComponents: 4, MaxTextureMaxAnisotropyExt: 2.0, + MaxViewsExt: 2, CompressedTextureFormats: NewU32ːGLenumᵐ(), ProgramBinaryFormats: NewU32ːGLenumᵐ(), ShaderBinaryFormats: NewU32ːGLenumᵐ(),