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
58c3a0c8
Commit
58c3a0c8
authored
Jun 17, 2009
by
Stefan Doesinger
Committed by
Alexandre Julliard
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement vpos and vface.
parent
ae600fe0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+28
-1
baseshader.c
dlls/wined3d/baseshader.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
58c3a0c8
...
...
@@ -806,6 +806,21 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction
sprintf
(
register_name
,
"I%u"
,
reg
->
idx
);
break
;
case
WINED3DSPR_MISCTYPE
:
if
(
reg
->
idx
==
0
)
{
sprintf
(
register_name
,
"vpos"
);
}
else
if
(
reg
->
idx
==
1
)
{
sprintf
(
register_name
,
"fragment.facing.x"
);
}
else
{
FIXME
(
"Unknown MISCTYPE register index %u
\n
"
,
reg
->
idx
);
}
break
;
default:
FIXME
(
"Unhandled register type %#x[%u]
\n
"
,
reg
->
type
,
reg
->
idx
);
sprintf
(
register_name
,
"unrecognized_register[%u]"
,
reg
->
idx
);
...
...
@@ -2626,7 +2641,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
* So enable the best we can get.
*/
if
(
reg_maps
->
usesdsx
||
reg_maps
->
usesdsy
||
reg_maps
->
loop_depth
>
0
||
reg_maps
->
usestexldd
||
reg_maps
->
usestexldl
)
reg_maps
->
usestexldl
||
reg_maps
->
usesfacing
)
{
want_nv_prog
=
TRUE
;
}
...
...
@@ -2760,6 +2775,18 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
{
compiled
->
ycorrection
=
next_local
;
shader_addline
(
buffer
,
"PARAM ycorrection = program.local[%u];
\n
"
,
next_local
++
);
if
(
reg_maps
->
vpos
)
{
shader_addline
(
buffer
,
"TEMP vpos;
\n
"
);
/* ycorrection.x: Backbuffer height(onscreen) or 0(offscreen).
* ycorrection.y: -1.0(onscreen), 1.0(offscreen)
* ycorrection.z: 1.0
* ycorrection.w: 0.0
*/
shader_addline
(
buffer
,
"MAD vpos, fragment.position, ycorrection.zyww, ycorrection.wxww;
\n
"
);
shader_addline
(
buffer
,
"FLR vpos.xy, vpos;
\n
"
);
}
}
else
{
...
...
dlls/wined3d/baseshader.c
View file @
58c3a0c8
...
...
@@ -287,6 +287,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
case
WINED3DSPR_MISCTYPE
:
if
(
pshader
&&
reg
->
idx
==
0
)
reg_maps
->
vpos
=
1
;
if
(
pshader
&&
reg
->
idx
==
1
)
reg_maps
->
usesfacing
=
1
;
break
;
case
WINED3DSPR_CONST
:
...
...
dlls/wined3d/wined3d_private.h
View file @
58c3a0c8
...
...
@@ -629,7 +629,7 @@ typedef struct shader_reg_maps
WINED3DSAMPLER_TEXTURE_TYPE
sampler_type
[
max
(
MAX_FRAGMENT_SAMPLERS
,
MAX_VERTEX_SAMPLERS
)];
BOOL
bumpmat
[
MAX_TEXTURES
],
luminanceparams
[
MAX_TEXTURES
];
char
usesnrm
,
vpos
,
usesdsx
,
usesdsy
,
usestexldd
,
usesmova
,
usestexldl
;
char
usesnrm
,
vpos
,
usesdsx
,
usesdsy
,
usestexldd
,
usesmova
,
usestexldl
,
usesfacing
;
char
usesrelconstF
;
/* Whether or not loops are used in this shader, and nesting 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