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
53683053
Commit
53683053
authored
Oct 10, 2013
by
Jamie Madill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support the "fast path" (GPU copies) for pixel unpack buffers in TexImage3D.
TRAC #23846 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent
a2d4e55d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
0 deletions
+186
-0
PixelTransfer11.cpp
src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp
+2
-0
generate_shaders.bat
src/libGLESv2/renderer/d3d11/shaders/generate_shaders.bat
+1
-0
BufferToTexture11.hlsl
src/libGLESv2/renderer/shaders/BufferToTexture11.hlsl
+17
-0
buffertotexture11_gs.h
...ibGLESv2/renderer/shaders/compiled/buffertotexture11_gs.h
+166
-0
No files found.
src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp
View file @
53683053
...
...
@@ -24,6 +24,7 @@
// Precompiled shaders
#include "libGLESv2/renderer/shaders/compiled/buffertotexture11_vs.h"
#include "libGLESv2/renderer/shaders/compiled/buffertotexture11_gs.h"
#include "libGLESv2/renderer/shaders/compiled/buffertotexture11_ps_4f.h"
#include "libGLESv2/renderer/shaders/compiled/buffertotexture11_ps_4i.h"
#include "libGLESv2/renderer/shaders/compiled/buffertotexture11_ps_4ui.h"
...
...
@@ -106,6 +107,7 @@ PixelTransfer11::PixelTransfer11(Renderer11 *renderer)
// init shaders
mBufferToTextureVS
=
d3d11
::
CompileVS
(
device
,
g_VS_BufferToTexture
,
"BufferToTexture VS"
);
mBufferToTextureGS
=
d3d11
::
CompileGS
(
device
,
g_GS_BufferToTexture
,
"BufferToTexture GS"
);
buildShaderMap
();
...
...
src/libGLESv2/renderer/d3d11/shaders/generate_shaders.bat
View file @
53683053
...
...
@@ -65,6 +65,7 @@ call:BuildShader Clear11.hlsl VS_ClearSint vs_4_0 compiled\c
call:BuildShader Clear11.hlsl PS_ClearSint ps_4_0 compiled\clearsint11ps.h %debug%
call:BuildShader BufferToTexture11.hlsl VS_BufferToTexture vs_4_0 compiled/buffertotexture11_vs.h %debug%
call:BuildShader BufferToTexture11.hlsl GS_BufferToTexture gs_4_0 compiled/buffertotexture11_gs.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4F ps_4_0 compiled/buffertotexture11_ps_4f.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_2F ps_4_0 compiled/buffertotexture11_ps_2f.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_1F ps_4_0 compiled/buffertotexture11_ps_1f.h %debug%
...
...
src/libGLESv2/renderer/shaders/BufferToTexture11.hlsl
View file @
53683053
...
...
@@ -17,6 +17,13 @@ struct VS_OUTPUT
uint slice : LAYER;
};
struct GS_OUTPUT
{
float4 position : SV_Position;
uint index : TEXCOORD0;
uint slice : SV_RenderTargetArrayIndex;
};
cbuffer BufferCopyParams : register(b0)
{
uint FirstPixelOffset;
...
...
@@ -51,6 +58,16 @@ void VS_BufferToTexture(in uint vertexID : SV_VertexID, out VS_OUTPUT outVertex)
ComputePositionAndIndex(vertexID, outVertex);
}
[maxvertexcount(1)]
void GS_BufferToTexture(point VS_OUTPUT inVertex[1], inout PointStream<GS_OUTPUT> outStream)
{
GS_OUTPUT outVertex;
outVertex.position = inVertex[0].position;
outVertex.index = inVertex[0].index;
outVertex.slice = inVertex[0].slice;
outStream.Append(outVertex);
}
float4 PS_BufferToTexture_4F(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer4F.Load(inIndex);
...
...
src/libGLESv2/renderer/shaders/compiled/buffertotexture11_gs.h
0 → 100644
View file @
53683053
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// TEXCOORD 0 x 1 NONE uint x
// LAYER 0 y 1 NONE uint y
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// TEXCOORD 0 x 1 NONE uint x
// SV_RenderTargetArrayIndex 0 y 1 RTINDEX uint y
//
gs_4_0
dcl_input_siv v[1][0].xyzw, position
dcl_input v[1][1].x
dcl_input v[1][1].y
dcl_inputprimitive point
dcl_outputtopology pointlist
dcl_output_siv o0.xyzw, position
dcl_output o1.x
dcl_output_siv o1.y, rendertarget_array_index
dcl_maxout 1
mov o0.xyzw, v[0][0].xyzw
mov o1.x, v[0][1].x
mov o1.y, v[0][1].y
emit
ret
// Approximately 5 instruction slots used
#endif
const
BYTE
g_GS_BufferToTexture
[]
=
{
68
,
88
,
66
,
67
,
76
,
247
,
16
,
54
,
179
,
210
,
24
,
242
,
185
,
199
,
67
,
148
,
241
,
107
,
16
,
2
,
1
,
0
,
0
,
0
,
212
,
2
,
0
,
0
,
5
,
0
,
0
,
0
,
52
,
0
,
0
,
0
,
140
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
136
,
1
,
0
,
0
,
88
,
2
,
0
,
0
,
82
,
68
,
69
,
70
,
80
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
28
,
0
,
0
,
0
,
0
,
4
,
83
,
71
,
0
,
1
,
0
,
0
,
28
,
0
,
0
,
0
,
77
,
105
,
99
,
114
,
111
,
115
,
111
,
102
,
116
,
32
,
40
,
82
,
41
,
32
,
72
,
76
,
83
,
76
,
32
,
83
,
104
,
97
,
100
,
101
,
114
,
32
,
67
,
111
,
109
,
112
,
105
,
108
,
101
,
114
,
32
,
57
,
46
,
51
,
48
,
46
,
57
,
50
,
48
,
48
,
46
,
49
,
54
,
51
,
56
,
52
,
0
,
171
,
73
,
83
,
71
,
78
,
108
,
0
,
0
,
0
,
3
,
0
,
0
,
0
,
8
,
0
,
0
,
0
,
80
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
3
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
15
,
15
,
0
,
0
,
92
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
1
,
0
,
0
,
101
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
2
,
2
,
0
,
0
,
83
,
86
,
95
,
80
,
111
,
115
,
105
,
116
,
105
,
111
,
110
,
0
,
84
,
69
,
88
,
67
,
79
,
79
,
82
,
68
,
0
,
76
,
65
,
89
,
69
,
82
,
0
,
171
,
79
,
83
,
71
,
78
,
128
,
0
,
0
,
0
,
3
,
0
,
0
,
0
,
8
,
0
,
0
,
0
,
80
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
3
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
15
,
0
,
0
,
0
,
92
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
14
,
0
,
0
,
101
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
2
,
13
,
0
,
0
,
83
,
86
,
95
,
80
,
111
,
115
,
105
,
116
,
105
,
111
,
110
,
0
,
84
,
69
,
88
,
67
,
79
,
79
,
82
,
68
,
0
,
83
,
86
,
95
,
82
,
101
,
110
,
100
,
101
,
114
,
84
,
97
,
114
,
103
,
101
,
116
,
65
,
114
,
114
,
97
,
121
,
73
,
110
,
100
,
101
,
120
,
0
,
171
,
83
,
72
,
68
,
82
,
200
,
0
,
0
,
0
,
64
,
0
,
2
,
0
,
50
,
0
,
0
,
0
,
97
,
0
,
0
,
5
,
242
,
16
,
32
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
95
,
0
,
0
,
4
,
18
,
16
,
32
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
95
,
0
,
0
,
4
,
34
,
16
,
32
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
93
,
8
,
0
,
1
,
92
,
8
,
0
,
1
,
103
,
0
,
0
,
4
,
242
,
32
,
16
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
101
,
0
,
0
,
3
,
18
,
32
,
16
,
0
,
1
,
0
,
0
,
0
,
103
,
0
,
0
,
4
,
34
,
32
,
16
,
0
,
1
,
0
,
0
,
0
,
4
,
0
,
0
,
0
,
94
,
0
,
0
,
2
,
1
,
0
,
0
,
0
,
54
,
0
,
0
,
6
,
242
,
32
,
16
,
0
,
0
,
0
,
0
,
0
,
70
,
30
,
32
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
54
,
0
,
0
,
6
,
18
,
32
,
16
,
0
,
1
,
0
,
0
,
0
,
10
,
16
,
32
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
54
,
0
,
0
,
6
,
34
,
32
,
16
,
0
,
1
,
0
,
0
,
0
,
26
,
16
,
32
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
19
,
0
,
0
,
1
,
62
,
0
,
0
,
1
,
83
,
84
,
65
,
84
,
116
,
0
,
0
,
0
,
5
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
6
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
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