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
345b3292
Commit
345b3292
authored
Sep 30, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a separate function for copying stateblock values.
parent
844dda20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
stateblock.c
dlls/wined3d/stateblock.c
+19
-11
No files found.
dlls/wined3d/stateblock.c
View file @
345b3292
...
...
@@ -164,20 +164,11 @@ static void stateblock_savedstates_set(SAVEDSTATES *states, BOOL value, const st
memset
(
states
->
vertexShaderConstantsF
,
value
,
sizeof
(
BOOL
)
*
gl_info
->
max_vshader_constantsF
);
}
static
void
stateblock_copy
(
IWineD3DStateBlockImpl
*
dst
,
const
IWineD3DStateBlockImpl
*
src
)
static
void
stateblock_copy_values
(
IWineD3DStateBlockImpl
*
dst
,
const
IWineD3DStateBlockImpl
*
src
,
const
struct
wined3d_gl_info
*
gl_info
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
src
->
wineD3DDevice
->
adapter
->
gl_info
;
unsigned
int
l
;
dst
->
lpVtbl
=
src
->
lpVtbl
;
dst
->
ref
=
src
->
ref
;
dst
->
parent
=
src
->
parent
;
dst
->
wineD3DDevice
=
src
->
wineD3DDevice
;
dst
->
blockType
=
src
->
blockType
;
/* Saved states */
stateblock_savedstates_copy
(
&
dst
->
changed
,
&
src
->
changed
,
gl_info
);
/* Single items */
dst
->
gl_primitive_type
=
src
->
gl_primitive_type
;
dst
->
vertexDecl
=
src
->
vertexDecl
;
...
...
@@ -237,6 +228,23 @@ static void stateblock_copy(IWineD3DStateBlockImpl *dst, const IWineD3DStateBloc
memcpy
(
dst
->
pixelShaderConstantF
,
src
->
pixelShaderConstantF
,
sizeof
(
float
)
*
gl_info
->
max_pshader_constantsF
*
4
);
}
static
void
stateblock_copy
(
IWineD3DStateBlockImpl
*
dst
,
const
IWineD3DStateBlockImpl
*
src
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
src
->
wineD3DDevice
->
adapter
->
gl_info
;
dst
->
lpVtbl
=
src
->
lpVtbl
;
dst
->
ref
=
src
->
ref
;
dst
->
parent
=
src
->
parent
;
dst
->
wineD3DDevice
=
src
->
wineD3DDevice
;
dst
->
blockType
=
src
->
blockType
;
/* Saved states */
stateblock_savedstates_copy
(
&
dst
->
changed
,
&
src
->
changed
,
gl_info
);
/* Saved values */
stateblock_copy_values
(
dst
,
src
,
gl_info
);
}
/**********************************************************
* IWineD3DStateBlockImpl IUnknown parts follows
**********************************************************/
...
...
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