Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle GL_MAX_VIEWS_OVR in glGetInteger #1583

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should default to 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the minimum is 2.

CompressedTextureFormats: NewU32ːGLenumᵐ(),
ProgramBinaryFormats: NewU32ːGLenumᵐ(),
ShaderBinaryFormats: NewU32ːGLenumᵐ(),
Expand Down