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
77e3900a
Commit
77e3900a
authored
Jun 11, 2013
by
Geoff Lang
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a non-default rasterizer state to Blit11 so it can preform inverted blits.
TRAC #23211 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent
b0c75cc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
Blit11.cpp
src/libGLESv2/renderer/Blit11.cpp
+19
-1
Blit11.h
src/libGLESv2/renderer/Blit11.h
+1
-0
No files found.
src/libGLESv2/renderer/Blit11.cpp
View file @
77e3900a
...
@@ -109,6 +109,23 @@ Blit11::Blit11(rx::Renderer11 *renderer)
...
@@ -109,6 +109,23 @@ Blit11::Blit11(rx::Renderer11 *renderer)
ASSERT
(
SUCCEEDED
(
result
));
ASSERT
(
SUCCEEDED
(
result
));
d3d11
::
SetDebugName
(
mLinearSampler
,
"Blit11 linear sampler"
);
d3d11
::
SetDebugName
(
mLinearSampler
,
"Blit11 linear sampler"
);
// Use a rasterizer state that will not cull so that inverted quads will not be culled
D3D11_RASTERIZER_DESC
rasterDesc
;
rasterDesc
.
FillMode
=
D3D11_FILL_SOLID
;
rasterDesc
.
CullMode
=
D3D11_CULL_NONE
;
rasterDesc
.
FrontCounterClockwise
=
FALSE
;
rasterDesc
.
DepthBias
=
0
;
rasterDesc
.
SlopeScaledDepthBias
=
0.0
f
;
rasterDesc
.
DepthBiasClamp
=
0.0
f
;
rasterDesc
.
DepthClipEnable
=
TRUE
;
rasterDesc
.
ScissorEnable
=
FALSE
;
rasterDesc
.
MultisampleEnable
=
FALSE
;
rasterDesc
.
AntialiasedLineEnable
=
FALSE
;
result
=
device
->
CreateRasterizerState
(
&
rasterDesc
,
&
mRasterizerState
);
ASSERT
(
SUCCEEDED
(
result
));
d3d11
::
SetDebugName
(
mRasterizerState
,
"Blit11 rasterizer state"
);
D3D11_INPUT_ELEMENT_DESC
quad2DLayout
[]
=
D3D11_INPUT_ELEMENT_DESC
quad2DLayout
[]
=
{
{
{
"POSITION"
,
0
,
DXGI_FORMAT_R32G32_FLOAT
,
0
,
0
,
D3D11_INPUT_PER_VERTEX_DATA
,
0
},
{
"POSITION"
,
0
,
DXGI_FORMAT_R32G32_FLOAT
,
0
,
0
,
D3D11_INPUT_PER_VERTEX_DATA
,
0
},
...
@@ -150,6 +167,7 @@ Blit11::~Blit11()
...
@@ -150,6 +167,7 @@ Blit11::~Blit11()
SafeRelease
(
mVertexBuffer
);
SafeRelease
(
mVertexBuffer
);
SafeRelease
(
mPointSampler
);
SafeRelease
(
mPointSampler
);
SafeRelease
(
mLinearSampler
);
SafeRelease
(
mLinearSampler
);
SafeRelease
(
mRasterizerState
);
SafeRelease
(
mQuad2DIL
);
SafeRelease
(
mQuad2DIL
);
SafeRelease
(
mQuad2DVS
);
SafeRelease
(
mQuad2DVS
);
...
@@ -223,7 +241,7 @@ bool Blit11::copyTexture(ID3D11ShaderResourceView *source, const gl::Box &source
...
@@ -223,7 +241,7 @@ bool Blit11::copyTexture(ID3D11ShaderResourceView *source, const gl::Box &source
// Apply state
// Apply state
deviceContext
->
OMSetBlendState
(
NULL
,
NULL
,
0xFFFFFFF
);
deviceContext
->
OMSetBlendState
(
NULL
,
NULL
,
0xFFFFFFF
);
deviceContext
->
OMSetDepthStencilState
(
NULL
,
0xFFFFFFFF
);
deviceContext
->
OMSetDepthStencilState
(
NULL
,
0xFFFFFFFF
);
deviceContext
->
RSSetState
(
NULL
);
deviceContext
->
RSSetState
(
mRasterizerState
);
// Apply shaders
// Apply shaders
deviceContext
->
IASetInputLayout
(
shader
.
mInputLayout
);
deviceContext
->
IASetInputLayout
(
shader
.
mInputLayout
);
...
...
src/libGLESv2/renderer/Blit11.h
View file @
77e3900a
...
@@ -71,6 +71,7 @@ class Blit11
...
@@ -71,6 +71,7 @@ class Blit11
ID3D11Buffer
*
mVertexBuffer
;
ID3D11Buffer
*
mVertexBuffer
;
ID3D11SamplerState
*
mPointSampler
;
ID3D11SamplerState
*
mPointSampler
;
ID3D11SamplerState
*
mLinearSampler
;
ID3D11SamplerState
*
mLinearSampler
;
ID3D11RasterizerState
*
mRasterizerState
;
ID3D11InputLayout
*
mQuad2DIL
;
ID3D11InputLayout
*
mQuad2DIL
;
ID3D11VertexShader
*
mQuad2DVS
;
ID3D11VertexShader
*
mQuad2DVS
;
...
...
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