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
258d99d2
Commit
258d99d2
authored
Jun 10, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement dsy in ARB.
parent
51cdc9d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+44
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
258d99d2
...
...
@@ -103,6 +103,7 @@ struct arb_ps_compiled_shader
struct
stb_const_desc
luminanceconst
[
MAX_TEXTURES
];
UINT
int_consts
[
MAX_CONST_I
];
char
num_int_consts
;
UINT
ycorrection
;
};
struct
arb_vs_compile_args
...
...
@@ -321,6 +322,22 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl)
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
gl_shader
->
int_consts
[
i
],
val
));
}
}
if
(
gl_shader
->
ycorrection
!=
WINED3D_CONST_NUM_UNUSED
)
{
/* ycorrection.x: Backbuffer height(onscreen) or 0(offscreen).
* ycorrection.y: -1.0(onscreen), 1.0(offscreen)
* ycorrection.z: 1.0
* ycorrection.w: 0.0
*/
float
val
[
4
];
val
[
0
]
=
deviceImpl
->
render_offscreen
?
0
.
0
:
((
IWineD3DSurfaceImpl
*
)
deviceImpl
->
render_targets
[
0
])
->
currentDesc
.
Height
;
val
[
1
]
=
deviceImpl
->
render_offscreen
?
1
.
0
:
-
1
.
0
;
val
[
2
]
=
1
.
0
;
val
[
3
]
=
0
.
0
;
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
gl_shader
->
ycorrection
,
val
));
checkGLcall
(
"y correction loading
\n
"
);
}
}
static
inline
void
shader_arb_vs_local_constants
(
IWineD3DDeviceImpl
*
deviceImpl
)
...
...
@@ -2027,6 +2044,22 @@ static void shader_hw_sgn(const struct wined3d_shader_instruction *ins)
}
}
static
void
shader_hw_dsy
(
const
struct
wined3d_shader_instruction
*
ins
)
{
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
char
src
[
50
];
char
dst
[
50
];
char
dst_name
[
50
];
BOOL
is_color
;
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
src
);
shader_arb_get_register_name
(
ins
,
&
ins
->
dst
[
0
].
reg
,
dst_name
,
&
is_color
);
shader_addline
(
buffer
,
"DDY %s, %s;
\n
"
,
dst
,
src
);
shader_addline
(
buffer
,
"MUL%s %s, %s, ycorrection.y;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst
,
dst_name
);
}
static
void
shader_hw_loop
(
const
struct
wined3d_shader_instruction
*
ins
)
{
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
...
...
@@ -2461,6 +2494,16 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
}
}
if
(
reg_maps
->
vpos
||
reg_maps
->
usesdsy
)
{
compiled
->
ycorrection
=
next_local
;
shader_addline
(
buffer
,
"PARAM ycorrection = program.local[%u];
\n
"
,
next_local
++
);
}
else
{
compiled
->
ycorrection
=
WINED3D_CONST_NUM_UNUSED
;
}
/* Base Shader Body */
shader_generate_main
((
IWineD3DBaseShader
*
)
This
,
buffer
,
reg_maps
,
function
,
&
priv_ctx
);
...
...
@@ -3105,7 +3148,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DP4 */
shader_hw_map2gl
,
/* WINED3DSIH_DST */
shader_hw_map2gl
,
/* WINED3DSIH_DSX */
shader_hw_map2gl
,
/* WINED3DSIH_DSY */
NULL
,
/* WINED3DSIH_DSY */
shader_hw_dsy
,
/* WINED3DSIH_ELSE */
NULL
,
/* WINED3DSIH_ENDIF */
NULL
,
/* WINED3DSIH_ENDLOOP */
shader_hw_endloop
,
...
...
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