Skip to content

Commit

Permalink
Handle GL_MAX_VIEWS_OVR in glGetInteger.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuetschard committed Mar 2, 2018
1 parent 0c50b23 commit b45397b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions gapii/cc/gles_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
1 change: 1 addition & 0 deletions gapis/api/gles/api/constants.api
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class Constants {

// Constants defined in extensions
GLfloat MaxTextureMaxAnisotropyExt
GLint MaxViewsExt
}

@internal
Expand Down
4 changes: 4 additions & 0 deletions gapis/api/gles/api/state_queries.api
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions gapis/api/gles/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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ᵐ(),
Expand Down

0 comments on commit b45397b

Please sign in to comment.