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
7168b623
Commit
7168b623
authored
May 28, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use NRM from GL_NV_fragment_program2 if available.
parent
d8e219be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+14
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7168b623
...
@@ -1792,14 +1792,24 @@ static void shader_hw_nrm(const struct wined3d_shader_instruction *ins)
...
@@ -1792,14 +1792,24 @@ static void shader_hw_nrm(const struct wined3d_shader_instruction *ins)
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_name
[
50
];
char
dst_name
[
50
];
char
src_name
[
50
];
char
src_name
[
50
];
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
BOOL
pshader
=
shader_is_pshader_version
(
ins
->
ctx
->
reg_maps
->
shader_version
.
type
);
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_name
);
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_name
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
1
/* Use TB */
,
src_name
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
1
/* Use TB */
,
src_name
);
if
(
pshader
&&
priv
->
target_version
>=
NV3
)
{
shader_addline
(
buffer
,
"NRM%s %s, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
src_name
);
}
else
{
shader_addline
(
buffer
,
"DP3 TA, %s, %s;
\n
"
,
src_name
,
src_name
);
shader_addline
(
buffer
,
"DP3 TA, %s, %s;
\n
"
,
src_name
,
src_name
);
shader_addline
(
buffer
,
"RSQ TA, TA.x;
\n
"
);
shader_addline
(
buffer
,
"RSQ TA, TA.x;
\n
"
);
/* dst.w = src[0].w * 1 / (src.x^2 + src.y^2 + src.z^2)^(1/2) according to msdn*/
/* dst.w = src[0].w * 1 / (src.x^2 + src.y^2 + src.z^2)^(1/2) according to msdn*/
shader_addline
(
buffer
,
"MUL%s %s, %s, TA;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
shader_addline
(
buffer
,
"MUL%s %s, %s, TA;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
src_name
);
src_name
);
}
}
}
static
void
shader_hw_sincos
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
shader_hw_sincos
(
const
struct
wined3d_shader_instruction
*
ins
)
...
@@ -2043,7 +2053,10 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
...
@@ -2043,7 +2053,10 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
list_init
(
&
priv_ctx
.
if_frames
);
list_init
(
&
priv_ctx
.
if_frames
);
shader_addline
(
buffer
,
"!!ARBfp1.0
\n
"
);
shader_addline
(
buffer
,
"!!ARBfp1.0
\n
"
);
if
(
GL_SUPPORT
(
NV_FRAGMENT_PROGRAM_OPTION
))
{
if
(
GL_SUPPORT
(
NV_FRAGMENT_PROGRAM2
))
{
shader_addline
(
buffer
,
"OPTION NV_fragment_program2;
\n
"
);
priv_ctx
.
target_version
=
NV3
;
}
else
if
(
GL_SUPPORT
(
NV_FRAGMENT_PROGRAM_OPTION
))
{
shader_addline
(
buffer
,
"OPTION NV_fragment_program;
\n
"
);
shader_addline
(
buffer
,
"OPTION NV_fragment_program;
\n
"
);
priv_ctx
.
target_version
=
NV2
;
priv_ctx
.
target_version
=
NV2
;
}
else
{
}
else
{
...
...
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