Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e6efb797
Commit
e6efb797
authored
May 27, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make "packed_output" a bitmap.
parent
10fadadc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+16
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/baseshader.c
View file @
e6efb797
...
...
@@ -416,7 +416,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
/* Vshader: mark 3.0 output registers used, save token */
case
WINED3DSPR_OUTPUT
:
reg_maps
->
packed_output
[
semantic
.
reg
.
reg
.
idx
]
=
1
;
reg_maps
->
output_registers
|=
1
<<
semantic
.
reg
.
reg
.
idx
;
semantics_out
[
semantic
.
reg
.
reg
.
idx
]
=
semantic
;
if
(
semantic
.
usage
==
WINED3DDECLUSAGE_FOG
)
reg_maps
->
fog
=
1
;
break
;
...
...
dlls/wined3d/glsl_shader.c
View file @
e6efb797
...
...
@@ -3288,7 +3288,7 @@ static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_in
DWORD
in_count
=
vec4_varyings
(
3
,
gl_info
);
char
reg_mask
[
6
],
reg_mask_out
[
6
];
char
destination
[
50
];
WORD
input_map
;
WORD
input_map
,
output_map
;
set
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
set
)
*
(
in_count
+
2
));
...
...
@@ -3361,8 +3361,11 @@ static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_in
}
}
else
{
BOOL
found
=
FALSE
;
for
(
j
=
0
;
j
<
MAX_REG_OUTPUT
;
j
++
)
{
if
(
!
reg_maps_out
->
packed_output
[
j
])
continue
;
output_map
=
reg_maps_out
->
output_registers
;
for
(
j
=
0
;
output_map
;
output_map
>>=
1
,
++
j
)
{
if
(
!
(
output_map
&
1
))
continue
;
usage_out
=
semantics_out
[
j
].
usage
;
usage_idx_out
=
semantics_out
[
j
].
usage_idx
;
...
...
@@ -3465,12 +3468,15 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
shader_addline
(
&
buffer
,
"void order_ps_input() { /* do nothing */ }
\n
"
);
}
}
else
if
(
ps_major
<
3
&&
vs_major
>=
3
)
{
WORD
map
=
vs
->
baseShader
.
reg_maps
.
output_registers
;
/* The vertex shader writes to its own varyings, the pixel shader needs them in the builtin ones */
semantics_out
=
vs
->
semantics_out
;
shader_addline
(
&
buffer
,
"void order_ps_input(in vec4 OUT[%u]) {
\n
"
,
MAX_REG_OUTPUT
);
for
(
i
=
0
;
i
<
MAX_REG_OUTPUT
;
i
++
)
{
if
(
!
vs
->
baseShader
.
reg_maps
.
packed_output
[
i
])
continue
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
!
(
map
&
1
))
continue
;
usage
=
semantics_out
[
i
].
usage
;
usage_idx
=
semantics_out
[
i
].
usage_idx
;
...
...
@@ -3515,6 +3521,8 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
shader_addline
(
&
buffer
,
"}
\n
"
);
}
else
if
(
ps_major
>=
3
&&
vs_major
>=
3
)
{
WORD
map
=
vs
->
baseShader
.
reg_maps
.
output_registers
;
semantics_out
=
vs
->
semantics_out
;
/* This one is tricky: a 3.0 pixel shader reads from a 3.0 vertex shader */
...
...
@@ -3522,8 +3530,9 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
shader_addline
(
&
buffer
,
"void order_ps_input(in vec4 OUT[%u]) {
\n
"
,
MAX_REG_OUTPUT
);
/* First, sort out position and point size. Those are not passed to the pixel shader */
for
(
i
=
0
;
i
<
MAX_REG_OUTPUT
;
i
++
)
{
if
(
!
vs
->
baseShader
.
reg_maps
.
packed_output
[
i
])
continue
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
if
(
!
(
map
&
1
))
continue
;
usage
=
semantics_out
[
i
].
usage
;
usage_idx
=
semantics_out
[
i
].
usage_idx
;
...
...
dlls/wined3d/wined3d_private.h
View file @
e6efb797
...
...
@@ -621,11 +621,11 @@ typedef struct shader_reg_maps
char
texcoord
[
MAX_REG_TEXCRD
];
/* pixel < 3.0 */
char
temporary
[
MAX_REG_TEMP
];
/* pixel, vertex */
char
address
[
MAX_REG_ADDR
];
/* vertex */
char
packed_output
[
MAX_REG_OUTPUT
];
/* vertex >= 3.0 */
char
labels
[
MAX_LABELS
];
/* pixel, vertex */
DWORD
*
constf
;
/* pixel, vertex */
DWORD
texcoord_mask
[
MAX_REG_TEXCRD
];
/* vertex < 3.0 */
WORD
input_registers
;
/* max(MAX_REG_INPUT, MAX_ATTRIBS), 16 */
WORD
output_registers
;
/* MAX_REG_OUTPUT, 12 */
WORD
integer_constants
;
/* MAX_CONST_I, 16 */
WORD
boolean_constants
;
/* MAX_CONST_B, 16 */
...
...
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