Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
0fda9868
Commit
0fda9868
authored
Jul 19, 2013
by
Jamie Madill
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Context::getInteger64v for 64-bit integer state queries.
TRAC #23082 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Authored-by: Jamie Madill
parent
af496913
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
angleutils.h
src/common/angleutils.h
+1
-0
Context.cpp
src/libGLESv2/Context.cpp
+46
-0
Context.h
src/libGLESv2/Context.h
+2
-1
No files found.
src/common/angleutils.h
View file @
0fda9868
...
@@ -52,5 +52,6 @@ void SafeRelease(T& resource)
...
@@ -52,5 +52,6 @@ void SafeRelease(T& resource)
#define GL_BGRA4_ANGLEX 0x6ABC
#define GL_BGRA4_ANGLEX 0x6ABC
#define GL_BGR5_A1_ANGLEX 0x6ABD
#define GL_BGR5_A1_ANGLEX 0x6ABD
#define GL_INT_64_ANGLEX 0x6ABE
#endif // COMMON_ANGLEUTILS_H_
#endif // COMMON_ANGLEUTILS_H_
src/libGLESv2/Context.cpp
View file @
0fda9868
...
@@ -1817,6 +1817,41 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
...
@@ -1817,6 +1817,41 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
return
true
;
return
true
;
}
}
bool
Context
::
getInteger64v
(
GLenum
pname
,
GLint64
*
params
)
{
switch
(
pname
)
{
case
GL_MAX_ELEMENT_INDEX
:
*
params
=
static_cast
<
GLint64
>
(
std
::
numeric_limits
<
unsigned
int
>::
max
());
break
;
case
GL_MAX_UNIFORM_BLOCK_SIZE
:
*
params
=
static_cast
<
GLint64
>
(
mRenderer
->
getMaxUniformBufferSize
());
break
;
case
GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
:
{
GLint64
uniformBufferComponents
=
static_cast
<
GLint64
>
(
mRenderer
->
getMaxVertexShaderUniformBuffers
())
*
static_cast
<
GLint64
>
(
mRenderer
->
getMaxUniformBufferSize
()
/
4
);
GLint64
defaultBufferComponents
=
static_cast
<
GLint64
>
(
mRenderer
->
getMaxVertexUniformVectors
()
*
4
);
*
params
=
uniformBufferComponents
+
defaultBufferComponents
;
}
break
;
case
GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
:
{
GLint64
uniformBufferComponents
=
static_cast
<
GLint64
>
(
mRenderer
->
getMaxFragmentShaderUniformBuffers
())
*
static_cast
<
GLint64
>
(
mRenderer
->
getMaxUniformBufferSize
()
/
4
);
GLint64
defaultBufferComponents
=
static_cast
<
GLint64
>
(
mRenderer
->
getMaxVertexUniformVectors
()
*
4
);
*
params
=
uniformBufferComponents
+
defaultBufferComponents
;
}
break
;
case
GL_MAX_SERVER_WAIT_TIMEOUT
:
// Can return an arbitrary value (nanoseconds) as we do not perform any blocking, in this case 100 seconds.
*
params
=
100ll
*
1000ll
*
1000ll
;
break
;
default
:
return
false
;
}
return
true
;
}
bool
Context
::
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
)
bool
Context
::
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
)
{
{
if
(
pname
>=
GL_DRAW_BUFFER0_EXT
&&
pname
<=
GL_DRAW_BUFFER15_EXT
)
if
(
pname
>=
GL_DRAW_BUFFER0_EXT
&&
pname
<=
GL_DRAW_BUFFER15_EXT
)
...
@@ -2031,6 +2066,17 @@ bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *nu
...
@@ -2031,6 +2066,17 @@ bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *nu
*
numParams
=
1
;
*
numParams
=
1
;
}
}
return
true
;
return
true
;
case
GL_MAX_ELEMENT_INDEX
:
case
GL_MAX_UNIFORM_BLOCK_SIZE
:
case
GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
:
case
GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
:
case
GL_MAX_SERVER_WAIT_TIMEOUT
:
{
*
type
=
GL_INT_64_ANGLEX
;
*
numParams
=
1
;
}
return
true
;
}
}
return
false
;
return
false
;
...
...
src/libGLESv2/Context.h
View file @
0fda9868
...
@@ -336,9 +336,10 @@ class Context
...
@@ -336,9 +336,10 @@ class Context
Framebuffer
*
getDrawFramebuffer
();
Framebuffer
*
getDrawFramebuffer
();
VertexArray
*
getCurrentVertexArray
()
const
;
VertexArray
*
getCurrentVertexArray
()
const
;
bool
getBooleanv
(
GLenum
pname
,
GLboolean
*
params
);
bool
getFloatv
(
GLenum
pname
,
GLfloat
*
params
);
bool
getFloatv
(
GLenum
pname
,
GLfloat
*
params
);
bool
getIntegerv
(
GLenum
pname
,
GLint
*
params
);
bool
getIntegerv
(
GLenum
pname
,
GLint
*
params
);
bool
get
Booleanv
(
GLenum
pname
,
GLboolean
*
params
);
bool
get
Integer64v
(
GLenum
pname
,
GLint64
*
params
);
bool
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
);
bool
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment