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
91f68c4c
Commit
91f68c4c
authored
Jun 18, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jun 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix non-multisampled line rasterization.
#23334 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
d089bd98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
Context.cpp
src/libGLESv2/Context.cpp
+7
-2
angletypes.h
src/libGLESv2/angletypes.h
+2
-1
RenderStateCache.cpp
src/libGLESv2/renderer/RenderStateCache.cpp
+1
-1
No files found.
src/libGLESv2/Context.cpp
View file @
91f68c4c
...
@@ -60,6 +60,7 @@ Context::Context(const gl::Context *shareContext, rx::Renderer *renderer, bool n
...
@@ -60,6 +60,7 @@ Context::Context(const gl::Context *shareContext, rx::Renderer *renderer, bool n
mState
.
rasterizer
.
polygonOffsetFactor
=
0.0
f
;
mState
.
rasterizer
.
polygonOffsetFactor
=
0.0
f
;
mState
.
rasterizer
.
polygonOffsetUnits
=
0.0
f
;
mState
.
rasterizer
.
polygonOffsetUnits
=
0.0
f
;
mState
.
rasterizer
.
pointDrawMode
=
false
;
mState
.
rasterizer
.
pointDrawMode
=
false
;
mState
.
rasterizer
.
multiSample
=
false
;
mState
.
scissorTest
=
false
;
mState
.
scissorTest
=
false
;
mState
.
scissor
.
x
=
0
;
mState
.
scissor
.
x
=
0
;
mState
.
scissor
.
y
=
0
;
mState
.
scissor
.
y
=
0
;
...
@@ -1741,7 +1742,11 @@ bool Context::applyRenderTarget(GLenum drawMode, bool ignoreViewport)
...
@@ -1741,7 +1742,11 @@ bool Context::applyRenderTarget(GLenum drawMode, bool ignoreViewport)
// Applies the fixed-function state (culling, depth test, alpha blending, stenciling, etc) to the Direct3D 9 device
// Applies the fixed-function state (culling, depth test, alpha blending, stenciling, etc) to the Direct3D 9 device
void
Context
::
applyState
(
GLenum
drawMode
)
void
Context
::
applyState
(
GLenum
drawMode
)
{
{
Framebuffer
*
framebufferObject
=
getDrawFramebuffer
();
int
samples
=
framebufferObject
->
getSamples
();
mState
.
rasterizer
.
pointDrawMode
=
(
drawMode
==
GL_POINTS
);
mState
.
rasterizer
.
pointDrawMode
=
(
drawMode
==
GL_POINTS
);
mState
.
rasterizer
.
multiSample
=
(
samples
!=
0
);
mRenderer
->
setRasterizerState
(
mState
.
rasterizer
);
mRenderer
->
setRasterizerState
(
mState
.
rasterizer
);
unsigned
int
mask
=
0
;
unsigned
int
mask
=
0
;
...
@@ -1749,10 +1754,10 @@ void Context::applyState(GLenum drawMode)
...
@@ -1749,10 +1754,10 @@ void Context::applyState(GLenum drawMode)
{
{
if
(
mState
.
sampleCoverageValue
!=
0
)
if
(
mState
.
sampleCoverageValue
!=
0
)
{
{
Framebuffer
*
framebufferObject
=
getDrawFramebuffer
();
float
threshold
=
0.5
f
;
float
threshold
=
0.5
f
;
for
(
int
i
=
0
;
i
<
framebufferObject
->
getSamples
()
;
++
i
)
for
(
int
i
=
0
;
i
<
samples
;
++
i
)
{
{
mask
<<=
1
;
mask
<<=
1
;
...
...
src/libGLESv2/angletypes.h
View file @
91f68c4c
//
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2012
-2013
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
//
//
...
@@ -54,6 +54,7 @@ struct RasterizerState
...
@@ -54,6 +54,7 @@ struct RasterizerState
GLfloat
polygonOffsetUnits
;
GLfloat
polygonOffsetUnits
;
bool
pointDrawMode
;
bool
pointDrawMode
;
bool
multiSample
;
};
};
struct
BlendState
struct
BlendState
...
...
src/libGLESv2/renderer/RenderStateCache.cpp
View file @
91f68c4c
...
@@ -231,7 +231,7 @@ ID3D11RasterizerState *RenderStateCache::getRasterizerState(const gl::Rasterizer
...
@@ -231,7 +231,7 @@ ID3D11RasterizerState *RenderStateCache::getRasterizerState(const gl::Rasterizer
rasterDesc
.
SlopeScaledDepthBias
=
rasterState
.
polygonOffsetFactor
;
rasterDesc
.
SlopeScaledDepthBias
=
rasterState
.
polygonOffsetFactor
;
rasterDesc
.
DepthClipEnable
=
TRUE
;
rasterDesc
.
DepthClipEnable
=
TRUE
;
rasterDesc
.
ScissorEnable
=
scissorEnabled
?
TRUE
:
FALSE
;
rasterDesc
.
ScissorEnable
=
scissorEnabled
?
TRUE
:
FALSE
;
rasterDesc
.
MultisampleEnable
=
TRUE
;
rasterDesc
.
MultisampleEnable
=
rasterState
.
multiSample
;
rasterDesc
.
AntialiasedLineEnable
=
FALSE
;
rasterDesc
.
AntialiasedLineEnable
=
FALSE
;
ID3D11RasterizerState
*
dx11RasterizerState
=
NULL
;
ID3D11RasterizerState
*
dx11RasterizerState
=
NULL
;
...
...
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