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
9636c7fa
Commit
9636c7fa
authored
Jan 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use unsigned int instead of size_t for the glsl mask size.
parent
980ee365
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
glsl_shader.c
dlls/wined3d/glsl_shader.c
+15
-15
No files found.
dlls/wined3d/glsl_shader.c
View file @
9636c7fa
...
...
@@ -981,8 +981,8 @@ static DWORD shader_glsl_get_write_mask(const DWORD param, char *write_mask) {
return
mask
;
}
static
size_
t
shader_glsl_get_write_mask_size
(
DWORD
write_mask
)
{
size_
t
size
=
0
;
static
unsigned
in
t
shader_glsl_get_write_mask_size
(
DWORD
write_mask
)
{
unsigned
in
t
size
=
0
;
if
(
write_mask
&
WINED3DSP_WRITEMASK_0
)
++
size
;
if
(
write_mask
&
WINED3DSP_WRITEMASK_1
)
++
size
;
...
...
@@ -1344,7 +1344,7 @@ void shader_glsl_mov(SHADER_OPCODE_ARG* arg) {
!
shader_is_pshader_version
(
shader
->
baseShader
.
hex_version
)
&&
shader_get_regtype
(
arg
->
dst
)
==
WINED3DSPR_ADDR
))
{
/* This is a simple floor() */
size_
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
unsigned
in
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
if
(
mask_size
>
1
)
{
shader_addline
(
buffer
,
"ivec%d(floor(%s)));
\n
"
,
mask_size
,
src0_param
.
param_str
);
}
else
{
...
...
@@ -1352,7 +1352,7 @@ void shader_glsl_mov(SHADER_OPCODE_ARG* arg) {
}
}
else
if
(
arg
->
opcode
->
opcode
==
WINED3DSIO_MOVA
)
{
/* We need to *round* to the nearest int here. */
size_
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
unsigned
in
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
if
(
mask_size
>
1
)
{
shader_addline
(
buffer
,
"ivec%d(floor(abs(%s) + vec%d(0.5)) * sign(%s)));
\n
"
,
mask_size
,
src0_param
.
param_str
,
mask_size
,
src0_param
.
param_str
);
}
else
{
...
...
@@ -1370,7 +1370,7 @@ void shader_glsl_dot(SHADER_OPCODE_ARG* arg) {
glsl_src_param_t
src0_param
;
glsl_src_param_t
src1_param
;
DWORD
dst_write_mask
,
src_write_mask
;
size_
t
dst_size
=
0
;
unsigned
in
t
dst_size
=
0
;
dst_write_mask
=
shader_glsl_append_dst
(
buffer
,
arg
);
dst_size
=
shader_glsl_get_write_mask_size
(
dst_write_mask
);
...
...
@@ -1415,7 +1415,7 @@ void shader_glsl_pow(SHADER_OPCODE_ARG *arg) {
glsl_src_param_t
src0_param
;
glsl_src_param_t
src1_param
;
DWORD
dst_write_mask
;
size_
t
dst_size
;
unsigned
in
t
dst_size
;
dst_write_mask
=
shader_glsl_append_dst
(
buffer
,
arg
);
dst_size
=
shader_glsl_get_write_mask_size
(
dst_write_mask
);
...
...
@@ -1437,7 +1437,7 @@ void shader_glsl_log(SHADER_OPCODE_ARG *arg) {
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
glsl_src_param_t
src0_param
;
DWORD
dst_write_mask
;
size_
t
dst_size
;
unsigned
in
t
dst_size
;
dst_write_mask
=
shader_glsl_append_dst
(
buffer
,
arg
);
dst_size
=
shader_glsl_get_write_mask_size
(
dst_write_mask
);
...
...
@@ -1524,7 +1524,7 @@ void shader_glsl_expp(SHADER_OPCODE_ARG* arg) {
shader_addline
(
arg
->
buffer
,
"tmp0%s);
\n
"
,
dst_mask
);
}
else
{
DWORD
write_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
write_mask
=
shader_glsl_append_dst
(
arg
->
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
...
...
@@ -1541,7 +1541,7 @@ void shader_glsl_expp(SHADER_OPCODE_ARG* arg) {
void
shader_glsl_rcp
(
SHADER_OPCODE_ARG
*
arg
)
{
glsl_src_param_t
src_param
;
DWORD
write_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
write_mask
=
shader_glsl_append_dst
(
arg
->
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
...
...
@@ -1558,7 +1558,7 @@ void shader_glsl_rsq(SHADER_OPCODE_ARG* arg) {
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
glsl_src_param_t
src_param
;
DWORD
write_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
write_mask
=
shader_glsl_append_dst
(
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
...
...
@@ -1577,7 +1577,7 @@ void shader_glsl_compare(SHADER_OPCODE_ARG* arg) {
glsl_src_param_t
src0_param
;
glsl_src_param_t
src1_param
;
DWORD
write_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
write_mask
=
shader_glsl_append_dst
(
arg
->
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
...
...
@@ -2221,7 +2221,7 @@ void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) {
if
(
src_mod
==
WINED3DSPSM_DZ
)
{
glsl_src_param_t
div_param
;
size_
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
unsigned
in
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_2
,
&
div_param
);
if
(
mask_size
>
1
)
{
...
...
@@ -2231,7 +2231,7 @@ void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) {
}
}
else
if
(
src_mod
==
WINED3DSPSM_DW
)
{
glsl_src_param_t
div_param
;
size_
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
unsigned
in
t
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_3
,
&
div_param
);
if
(
mask_size
>
1
)
{
...
...
@@ -2295,7 +2295,7 @@ void pshader_glsl_texdp3(SHADER_OPCODE_ARG* arg) {
DWORD
dstreg
=
arg
->
dst
&
WINED3DSP_REGNUM_MASK
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
dst_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
dst_mask
=
shader_glsl_append_dst
(
arg
->
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
dst_mask
);
...
...
@@ -2644,7 +2644,7 @@ void pshader_glsl_dp2add(SHADER_OPCODE_ARG* arg) {
glsl_src_param_t
src1_param
;
glsl_src_param_t
src2_param
;
DWORD
write_mask
;
size_
t
mask_size
;
unsigned
in
t
mask_size
;
write_mask
=
shader_glsl_append_dst
(
arg
->
buffer
,
arg
);
mask_size
=
shader_glsl_get_write_mask_size
(
write_mask
);
...
...
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