Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6fa9fa15
Commit
6fa9fa15
authored
Aug 11, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the "temporary" shader_reg_maps member a bitmap.
parent
50853e29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+13
-13
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6fa9fa15
...
...
@@ -659,9 +659,9 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s
}
}
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
temporary
;
i
++
)
{
if
(
reg_maps
->
temporary
[
i
])
shader_addline
(
buffer
,
"TEMP R%u;
\n
"
,
i
);
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"TEMP R%u;
\n
"
,
i
);
}
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
address
;
i
++
)
{
...
...
@@ -3215,21 +3215,21 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
BOOL
dcl_tmp
=
args
->
super
.
srgb_correction
,
dcl_td
=
FALSE
;
BOOL
want_nv_prog
=
FALSE
;
struct
arb_pshader_private
*
shader_priv
=
This
->
backend_priv
;
DWORD
map
;
char
srgbtmp
[
4
][
4
];
unsigned
int
i
,
found
=
0
;
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
temporary
;
i
++
)
{
/* Don't overwrite the color source */
if
(
This
->
color0_mov
&&
i
==
This
->
color0_reg
)
continue
;
else
if
(
reg_maps
->
shader_version
.
major
<
2
&&
i
==
0
)
continue
;
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
{
if
(
!
(
map
&
1
)
||
(
This
->
color0_mov
&&
i
==
This
->
color0_reg
)
||
(
reg_maps
->
shader_version
.
major
<
2
&&
i
==
0
))
continue
;
if
(
reg_maps
->
temporary
[
i
])
{
sprintf
(
srgbtmp
[
found
],
"R%u"
,
i
);
found
++
;
if
(
found
==
4
)
break
;
}
sprintf
(
srgbtmp
[
found
],
"R%u"
,
i
);
++
found
;
if
(
found
==
4
)
break
;
}
switch
(
found
)
{
...
...
dlls/wined3d/baseshader.c
View file @
6fa9fa15
...
...
@@ -262,7 +262,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
break
;
case
WINED3DSPR_TEMP
:
reg_maps
->
temporary
[
reg
->
idx
]
=
1
;
reg_maps
->
temporary
|=
1
<<
reg
->
idx
;
break
;
case
WINED3DSPR_INPUT
:
...
...
dlls/wined3d/glsl_shader.c
View file @
6fa9fa15
...
...
@@ -1038,9 +1038,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
}
/* Declare temporary variables */
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
temporary
;
i
++
)
{
if
(
reg_maps
->
temporary
[
i
])
shader_addline
(
buffer
,
"vec4 R%u;
\n
"
,
i
);
for
(
i
=
0
,
map
=
reg_maps
->
temporary
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"vec4 R%u;
\n
"
,
i
);
}
/* Declare attributes */
...
...
dlls/wined3d/wined3d_private.h
View file @
6fa9fa15
...
...
@@ -629,7 +629,7 @@ typedef struct shader_reg_maps
{
struct
wined3d_shader_version
shader_version
;
BYTE
texcoord
;
/* MAX_REG_TEXCRD, 8 */
char
temporary
[
MAX_REG_TEMP
];
/* pixel, vertex
*/
DWORD
temporary
;
/* MAX_REG_TEMP, 32
*/
char
address
[
MAX_REG_ADDR
];
/* vertex */
char
labels
[
MAX_LABELS
];
/* pixel, vertex */
DWORD
*
constf
;
/* pixel, vertex */
...
...
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