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
73e04249
Commit
73e04249
authored
Dec 31, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix a few format specifiers in IWineD3DStateBlockImpl_Capture().
parent
0657e8d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
stateblock.c
dlls/wined3d/stateblock.c
+21
-22
No files found.
dlls/wined3d/stateblock.c
View file @
73e04249
...
...
@@ -390,7 +390,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Float Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_vs_consts_f
;
++
j
)
{
i
=
This
->
contained_vs_consts_f
[
j
];
TRACE
(
"Setting %p from %p %
d to { %f, %f, %f, %f
}
\n
"
,
This
,
targetStateBlock
,
i
,
TRACE
(
"Setting %p from %p %
u to {%f, %f, %f, %f
}
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
vertexShaderConstantF
[
i
*
4
],
targetStateBlock
->
vertexShaderConstantF
[
i
*
4
+
1
],
targetStateBlock
->
vertexShaderConstantF
[
i
*
4
+
2
],
...
...
@@ -405,7 +405,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Integer Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_vs_consts_i
;
++
j
)
{
i
=
This
->
contained_vs_consts_i
[
j
];
TRACE
(
"Setting %p from %p %
d to { %d, %d, %d, %d
}
\n
"
,
This
,
targetStateBlock
,
i
,
TRACE
(
"Setting %p from %p %
u to {%d, %d, %d, %d
}
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
vertexShaderConstantI
[
i
*
4
],
targetStateBlock
->
vertexShaderConstantI
[
i
*
4
+
1
],
targetStateBlock
->
vertexShaderConstantI
[
i
*
4
+
2
],
...
...
@@ -420,8 +420,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Boolean Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_vs_consts_b
;
++
j
)
{
i
=
This
->
contained_vs_consts_b
[
j
];
TRACE
(
"Setting %p from %p %
d
to %s
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
vertexShaderConstantB
[
i
]
?
"TRUE"
:
"FALSE"
);
TRACE
(
"Setting %p from %p %
u
to %s
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
vertexShaderConstantB
[
i
]
?
"TRUE"
:
"FALSE"
);
This
->
vertexShaderConstantB
[
i
]
=
targetStateBlock
->
vertexShaderConstantB
[
i
];
}
...
...
@@ -429,7 +429,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Float Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_ps_consts_f
;
++
j
)
{
i
=
This
->
contained_ps_consts_f
[
j
];
TRACE
(
"Setting %p from %p %
d to { %f, %f, %f, %f
}
\n
"
,
This
,
targetStateBlock
,
i
,
TRACE
(
"Setting %p from %p %
u to {%f, %f, %f, %f
}
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
pixelShaderConstantF
[
i
*
4
],
targetStateBlock
->
pixelShaderConstantF
[
i
*
4
+
1
],
targetStateBlock
->
pixelShaderConstantF
[
i
*
4
+
2
],
...
...
@@ -444,7 +444,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Integer Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_ps_consts_i
;
++
j
)
{
i
=
This
->
contained_ps_consts_i
[
j
];
TRACE
(
"Setting %p from %p %
d to { %d, %d, %d, %d
}
\n
"
,
This
,
targetStateBlock
,
i
,
TRACE
(
"Setting %p from %p %
u to {%d, %d, %d, %d
}
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
pixelShaderConstantI
[
i
*
4
],
targetStateBlock
->
pixelShaderConstantI
[
i
*
4
+
1
],
targetStateBlock
->
pixelShaderConstantI
[
i
*
4
+
2
],
...
...
@@ -459,22 +459,22 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Boolean Constants */
for
(
j
=
0
;
j
<
This
->
num_contained_ps_consts_b
;
++
j
)
{
i
=
This
->
contained_ps_consts_b
[
j
];
TRACE
(
"Setting %p from %p %
d
to %s
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
pixelShaderConstantB
[
i
]
?
"TRUE"
:
"FALSE"
);
TRACE
(
"Setting %p from %p %
u
to %s
\n
"
,
This
,
targetStateBlock
,
i
,
targetStateBlock
->
pixelShaderConstantB
[
i
]
?
"TRUE"
:
"FALSE"
);
This
->
pixelShaderConstantB
[
i
]
=
targetStateBlock
->
pixelShaderConstantB
[
i
];
}
/* Others + Render & Texture */
for
(
i
=
0
;
i
<
This
->
num_contained_transform_states
;
i
++
)
{
TRACE
(
"Updating transform %
d
\n
"
,
i
);
TRACE
(
"Updating transform %
u
\n
"
,
i
);
This
->
transforms
[
This
->
contained_transform_states
[
i
]]
=
targetStateBlock
->
transforms
[
This
->
contained_transform_states
[
i
]];
}
if
(
This
->
changed
.
indices
&&
((
This
->
pIndexData
!=
targetStateBlock
->
pIndexData
)
||
(
This
->
baseVertexIndex
!=
targetStateBlock
->
baseVertexIndex
)))
{
TRACE
(
"Updating p
i
ndexData to %p, baseVertexIndex to %d
\n
"
,
TRACE
(
"Updating p
I
ndexData to %p, baseVertexIndex to %d
\n
"
,
targetStateBlock
->
pIndexData
,
targetStateBlock
->
baseVertexIndex
);
if
(
targetStateBlock
->
pIndexData
)
IWineD3DIndexBuffer_AddRef
(
targetStateBlock
->
pIndexData
);
if
(
This
->
pIndexData
)
IWineD3DIndexBuffer_Release
(
This
->
pIndexData
);
...
...
@@ -514,8 +514,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
streamSource
[
i
]
&&
((
This
->
streamStride
[
i
]
!=
targetStateBlock
->
streamStride
[
i
])
||
(
This
->
streamSource
[
i
]
!=
targetStateBlock
->
streamSource
[
i
])))
{
TRACE
(
"Updating stream source %
d to %p, stride to %d
\n
"
,
i
,
targetStateBlock
->
streamSource
[
i
]
,
targetStateBlock
->
streamStride
[
i
]);
TRACE
(
"Updating stream source %
u to %p, stride to %u
\n
"
,
i
,
targetStateBlock
->
streamSource
[
i
],
targetStateBlock
->
streamStride
[
i
]);
This
->
streamStride
[
i
]
=
targetStateBlock
->
streamStride
[
i
];
if
(
targetStateBlock
->
streamSource
[
i
])
IWineD3DVertexBuffer_AddRef
(
targetStateBlock
->
streamSource
[
i
]);
if
(
This
->
streamSource
[
i
])
IWineD3DVertexBuffer_Release
(
This
->
streamSource
[
i
]);
...
...
@@ -525,8 +525,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
streamFreq
[
i
]
&&
(
This
->
streamFreq
[
i
]
!=
targetStateBlock
->
streamFreq
[
i
]
||
This
->
streamFlags
[
i
]
!=
targetStateBlock
->
streamFlags
[
i
])){
TRACE
(
"Updating stream frequency %
d to %d flags to %d
\n
"
,
i
,
targetStateBlock
->
streamFreq
[
i
]
,
targetStateBlock
->
streamFlags
[
i
]);
TRACE
(
"Updating stream frequency %
u to %u flags to %#x
\n
"
,
i
,
targetStateBlock
->
streamFreq
[
i
],
targetStateBlock
->
streamFlags
[
i
]);
This
->
streamFreq
[
i
]
=
targetStateBlock
->
streamFreq
[
i
];
This
->
streamFlags
[
i
]
=
targetStateBlock
->
streamFlags
[
i
];
}
...
...
@@ -536,15 +536,15 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
clipplane
[
i
]
&&
memcmp
(
targetStateBlock
->
clipplane
[
i
],
This
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
)))
{
TRACE
(
"Updating clipplane %
d
\n
"
,
i
);
TRACE
(
"Updating clipplane %
u
\n
"
,
i
);
memcpy
(
This
->
clipplane
[
i
],
targetStateBlock
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
));
}
}
/* Render */
for
(
i
=
0
;
i
<
This
->
num_contained_render_states
;
i
++
)
{
TRACE
(
"Updating renderState %
d to %d
\n
"
,
This
->
contained_render_states
[
i
],
targetStateBlock
->
renderState
[
This
->
contained_render_states
[
i
]]);
TRACE
(
"Updating renderState %
u to %u
\n
"
,
This
->
contained_render_states
[
i
]
,
targetStateBlock
->
renderState
[
This
->
contained_render_states
[
i
]]);
This
->
renderState
[
This
->
contained_render_states
[
i
]]
=
targetStateBlock
->
renderState
[
This
->
contained_render_states
[
i
]];
}
...
...
@@ -553,7 +553,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
DWORD
stage
=
This
->
contained_tss_states
[
j
].
stage
;
DWORD
state
=
This
->
contained_tss_states
[
j
].
state
;
TRACE
(
"Updating texturestage
state %d,%d to %d (was %d)
\n
"
,
stage
,
state
,
TRACE
(
"Updating texturestage
state %u, %u to %u (was %u)
\n
"
,
stage
,
state
,
targetStateBlock
->
textureState
[
stage
][
state
],
This
->
textureState
[
stage
][
state
]);
This
->
textureState
[
stage
][
state
]
=
targetStateBlock
->
textureState
[
stage
][
state
];
}
...
...
@@ -562,7 +562,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* TODO: move over to using memcpy */
for
(
j
=
0
;
j
<
MAX_COMBINED_SAMPLERS
;
j
++
)
{
if
(
This
->
changed
.
textures
[
j
])
{
TRACE
(
"Updating texture %
d to %p (was %p)
\n
"
,
j
,
targetStateBlock
->
textures
[
j
],
This
->
textures
[
j
]);
TRACE
(
"Updating texture %
u to %p (was %p)
\n
"
,
j
,
targetStateBlock
->
textures
[
j
],
This
->
textures
[
j
]);
This
->
textures
[
j
]
=
targetStateBlock
->
textures
[
j
];
}
}
...
...
@@ -570,9 +570,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
for
(
j
=
0
;
j
<
This
->
num_contained_sampler_states
;
j
++
)
{
DWORD
stage
=
This
->
contained_sampler_states
[
j
].
stage
;
DWORD
state
=
This
->
contained_sampler_states
[
j
].
state
;
TRACE
(
"Updating sampler state %d,%d to %d (was %d)
\n
"
,
stage
,
state
,
targetStateBlock
->
samplerState
[
stage
][
state
],
This
->
samplerState
[
stage
][
state
]);
TRACE
(
"Updating sampler state %u, %u to %u (was %u)
\n
"
,
stage
,
state
,
targetStateBlock
->
samplerState
[
stage
][
state
],
This
->
samplerState
[
stage
][
state
]);
This
->
samplerState
[
stage
][
state
]
=
targetStateBlock
->
samplerState
[
stage
][
state
];
}
if
(
This
->
changed
.
pixelShader
&&
This
->
pixelShader
!=
targetStateBlock
->
pixelShader
)
{
...
...
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