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
db8d681a
Commit
db8d681a
authored
Apr 21, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove rcp special handling of 0 from the ARB shader backend.
parent
0210a838
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
23 deletions
+2
-23
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-20
shader.c
dlls/wined3d/shader.c
+0
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
db8d681a
...
...
@@ -340,7 +340,6 @@ static BOOL need_helper_const(const struct arb_vshader_private *shader_data,
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
return
TRUE
;
/* Have to init texcoords. */
if
(
!
use_nv_clip
(
gl_info
))
return
TRUE
;
/* Init the clip texcoord */
if
(
reg_maps
->
usesnrm
)
return
TRUE
;
/* 0.0 */
if
(
reg_maps
->
usesrcp
)
return
TRUE
;
/* EPS */
return
FALSE
;
}
...
...
@@ -2424,8 +2423,6 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
static
void
shader_hw_rcp
(
const
struct
wined3d_shader_instruction
*
ins
)
{
struct
wined3d_shader_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
const
char
*
flt_eps
=
arb_get_helper_value
(
ins
->
ctx
->
reg_maps
->
shader_version
.
type
,
ARB_EPS
);
char
dst
[
50
];
char
src
[
50
];
...
...
@@ -2440,23 +2437,7 @@ static void shader_hw_rcp(const struct wined3d_shader_instruction *ins)
strcat
(
src
,
".w"
);
}
/* TODO: If the destination is readable, and not the same as the source, the destination
* can be used instead of TA
*/
if
(
priv
->
target_version
>=
NV2
)
{
shader_addline
(
buffer
,
"MOVC TA.x, %s;
\n
"
,
src
);
shader_addline
(
buffer
,
"MOV TA.x (EQ.x), %s;
\n
"
,
flt_eps
);
shader_addline
(
buffer
,
"RCP%s %s, TA.x;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst
);
}
else
{
const
char
*
zero
=
arb_get_helper_value
(
ins
->
ctx
->
reg_maps
->
shader_version
.
type
,
ARB_ZERO
);
shader_addline
(
buffer
,
"ABS TA.x, %s;
\n
"
,
src
);
shader_addline
(
buffer
,
"SGE TA.y, -TA.x, %s;
\n
"
,
zero
);
shader_addline
(
buffer
,
"MAD TA.x, TA.y, %s, %s;
\n
"
,
flt_eps
,
src
);
shader_addline
(
buffer
,
"RCP%s %s, TA.x;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst
);
}
shader_addline
(
buffer
,
"RCP%s %s, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst
,
src
);
}
static
void
shader_hw_scalar_op
(
const
struct
wined3d_shader_instruction
*
ins
)
...
...
dlls/wined3d/shader.c
View file @
db8d681a
...
...
@@ -788,7 +788,6 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
else
if
(
ins
.
handler_idx
==
WINED3DSIH_MOVA
)
reg_maps
->
usesmova
=
1
;
else
if
(
ins
.
handler_idx
==
WINED3DSIH_IFC
)
reg_maps
->
usesifc
=
1
;
else
if
(
ins
.
handler_idx
==
WINED3DSIH_CALL
)
reg_maps
->
usescall
=
1
;
else
if
(
ins
.
handler_idx
==
WINED3DSIH_RCP
)
reg_maps
->
usesrcp
=
1
;
limit
=
ins
.
src_count
+
(
ins
.
predicate
?
1
:
0
);
for
(
i
=
0
;
i
<
limit
;
++
i
)
...
...
dlls/wined3d/wined3d_private.h
View file @
db8d681a
...
...
@@ -559,8 +559,7 @@ struct wined3d_shader_reg_maps
WORD
usestexldl
:
1
;
WORD
usesifc
:
1
;
WORD
usescall
:
1
;
WORD
usesrcp
:
1
;
WORD
padding
:
3
;
WORD
padding
:
4
;
/* Whether or not loops are used in this shader, and nesting depth */
unsigned
loop_depth
;
...
...
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