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
8d5a25bb
Commit
8d5a25bb
authored
Sep 29, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_state structure to find_vs_compile_args().
parent
c2224ea8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+4
-3
shader.c
dlls/wined3d/shader.c
+5
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8d5a25bb
...
...
@@ -4454,7 +4454,7 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
const
struct
wined3d_gl_info
*
gl_info
=
&
dev
->
adapter
->
gl_info
;
const
struct
wined3d_state
*
state
=
&
stateblock
->
state
;
find_vs_compile_args
(
s
hader
,
stateblock
,
&
args
->
super
);
find_vs_compile_args
(
s
tate
,
shader
,
&
args
->
super
);
args
->
clip
.
boolclip_compare
=
0
;
if
(
use_ps
(
state
))
...
...
dlls/wined3d/glsl_shader.c
View file @
8d5a25bb
...
...
@@ -4279,8 +4279,9 @@ static GLhandleARB find_glsl_vshader(const struct wined3d_context *context,
static
void
set_glsl_shader_program
(
const
struct
wined3d_context
*
context
,
IWineD3DDeviceImpl
*
device
,
BOOL
use_ps
,
BOOL
use_vs
)
{
IWineD3DVertexShader
*
vshader
=
use_vs
?
(
IWineD3DVertexShader
*
)
device
->
stateBlock
->
state
.
vertex_shader
:
NULL
;
IWineD3DPixelShader
*
pshader
=
use_ps
?
(
IWineD3DPixelShader
*
)
device
->
stateBlock
->
state
.
pixel_shader
:
NULL
;
const
struct
wined3d_state
*
state
=
&
device
->
stateBlock
->
state
;
IWineD3DVertexShader
*
vshader
=
use_vs
?
(
IWineD3DVertexShader
*
)
state
->
vertex_shader
:
NULL
;
IWineD3DPixelShader
*
pshader
=
use_ps
?
(
IWineD3DPixelShader
*
)
state
->
pixel_shader
:
NULL
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
shader_glsl_priv
*
priv
=
device
->
shader_priv
;
struct
glsl_shader_prog_link
*
entry
=
NULL
;
...
...
@@ -4291,7 +4292,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context,
struct
ps_compile_args
ps_compile_args
;
struct
vs_compile_args
vs_compile_args
;
if
(
vshader
)
find_vs_compile_args
(
(
IWineD3DVertexShaderImpl
*
)
vshader
,
device
->
stateBlock
,
&
vs_compile_args
);
if
(
vshader
)
find_vs_compile_args
(
state
,
(
IWineD3DVertexShaderImpl
*
)
vshader
,
&
vs_compile_args
);
if
(
pshader
)
find_ps_compile_args
((
IWineD3DPixelShaderImpl
*
)
pshader
,
device
->
stateBlock
,
&
ps_compile_args
);
entry
=
get_glsl_program_entry
(
priv
,
vshader
,
pshader
,
&
vs_compile_args
,
&
ps_compile_args
);
...
...
dlls/wined3d/shader.c
View file @
8d5a25bb
...
...
@@ -1706,13 +1706,13 @@ static const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl =
vertexshader_SetLocalConstantsF
,
};
void
find_vs_compile_args
(
IWineD3DVertexShaderImpl
*
shader
,
IWineD3D
StateBlockImpl
*
stateblock
,
struct
vs_compile_args
*
args
)
void
find_vs_compile_args
(
const
struct
wined3d_state
*
state
,
IWineD3D
VertexShaderImpl
*
shader
,
struct
vs_compile_args
*
args
)
{
args
->
fog_src
=
state
block
->
state
.
render_states
[
WINED3DRS_FOGTABLEMODE
]
args
->
fog_src
=
state
->
render_states
[
WINED3DRS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
?
VS_FOG_COORD
:
VS_FOG_Z
;
args
->
clip_enabled
=
state
block
->
state
.
render_states
[
WINED3DRS_CLIPPING
]
&&
state
block
->
state
.
render_states
[
WINED3DRS_CLIPPLANEENABLE
];
args
->
clip_enabled
=
state
->
render_states
[
WINED3DRS_CLIPPING
]
&&
state
->
render_states
[
WINED3DRS_CLIPPLANEENABLE
];
args
->
swizzle_map
=
((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
swizzle_map
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
8d5a25bb
...
...
@@ -2853,8 +2853,8 @@ typedef struct IWineD3DVertexShaderImpl {
UINT
rel_offset
;
}
IWineD3DVertexShaderImpl
;
void
find_vs_compile_args
(
IWineD3DVertexShaderImpl
*
shader
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
vs_compile_args
*
args
)
DECLSPEC_HIDDEN
;
void
find_vs_compile_args
(
const
struct
wined3d_state
*
state
,
IWineD3DVertexShaderImpl
*
shader
,
struct
vs_compile_args
*
args
)
DECLSPEC_HIDDEN
;
HRESULT
vertexshader_init
(
IWineD3DVertexShaderImpl
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
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