Commit 73e04249 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Fix a few format specifiers in IWineD3DStateBlockImpl_Capture().

parent 0657e8d8
...@@ -390,7 +390,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -390,7 +390,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Float Constants */ /* Vertex Shader Float Constants */
for (j = 0; j < This->num_contained_vs_consts_f; ++j) { for (j = 0; j < This->num_contained_vs_consts_f; ++j) {
i = This->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],
targetStateBlock->vertexShaderConstantF[i * 4 + 1], targetStateBlock->vertexShaderConstantF[i * 4 + 1],
targetStateBlock->vertexShaderConstantF[i * 4 + 2], targetStateBlock->vertexShaderConstantF[i * 4 + 2],
...@@ -405,7 +405,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -405,7 +405,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Integer Constants */ /* Vertex Shader Integer Constants */
for (j = 0; j < This->num_contained_vs_consts_i; ++j) { for (j = 0; j < This->num_contained_vs_consts_i; ++j) {
i = This->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],
targetStateBlock->vertexShaderConstantI[i * 4 + 1], targetStateBlock->vertexShaderConstantI[i * 4 + 1],
targetStateBlock->vertexShaderConstantI[i * 4 + 2], targetStateBlock->vertexShaderConstantI[i * 4 + 2],
...@@ -420,8 +420,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -420,8 +420,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Vertex Shader Boolean Constants */ /* Vertex Shader Boolean Constants */
for (j = 0; j < This->num_contained_vs_consts_b; ++j) { for (j = 0; j < This->num_contained_vs_consts_b; ++j) {
i = This->contained_vs_consts_b[j]; i = This->contained_vs_consts_b[j];
TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i, TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i,
targetStateBlock->vertexShaderConstantB[i]? "TRUE":"FALSE"); targetStateBlock->vertexShaderConstantB[i] ? "TRUE" : "FALSE");
This->vertexShaderConstantB[i] = targetStateBlock->vertexShaderConstantB[i]; This->vertexShaderConstantB[i] = targetStateBlock->vertexShaderConstantB[i];
} }
...@@ -429,7 +429,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -429,7 +429,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Float Constants */ /* Pixel Shader Float Constants */
for (j = 0; j < This->num_contained_ps_consts_f; ++j) { for (j = 0; j < This->num_contained_ps_consts_f; ++j) {
i = This->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],
targetStateBlock->pixelShaderConstantF[i * 4 + 1], targetStateBlock->pixelShaderConstantF[i * 4 + 1],
targetStateBlock->pixelShaderConstantF[i * 4 + 2], targetStateBlock->pixelShaderConstantF[i * 4 + 2],
...@@ -444,7 +444,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -444,7 +444,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Integer Constants */ /* Pixel Shader Integer Constants */
for (j = 0; j < This->num_contained_ps_consts_i; ++j) { for (j = 0; j < This->num_contained_ps_consts_i; ++j) {
i = This->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],
targetStateBlock->pixelShaderConstantI[i * 4 + 1], targetStateBlock->pixelShaderConstantI[i * 4 + 1],
targetStateBlock->pixelShaderConstantI[i * 4 + 2], targetStateBlock->pixelShaderConstantI[i * 4 + 2],
...@@ -459,22 +459,22 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -459,22 +459,22 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* Pixel Shader Boolean Constants */ /* Pixel Shader Boolean Constants */
for (j = 0; j < This->num_contained_ps_consts_b; ++j) { for (j = 0; j < This->num_contained_ps_consts_b; ++j) {
i = This->contained_ps_consts_b[j]; i = This->contained_ps_consts_b[j];
TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i, TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i,
targetStateBlock->pixelShaderConstantB[i]? "TRUE":"FALSE"); targetStateBlock->pixelShaderConstantB[i] ? "TRUE" : "FALSE");
This->pixelShaderConstantB[i] = targetStateBlock->pixelShaderConstantB[i]; This->pixelShaderConstantB[i] = targetStateBlock->pixelShaderConstantB[i];
} }
/* Others + Render & Texture */ /* Others + Render & Texture */
for (i = 0; i < This->num_contained_transform_states; i++) { 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]] = This->transforms[This->contained_transform_states[i]] =
targetStateBlock->transforms[This->contained_transform_states[i]]; targetStateBlock->transforms[This->contained_transform_states[i]];
} }
if (This->changed.indices && ((This->pIndexData != targetStateBlock->pIndexData) if (This->changed.indices && ((This->pIndexData != targetStateBlock->pIndexData)
|| (This->baseVertexIndex != targetStateBlock->baseVertexIndex))) { || (This->baseVertexIndex != targetStateBlock->baseVertexIndex))) {
TRACE("Updating pindexData to %p, baseVertexIndex to %d\n", TRACE("Updating pIndexData to %p, baseVertexIndex to %d\n",
targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex); targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex);
if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData); if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData);
if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData);
...@@ -514,8 +514,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -514,8 +514,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if (This->changed.streamSource[i] && if (This->changed.streamSource[i] &&
((This->streamStride[i] != targetStateBlock->streamStride[i]) || ((This->streamStride[i] != targetStateBlock->streamStride[i]) ||
(This->streamSource[i] != targetStateBlock->streamSource[i]))) { (This->streamSource[i] != targetStateBlock->streamSource[i]))) {
TRACE("Updating stream source %d to %p, stride to %d\n", i, targetStateBlock->streamSource[i], TRACE("Updating stream source %u to %p, stride to %u\n",
targetStateBlock->streamStride[i]); i, targetStateBlock->streamSource[i], targetStateBlock->streamStride[i]);
This->streamStride[i] = targetStateBlock->streamStride[i]; This->streamStride[i] = targetStateBlock->streamStride[i];
if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]); if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]);
if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]); if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]);
...@@ -525,8 +525,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -525,8 +525,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if (This->changed.streamFreq[i] && if (This->changed.streamFreq[i] &&
(This->streamFreq[i] != targetStateBlock->streamFreq[i] (This->streamFreq[i] != targetStateBlock->streamFreq[i]
|| This->streamFlags[i] != targetStateBlock->streamFlags[i])){ || This->streamFlags[i] != targetStateBlock->streamFlags[i])){
TRACE("Updating stream frequency %d to %d flags to %d\n", i , targetStateBlock->streamFreq[i] , TRACE("Updating stream frequency %u to %u flags to %#x\n",
targetStateBlock->streamFlags[i]); i, targetStateBlock->streamFreq[i], targetStateBlock->streamFlags[i]);
This->streamFreq[i] = targetStateBlock->streamFreq[i]; This->streamFreq[i] = targetStateBlock->streamFreq[i];
This->streamFlags[i] = targetStateBlock->streamFlags[i]; This->streamFlags[i] = targetStateBlock->streamFlags[i];
} }
...@@ -536,15 +536,15 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -536,15 +536,15 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if (This->changed.clipplane[i] if (This->changed.clipplane[i]
&& memcmp(targetStateBlock->clipplane[i], This->clipplane[i], sizeof(*This->clipplane))) && 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)); memcpy(This->clipplane[i], targetStateBlock->clipplane[i], sizeof(*This->clipplane));
} }
} }
/* Render */ /* Render */
for (i = 0; i < This->num_contained_render_states; i++) { for (i = 0; i < This->num_contained_render_states; i++) {
TRACE("Updating renderState %d to %d\n", TRACE("Updating renderState %u to %u\n", This->contained_render_states[i],
This->contained_render_states[i], targetStateBlock->renderState[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]]; 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) ...@@ -553,7 +553,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
DWORD stage = This->contained_tss_states[j].stage; DWORD stage = This->contained_tss_states[j].stage;
DWORD state = This->contained_tss_states[j].state; DWORD state = This->contained_tss_states[j].state;
TRACE("Updating texturestagestate %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]); targetStateBlock->textureState[stage][state], This->textureState[stage][state]);
This->textureState[stage][state] = targetStateBlock->textureState[stage][state]; This->textureState[stage][state] = targetStateBlock->textureState[stage][state];
} }
...@@ -562,7 +562,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -562,7 +562,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* TODO: move over to using memcpy */ /* TODO: move over to using memcpy */
for (j = 0; j < MAX_COMBINED_SAMPLERS; j++) { for (j = 0; j < MAX_COMBINED_SAMPLERS; j++) {
if (This->changed.textures[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]; This->textures[j] = targetStateBlock->textures[j];
} }
} }
...@@ -570,9 +570,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -570,9 +570,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
for (j = 0; j < This->num_contained_sampler_states; j++) { for (j = 0; j < This->num_contained_sampler_states; j++) {
DWORD stage = This->contained_sampler_states[j].stage; DWORD stage = This->contained_sampler_states[j].stage;
DWORD state = This->contained_sampler_states[j].state; DWORD state = This->contained_sampler_states[j].state;
TRACE("Updating sampler state %d,%d to %d (was %d)\n", TRACE("Updating sampler state %u, %u to %u (was %u)\n", stage, state,
stage, state, targetStateBlock->samplerState[stage][state], targetStateBlock->samplerState[stage][state], This->samplerState[stage][state]);
This->samplerState[stage][state]);
This->samplerState[stage][state] = targetStateBlock->samplerState[stage][state]; This->samplerState[stage][state] = targetStateBlock->samplerState[stage][state];
} }
if(This->changed.pixelShader && This->pixelShader != targetStateBlock->pixelShader) { if(This->changed.pixelShader && This->pixelShader != targetStateBlock->pixelShader) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment