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
efc551f0
Commit
efc551f0
authored
Oct 31, 2013
by
Geoff Lang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrectly named test class members and wrong shader compilation
function being used. TRAC #23776 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
parent
d5ee05cc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
71 deletions
+111
-71
ANGLETest.cpp
tests/angle_tests/ANGLETest.cpp
+72
-33
ANGLETest.h
tests/angle_tests/ANGLETest.h
+14
-13
BlitFramebufferANGLETest.cpp
tests/angle_tests/BlitFramebufferANGLETest.cpp
+5
-5
ClearTest.cpp
tests/angle_tests/ClearTest.cpp
+5
-5
OcclusionQueriesTest.cpp
tests/angle_tests/OcclusionQueriesTest.cpp
+5
-5
UnpackAlignmentTest.cpp
tests/angle_tests/UnpackAlignmentTest.cpp
+5
-5
VertexAttributeTest.cpp
tests/angle_tests/VertexAttributeTest.cpp
+5
-5
No files found.
tests/angle_tests/ANGLETest.cpp
View file @
efc551f0
#include "ANGLETest.h"
#include "ANGLETest.h"
ANGLETest
::
ANGLETest
()
ANGLETest
::
ANGLETest
()
:
mClientVersion
(
2
)
:
mClientVersion
(
2
)
,
,
mWidth
(
1280
)
mWidth
(
1280
),
,
mHeight
(
720
)
mHeight
(
720
),
,
mRedBits
(
-
1
)
mRedBits
(
-
1
),
,
mGreenBits
(
-
1
)
mGreenBits
(
-
1
),
,
mBlueBits
(
-
1
)
mBlueBits
(
-
1
),
,
mAlphaBits
(
-
1
)
mAlphaBits
(
-
1
),
,
mDepthBits
(
-
1
)
mDepthBits
(
-
1
),
,
mStencilBits
(
-
1
)
mStencilBits
(
-
1
),
,
mMultisample
(
false
)
mMultisample
(
false
)
{
{
}
}
...
@@ -69,21 +69,52 @@ void ANGLETest::drawQuad(GLuint program, const std::string& positionAttribName,
...
@@ -69,21 +69,52 @@ void ANGLETest::drawQuad(GLuint program, const std::string& positionAttribName,
glUseProgram
(
0
);
glUseProgram
(
0
);
}
}
GLuint
ANGLETest
::
compileShader
(
GLenum
type
,
const
std
::
string
&
source
)
{
GLuint
shader
=
glCreateShader
(
type
);
const
char
*
sourceArray
[
1
]
=
{
source
.
c_str
()
};
glShaderSource
(
shader
,
1
,
sourceArray
,
NULL
);
glCompileShader
(
shader
);
GLint
compileResult
;
glGetShaderiv
(
shader
,
GL_COMPILE_STATUS
,
&
compileResult
);
if
(
compileResult
==
0
)
{
GLint
infoLogLength
;
glGetShaderiv
(
shader
,
GL_INFO_LOG_LENGTH
,
&
infoLogLength
);
std
::
vector
<
GLchar
>
infoLog
(
infoLogLength
);
glGetShaderInfoLog
(
shader
,
infoLog
.
size
(),
NULL
,
infoLog
.
data
());
std
::
cerr
<<
"shader compilation failed: "
<<
infoLog
.
data
();
glDeleteShader
(
shader
);
shader
=
0
;
}
return
shader
;
}
GLuint
ANGLETest
::
compileProgram
(
const
std
::
string
&
vsSource
,
const
std
::
string
&
fsSource
)
GLuint
ANGLETest
::
compileProgram
(
const
std
::
string
&
vsSource
,
const
std
::
string
&
fsSource
)
{
{
GLuint
program
=
glCreateProgram
();
GLuint
program
=
glCreateProgram
();
GLuint
vs
=
glCreateShader
(
GL_VERTEX_SHADER
);
GLuint
vs
=
compileShader
(
GL_VERTEX_SHADER
,
vsSource
);
const
char
*
vsSourceArray
[
1
]
=
{
vsSource
.
c_str
()
};
GLuint
fs
=
compileShader
(
GL_FRAGMENT_SHADER
,
fsSource
);
glShaderSource
(
vs
,
1
,
vsSourceArray
,
NULL
);
glCompileShader
(
vs
);
if
(
vs
==
0
||
fs
==
0
)
{
glDeleteShader
(
fs
);
glDeleteShader
(
vs
);
glDeleteProgram
(
program
);
return
0
;
}
glAttachShader
(
program
,
vs
);
glAttachShader
(
program
,
vs
);
glDeleteShader
(
vs
);
glDeleteShader
(
vs
);
GLuint
fs
=
glCreateShader
(
GL_FRAGMENT_SHADER
);
const
char
*
fsSourceArray
[
1
]
=
{
fsSource
.
c_str
()
};
glShaderSource
(
fs
,
1
,
fsSourceArray
,
NULL
);
glCompileShader
(
fs
);
glAttachShader
(
program
,
fs
);
glAttachShader
(
program
,
fs
);
glDeleteShader
(
fs
);
glDeleteShader
(
fs
);
...
@@ -92,10 +123,18 @@ GLuint ANGLETest::compileProgram(const std::string &vsSource, const std::string
...
@@ -92,10 +123,18 @@ GLuint ANGLETest::compileProgram(const std::string &vsSource, const std::string
GLint
linkStatus
;
GLint
linkStatus
;
glGetProgramiv
(
program
,
GL_LINK_STATUS
,
&
linkStatus
);
glGetProgramiv
(
program
,
GL_LINK_STATUS
,
&
linkStatus
);
if
(
!
linkStatus
)
if
(
linkStatus
==
0
)
{
{
GLint
infoLogLength
;
glGetProgramiv
(
program
,
GL_INFO_LOG_LENGTH
,
&
infoLogLength
);
std
::
vector
<
GLchar
>
infoLog
(
infoLogLength
);
glGetProgramInfoLog
(
program
,
infoLog
.
size
(),
NULL
,
infoLog
.
data
());
std
::
cerr
<<
"program link failed: "
<<
infoLog
.
data
();
glDeleteProgram
(
program
);
glDeleteProgram
(
program
);
program
=
0
;
return
0
;
}
}
return
program
;
return
program
;
...
@@ -122,32 +161,32 @@ void ANGLETest::setWindowHeight(int height)
...
@@ -122,32 +161,32 @@ void ANGLETest::setWindowHeight(int height)
mHeight
=
height
;
mHeight
=
height
;
}
}
void
ANGLETest
::
setRedBits
(
int
bits
)
void
ANGLETest
::
set
Config
RedBits
(
int
bits
)
{
{
mRedBits
=
bits
;
mRedBits
=
bits
;
}
}
void
ANGLETest
::
setGreenBits
(
int
bits
)
void
ANGLETest
::
set
Config
GreenBits
(
int
bits
)
{
{
mGreenBits
=
bits
;
mGreenBits
=
bits
;
}
}
void
ANGLETest
::
setBlueBits
(
int
bits
)
void
ANGLETest
::
set
Config
BlueBits
(
int
bits
)
{
{
mBlueBits
=
bits
;
mBlueBits
=
bits
;
}
}
void
ANGLETest
::
setAlphaBits
(
int
bits
)
void
ANGLETest
::
set
Config
AlphaBits
(
int
bits
)
{
{
mAlphaBits
=
bits
;
mAlphaBits
=
bits
;
}
}
void
ANGLETest
::
setDepthBits
(
int
bits
)
void
ANGLETest
::
set
Config
DepthBits
(
int
bits
)
{
{
mDepthBits
=
bits
;
mDepthBits
=
bits
;
}
}
void
ANGLETest
::
setStencilBits
(
int
bits
)
void
ANGLETest
::
set
Config
StencilBits
(
int
bits
)
{
{
mStencilBits
=
bits
;
mStencilBits
=
bits
;
}
}
...
@@ -172,37 +211,37 @@ int ANGLETest::getWindowHeight() const
...
@@ -172,37 +211,37 @@ int ANGLETest::getWindowHeight() const
return
mHeight
;
return
mHeight
;
}
}
int
ANGLETest
::
getRedBits
()
const
int
ANGLETest
::
get
Config
RedBits
()
const
{
{
return
mRedBits
;
return
mRedBits
;
}
}
int
ANGLETest
::
getGreenBits
()
const
int
ANGLETest
::
get
Config
GreenBits
()
const
{
{
return
mGreenBits
;
return
mGreenBits
;
}
}
int
ANGLETest
::
getBlueBits
()
const
int
ANGLETest
::
get
Config
BlueBits
()
const
{
{
return
mBlueBits
;
return
mBlueBits
;
}
}
int
ANGLETest
::
getAlphaBits
()
const
int
ANGLETest
::
get
Config
AlphaBits
()
const
{
{
return
mAlphaBits
;
return
mAlphaBits
;
}
}
int
ANGLETest
::
getDepthBits
()
const
int
ANGLETest
::
get
Config
DepthBits
()
const
{
{
return
mDepthBits
;
return
mDepthBits
;
}
}
int
ANGLETest
::
getStencilBits
()
const
int
ANGLETest
::
get
Config
StencilBits
()
const
{
{
return
mStencilBits
;
return
mStencilBits
;
}
}
bool
ANGLETest
::
m
ultisampleEnabled
()
const
bool
ANGLETest
::
isM
ultisampleEnabled
()
const
{
{
return
mMultisample
;
return
mMultisample
;
}
}
...
...
tests/angle_tests/ANGLETest.h
View file @
efc551f0
...
@@ -54,30 +54,31 @@ class ANGLETest : public testing::Test
...
@@ -54,30 +54,31 @@ class ANGLETest : public testing::Test
virtual
void
swapBuffers
();
virtual
void
swapBuffers
();
static
void
drawQuad
(
GLuint
program
,
const
std
::
string
&
positionAttribName
,
GLfloat
quadDepth
);
static
void
drawQuad
(
GLuint
program
,
const
std
::
string
&
positionAttribName
,
GLfloat
quadDepth
);
static
GLuint
compileShader
(
GLenum
type
,
const
std
::
string
&
source
);
static
GLuint
compileProgram
(
const
std
::
string
&
vsSource
,
const
std
::
string
&
fsSource
);
static
GLuint
compileProgram
(
const
std
::
string
&
vsSource
,
const
std
::
string
&
fsSource
);
static
bool
extensionEnabled
(
const
std
::
string
&
extName
);
static
bool
extensionEnabled
(
const
std
::
string
&
extName
);
void
setClientVersion
(
int
clientVersion
);
void
setClientVersion
(
int
clientVersion
);
void
setWindowWidth
(
int
width
);
void
setWindowWidth
(
int
width
);
void
setWindowHeight
(
int
height
);
void
setWindowHeight
(
int
height
);
void
setRedBits
(
int
bits
);
void
set
Config
RedBits
(
int
bits
);
void
setGreenBits
(
int
bits
);
void
set
Config
GreenBits
(
int
bits
);
void
setBlueBits
(
int
bits
);
void
set
Config
BlueBits
(
int
bits
);
void
setAlphaBits
(
int
bits
);
void
set
Config
AlphaBits
(
int
bits
);
void
setDepthBits
(
int
bits
);
void
set
Config
DepthBits
(
int
bits
);
void
setStencilBits
(
int
bits
);
void
set
Config
StencilBits
(
int
bits
);
void
setMultisampleEnabled
(
bool
enabled
);
void
setMultisampleEnabled
(
bool
enabled
);
int
getClientVersion
()
const
;
int
getClientVersion
()
const
;
int
getWindowWidth
()
const
;
int
getWindowWidth
()
const
;
int
getWindowHeight
()
const
;
int
getWindowHeight
()
const
;
int
getRedBits
()
const
;
int
get
Config
RedBits
()
const
;
int
getGreenBits
()
const
;
int
get
Config
GreenBits
()
const
;
int
getBlueBits
()
const
;
int
get
Config
BlueBits
()
const
;
int
getAlphaBits
()
const
;
int
get
Config
AlphaBits
()
const
;
int
getDepthBits
()
const
;
int
get
Config
DepthBits
()
const
;
int
getStencilBits
()
const
;
int
get
Config
StencilBits
()
const
;
bool
m
ultisampleEnabled
()
const
;
bool
isM
ultisampleEnabled
()
const
;
private
:
private
:
bool
createEGLContext
();
bool
createEGLContext
();
...
...
tests/angle_tests/BlitFramebufferANGLETest.cpp
View file @
efc551f0
...
@@ -7,11 +7,11 @@ protected:
...
@@ -7,11 +7,11 @@ protected:
{
{
setWindowWidth
(
256
);
setWindowWidth
(
256
);
setWindowHeight
(
256
);
setWindowHeight
(
256
);
setRedBits
(
8
);
set
Config
RedBits
(
8
);
setGreenBits
(
8
);
set
Config
GreenBits
(
8
);
setBlueBits
(
8
);
set
Config
BlueBits
(
8
);
setAlphaBits
(
8
);
set
Config
AlphaBits
(
8
);
setDepthBits
(
24
);
set
Config
DepthBits
(
24
);
mCheckerProgram
=
0
;
mCheckerProgram
=
0
;
mBlueProgram
=
0
;
mBlueProgram
=
0
;
...
...
tests/angle_tests/ClearTest.cpp
View file @
efc551f0
...
@@ -7,11 +7,11 @@ protected:
...
@@ -7,11 +7,11 @@ protected:
{
{
setWindowWidth
(
128
);
setWindowWidth
(
128
);
setWindowHeight
(
128
);
setWindowHeight
(
128
);
setRedBits
(
8
);
set
Config
RedBits
(
8
);
setGreenBits
(
8
);
set
Config
GreenBits
(
8
);
setBlueBits
(
8
);
set
Config
BlueBits
(
8
);
setAlphaBits
(
8
);
set
Config
AlphaBits
(
8
);
setDepthBits
(
24
);
set
Config
DepthBits
(
24
);
}
}
virtual
void
SetUp
()
virtual
void
SetUp
()
...
...
tests/angle_tests/OcclusionQueriesTest.cpp
View file @
efc551f0
...
@@ -7,11 +7,11 @@ protected:
...
@@ -7,11 +7,11 @@ protected:
{
{
setWindowWidth
(
128
);
setWindowWidth
(
128
);
setWindowHeight
(
128
);
setWindowHeight
(
128
);
setRedBits
(
8
);
set
Config
RedBits
(
8
);
setGreenBits
(
8
);
set
Config
GreenBits
(
8
);
setBlueBits
(
8
);
set
Config
BlueBits
(
8
);
setAlphaBits
(
8
);
set
Config
AlphaBits
(
8
);
setDepthBits
(
24
);
set
Config
DepthBits
(
24
);
mProgram
=
0
;
mProgram
=
0
;
}
}
...
...
tests/angle_tests/UnpackAlignmentTest.cpp
View file @
efc551f0
...
@@ -9,11 +9,11 @@ protected:
...
@@ -9,11 +9,11 @@ protected:
{
{
setWindowWidth
(
128
);
setWindowWidth
(
128
);
setWindowHeight
(
128
);
setWindowHeight
(
128
);
setRedBits
(
8
);
set
Config
RedBits
(
8
);
setGreenBits
(
8
);
set
Config
GreenBits
(
8
);
setBlueBits
(
8
);
set
Config
BlueBits
(
8
);
setAlphaBits
(
8
);
set
Config
AlphaBits
(
8
);
setDepthBits
(
24
);
set
Config
DepthBits
(
24
);
mProgram
=
0
;
mProgram
=
0
;
}
}
...
...
tests/angle_tests/VertexAttributeTest.cpp
View file @
efc551f0
...
@@ -7,11 +7,11 @@ protected:
...
@@ -7,11 +7,11 @@ protected:
{
{
setWindowWidth
(
128
);
setWindowWidth
(
128
);
setWindowHeight
(
128
);
setWindowHeight
(
128
);
setRedBits
(
8
);
set
Config
RedBits
(
8
);
setGreenBits
(
8
);
set
Config
GreenBits
(
8
);
setBlueBits
(
8
);
set
Config
BlueBits
(
8
);
setAlphaBits
(
8
);
set
Config
AlphaBits
(
8
);
setDepthBits
(
24
);
set
Config
DepthBits
(
24
);
mProgram
=
0
;
mProgram
=
0
;
mTestAttrib
=
-
1
;
mTestAttrib
=
-
1
;
...
...
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