wined3d: Win64 printf fixes.

This commit is contained in:
Ivan Gyurdiev 2006-09-30 23:20:10 -04:00 committed by Alexandre Julliard
parent 54d1899210
commit 3dcd3681f3
27 changed files with 392 additions and 393 deletions

View File

@ -7,7 +7,6 @@ IMPORTLIB = libwined3d.$(IMPLIBEXT)
IMPORTS = user32 gdi32 advapi32 kernel32
EXTRAINCL = @X_CFLAGS@
EXTRALIBS = -luuid @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ @OPENGL_LIBS@
EXTRADEFS = -DWINE_NO_LONG_AS_INT
C_SRCS = \
arb_program_shader.c \

View File

@ -163,23 +163,23 @@ void shader_generate_arb_declarations(
for(i = 0; i < This->baseShader.limits.temporary; i++) {
if (reg_maps->temporary[i])
shader_addline(buffer, "TEMP R%lu;\n", i);
shader_addline(buffer, "TEMP R%u;\n", i);
}
for (i = 0; i < This->baseShader.limits.address; i++) {
if (reg_maps->address[i])
shader_addline(buffer, "ADDRESS A%ld;\n", i);
shader_addline(buffer, "ADDRESS A%d;\n", i);
}
for(i = 0; i < This->baseShader.limits.texcoord; i++) {
if (reg_maps->texcoord[i])
shader_addline(buffer,"TEMP T%lu;\n", i);
shader_addline(buffer,"TEMP T%u;\n", i);
}
/* Texture coordinate registers must be pre-loaded */
for (i = 0; i < This->baseShader.limits.texcoord; i++) {
if (reg_maps->texcoord[i])
shader_addline(buffer, "MOV T%lu, fragment.texcoord[%lu];\n", i, i);
shader_addline(buffer, "MOV T%u, fragment.texcoord[%u];\n", i, i);
}
/* Need to PARAM the environment parameters (constants) so we can use relative addressing */
@ -315,7 +315,7 @@ static void pshader_get_register_name(
switch (regtype) {
case D3DSPR_TEMP:
sprintf(regstr, "R%lu", reg);
sprintf(regstr, "R%u", reg);
break;
case D3DSPR_INPUT:
if (reg==0) {
@ -325,17 +325,17 @@ static void pshader_get_register_name(
}
break;
case D3DSPR_CONST:
sprintf(regstr, "C[%lu]", reg);
sprintf(regstr, "C[%u]", reg);
break;
case D3DSPR_TEXTURE: /* case D3DSPR_ADDR: */
sprintf(regstr,"T%lu", reg);
sprintf(regstr,"T%u", reg);
break;
case D3DSPR_COLOROUT:
if (reg == 0)
sprintf(regstr, "result.color");
else {
/* TODO: See GL_ARB_draw_buffers */
FIXME("Unsupported write to render target %lu\n", reg);
FIXME("Unsupported write to render target %u\n", reg);
sprintf(regstr, "unsupported_register");
}
break;
@ -343,13 +343,13 @@ static void pshader_get_register_name(
sprintf(regstr, "result.depth");
break;
case D3DSPR_ATTROUT:
sprintf(regstr, "oD[%lu]", reg);
sprintf(regstr, "oD[%u]", reg);
break;
case D3DSPR_TEXCRDOUT:
sprintf(regstr, "oT[%lu]", reg);
sprintf(regstr, "oT[%u]", reg);
break;
default:
FIXME("Unhandled register name Type(%ld)\n", regtype);
FIXME("Unhandled register name Type(%d)\n", regtype);
sprintf(regstr, "unrecognized_register");
break;
}
@ -376,7 +376,7 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
switch (regtype) {
case D3DSPR_TEMP:
sprintf(tmpReg, "R%lu", reg);
sprintf(tmpReg, "R%u", reg);
strcat(hwLine, tmpReg);
break;
case D3DSPR_INPUT:
@ -384,15 +384,15 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
if (vshader_input_is_color((IWineD3DVertexShader*) This, reg))
is_color = TRUE;
sprintf(tmpReg, "vertex.attrib[%lu]", reg);
sprintf(tmpReg, "vertex.attrib[%u]", reg);
strcat(hwLine, tmpReg);
break;
case D3DSPR_CONST:
sprintf(tmpReg, "C[%s%lu]", (param & D3DVS_ADDRMODE_RELATIVE) ? "A0.x + " : "", reg);
sprintf(tmpReg, "C[%s%u]", (param & D3DVS_ADDRMODE_RELATIVE) ? "A0.x + " : "", reg);
strcat(hwLine, tmpReg);
break;
case D3DSPR_ADDR: /*case D3DSPR_TEXTURE:*/
sprintf(tmpReg, "A%lu", reg);
sprintf(tmpReg, "A%u", reg);
strcat(hwLine, tmpReg);
break;
case D3DSPR_RASTOUT:
@ -407,11 +407,11 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
}
break;
case D3DSPR_TEXCRDOUT:
sprintf(tmpReg, "result.texcoord[%lu]", reg);
sprintf(tmpReg, "result.texcoord[%u]", reg);
strcat(hwLine, tmpReg);
break;
default:
FIXME("Unknown reg type %ld %ld\n", regtype, reg);
FIXME("Unknown reg type %d %d\n", regtype, reg);
strcat(hwLine, "unrecognized_register");
break;
}
@ -577,10 +577,10 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
partialprecision = mask & D3DSPDM_PARTIALPRECISION;
mask &= ~(D3DSPDM_MSAMPCENTROID | D3DSPDM_PARTIALPRECISION | D3DSPDM_SATURATE);
if (mask)
FIXME("Unrecognized modifier(0x%#lx)\n", mask >> D3DSP_DSTMOD_SHIFT);
FIXME("Unrecognized modifier(0x%#x)\n", mask >> D3DSP_DSTMOD_SHIFT);
if (centroid)
FIXME("Unhandled modifier(0x%#lx)\n", mask >> D3DSP_DSTMOD_SHIFT);
FIXME("Unhandled modifier(0x%#x)\n", mask >> D3DSP_DSTMOD_SHIFT);
}
shift = (dst & D3DSP_DSTSHIFT_MASK) >> D3DSP_DSTSHIFT_SHIFT;
@ -669,15 +669,15 @@ void pshader_hw_tex(SHADER_OPCODE_ARG* arg) {
break;
default:
ERR("Unexpected texture type %ld\n", sampler_type);
ERR("Unexpected texture type %d\n", sampler_type);
tex_type = "2D";
}
if (deviceImpl->stateBlock->textureState[reg_sampler_code][D3DTSS_TEXTURETRANSFORMFLAGS] & D3DTTFF_PROJECTED) {
shader_addline(buffer, "TXP %s, %s, texture[%lu], %s;\n",
shader_addline(buffer, "TXP %s, %s, texture[%u], %s;\n",
reg_dest, reg_coord, reg_sampler_code, tex_type);
} else {
shader_addline(buffer, "TEX %s, %s, texture[%lu], %s;\n",
shader_addline(buffer, "TEX %s, %s, texture[%u], %s;\n",
reg_dest, reg_coord, reg_sampler_code, tex_type);
}
}
@ -694,11 +694,11 @@ void pshader_hw_texcoord(SHADER_OPCODE_ARG* arg) {
pshader_get_write_mask(dst, tmp);
if (hex_version != D3DPS_VERSION(1,4)) {
DWORD reg = dst & D3DSP_REGNUM_MASK;
shader_addline(buffer, "MOV_SAT T%lu%s, fragment.texcoord[%lu];\n", reg, tmp, reg);
shader_addline(buffer, "MOV_SAT T%u%s, fragment.texcoord[%u];\n", reg, tmp, reg);
} else {
DWORD reg1 = dst & D3DSP_REGNUM_MASK;
DWORD reg2 = src[0] & D3DSP_REGNUM_MASK;
shader_addline(buffer, "MOV R%lu%s, fragment.texcoord[%lu];\n", reg1, tmp, reg2);
shader_addline(buffer, "MOV R%u%s, fragment.texcoord[%u];\n", reg1, tmp, reg2);
}
}
@ -708,9 +708,9 @@ void pshader_hw_texreg2ar(SHADER_OPCODE_ARG* arg) {
DWORD reg1 = arg->dst & D3DSP_REGNUM_MASK;
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
shader_addline(buffer, "MOV TMP.r, T%lu.a;\n", reg2);
shader_addline(buffer, "MOV TMP.g, T%lu.r;\n", reg2);
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], 2D;\n", reg1, reg1);
shader_addline(buffer, "MOV TMP.r, T%u.a;\n", reg2);
shader_addline(buffer, "MOV TMP.g, T%u.r;\n", reg2);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], 2D;\n", reg1, reg1);
}
void pshader_hw_texreg2gb(SHADER_OPCODE_ARG* arg) {
@ -719,9 +719,9 @@ void pshader_hw_texreg2gb(SHADER_OPCODE_ARG* arg) {
DWORD reg1 = arg->dst & D3DSP_REGNUM_MASK;
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
shader_addline(buffer, "MOV TMP.r, T%lu.g;\n", reg2);
shader_addline(buffer, "MOV TMP.g, T%lu.b;\n", reg2);
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], 2D;\n", reg1, reg1);
shader_addline(buffer, "MOV TMP.r, T%u.g;\n", reg2);
shader_addline(buffer, "MOV TMP.g, T%u.b;\n", reg2);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], 2D;\n", reg1, reg1);
}
void pshader_hw_texbem(SHADER_OPCODE_ARG* arg) {
@ -731,8 +731,8 @@ void pshader_hw_texbem(SHADER_OPCODE_ARG* arg) {
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
/* FIXME: Should apply the BUMPMAPENV matrix */
shader_addline(buffer, "ADD TMP.rg, fragment.texcoord[%lu], T%lu;\n", reg1, reg2);
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], 2D;\n", reg1, reg1);
shader_addline(buffer, "ADD TMP.rg, fragment.texcoord[%u], T%u;\n", reg1, reg2);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], 2D;\n", reg1, reg1);
}
void pshader_hw_texm3x2pad(SHADER_OPCODE_ARG* arg) {
@ -742,7 +742,7 @@ void pshader_hw_texm3x2pad(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.x, T%lu, %s;\n", reg, src0_name);
shader_addline(buffer, "DP3 TMP.x, T%u, %s;\n", reg, src0_name);
}
void pshader_hw_texm3x2tex(SHADER_OPCODE_ARG* arg) {
@ -752,8 +752,8 @@ void pshader_hw_texm3x2tex(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.y, T%lu, %s;\n", reg, src0_name);
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], 2D;\n", reg, reg);
shader_addline(buffer, "DP3 TMP.y, T%u, %s;\n", reg, src0_name);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], 2D;\n", reg, reg);
}
void pshader_hw_texm3x3pad(SHADER_OPCODE_ARG* arg) {
@ -765,7 +765,7 @@ void pshader_hw_texm3x3pad(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.%c, T%lu, %s;\n", 'x' + current_state->current_row, reg, src0_name);
shader_addline(buffer, "DP3 TMP.%c, T%u, %s;\n", 'x' + current_state->current_row, reg, src0_name);
current_state->texcoord_w[current_state->current_row++] = reg;
}
@ -778,10 +778,10 @@ void pshader_hw_texm3x3tex(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%lu, %s;\n", reg, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
/* Cubemap textures will be more used than 3D ones. */
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], CUBE;\n", reg, reg);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], CUBE;\n", reg, reg);
current_state->current_row = 0;
}
@ -794,12 +794,12 @@ void pshader_hw_texm3x3vspec(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%lu, %s;\n", reg, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
/* Construct the eye-ray vector from w coordinates */
shader_addline(buffer, "MOV TMP2.x, fragment.texcoord[%lu].w;\n", current_state->texcoord_w[0]);
shader_addline(buffer, "MOV TMP2.y, fragment.texcoord[%lu].w;\n", current_state->texcoord_w[1]);
shader_addline(buffer, "MOV TMP2.z, fragment.texcoord[%lu].w;\n", reg);
shader_addline(buffer, "MOV TMP2.x, fragment.texcoord[%u].w;\n", current_state->texcoord_w[0]);
shader_addline(buffer, "MOV TMP2.y, fragment.texcoord[%u].w;\n", current_state->texcoord_w[1]);
shader_addline(buffer, "MOV TMP2.z, fragment.texcoord[%u].w;\n", reg);
/* Calculate reflection vector (Assume normal is normalized): RF = 2*(N.E)*N -E */
shader_addline(buffer, "DP3 TMP.w, TMP, TMP2;\n");
@ -807,7 +807,7 @@ void pshader_hw_texm3x3vspec(SHADER_OPCODE_ARG* arg) {
shader_addline(buffer, "MAD TMP, coefmul.x, TMP, -TMP2;\n");
/* Cubemap textures will be more used than 3D ones. */
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], CUBE;\n", reg, reg);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], CUBE;\n", reg, reg);
current_state->current_row = 0;
}
@ -821,15 +821,15 @@ void pshader_hw_texm3x3spec(SHADER_OPCODE_ARG* arg) {
char src0_name[50];
pshader_gen_input_modifier_line(buffer, arg->src[0], 0, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%lu, %s;\n", reg, src0_name);
shader_addline(buffer, "DP3 TMP.z, T%u, %s;\n", reg, src0_name);
/* Calculate reflection vector (Assume normal is normalized): RF = 2*(N.E)*N -E */
shader_addline(buffer, "DP3 TMP.w, TMP, C[%lu];\n", reg3);
shader_addline(buffer, "DP3 TMP.w, TMP, C[%u];\n", reg3);
shader_addline(buffer, "MUL TMP, TMP.w, TMP;\n");
shader_addline(buffer, "MAD TMP, coefmul.x, TMP, -C[%lu];\n", reg3);
shader_addline(buffer, "MAD TMP, coefmul.x, TMP, -C[%u];\n", reg3);
/* Cubemap textures will be more used than 3D ones. */
shader_addline(buffer, "TEX T%lu, TMP, texture[%lu], CUBE;\n", reg, reg);
shader_addline(buffer, "TEX T%u, TMP, texture[%u], CUBE;\n", reg, reg);
current_state->current_row = 0;
}

View File

@ -81,7 +81,7 @@ const SHADER_OPCODE* shader_get_opcode(
}
++i;
}
FIXME("Unsupported opcode %#lx(%ld) masked %#lx, shader version %#lx\n",
FIXME("Unsupported opcode %#x(%d) masked %#x, shader version %#x\n",
code, code, code & D3DSI_OPCODE_MASK, hex_version);
return NULL;
}
@ -144,8 +144,8 @@ int shader_skip_unrecognized(
tokens_read += shader_get_param(iface, pToken, &param, &addr_token);
pToken += tokens_read;
FIXME("Unrecognized opcode param: token=%08lX "
"addr_token=%08lX name=", param, addr_token);
FIXME("Unrecognized opcode param: token=%08x "
"addr_token=%08x name=", param, addr_token);
shader_dump_param(iface, param, addr_token, i);
FIXME("\n");
++i;
@ -302,7 +302,7 @@ HRESULT shader_get_registers_used(
DWORD sampler_code = *pToken & D3DSP_REGNUM_MASK;
if(!stateBlock->textures[sampler_code]) {
ERR("No texture bound to sampler %ld\n", sampler_code);
ERR("No texture bound to sampler %d\n", sampler_code);
reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D;
} else {
int texType = IWineD3DBaseTexture_GetTextureDimensions(stateBlock->textures[sampler_code]);
@ -404,7 +404,7 @@ static void shader_dump_decl_usage(
case WINED3DSTT_2D: TRACE("_2d"); break;
case WINED3DSTT_CUBE: TRACE("_cube"); break;
case WINED3DSTT_VOLUME: TRACE("_volume"); break;
default: TRACE("_unknown_ttype(%08lx)", ttype);
default: TRACE("_unknown_ttype(%08x)", ttype);
}
} else {
@ -421,7 +421,7 @@ static void shader_dump_decl_usage(
switch(usage) {
case D3DDECLUSAGE_POSITION:
TRACE("%s%ld", "position", idx);
TRACE("%s%d", "position", idx);
break;
case D3DDECLUSAGE_BLENDINDICES:
TRACE("%s", "blend");
@ -430,7 +430,7 @@ static void shader_dump_decl_usage(
TRACE("%s", "weight");
break;
case D3DDECLUSAGE_NORMAL:
TRACE("%s%ld", "normal", idx);
TRACE("%s%d", "normal", idx);
break;
case D3DDECLUSAGE_PSIZE:
TRACE("%s", "psize");
@ -439,11 +439,11 @@ static void shader_dump_decl_usage(
if(idx == 0) {
TRACE("%s", "color");
} else {
TRACE("%s%ld", "specular", (idx - 1));
TRACE("%s%d", "specular", (idx - 1));
}
break;
case D3DDECLUSAGE_TEXCOORD:
TRACE("%s%ld", "texture", idx);
TRACE("%s%d", "texture", idx);
break;
case D3DDECLUSAGE_TANGENT:
TRACE("%s", "tangent");
@ -455,7 +455,7 @@ static void shader_dump_decl_usage(
TRACE("%s", "tessfactor");
break;
case D3DDECLUSAGE_POSITIONT:
TRACE("%s%ld", "positionT", idx);
TRACE("%s%d", "positionT", idx);
break;
case D3DDECLUSAGE_FOG:
TRACE("%s", "fog");
@ -467,7 +467,7 @@ static void shader_dump_decl_usage(
TRACE("%s", "sample");
break;
default:
FIXME("unknown_semantics(%08lx)", usage);
FIXME("unknown_semantics(%08x)", usage);
}
}
}
@ -538,7 +538,7 @@ void shader_dump_param(
switch (regtype) {
case D3DSPR_TEMP:
TRACE("r%lu", reg);
TRACE("r%u", reg);
break;
case D3DSPR_INPUT:
TRACE("v");
@ -552,19 +552,19 @@ void shader_dump_param(
shader_dump_arr_entry(iface, param, addr_token, shader_get_float_offset(param), input);
break;
case D3DSPR_TEXTURE: /* vs: case D3DSPR_ADDR */
TRACE("%c%lu", (pshader? 't':'a'), reg);
TRACE("%c%u", (pshader? 't':'a'), reg);
break;
case D3DSPR_RASTOUT:
TRACE("%s", rastout_reg_names[reg]);
break;
case D3DSPR_COLOROUT:
TRACE("oC%lu", reg);
TRACE("oC%u", reg);
break;
case D3DSPR_DEPTHOUT:
TRACE("oDepth");
break;
case D3DSPR_ATTROUT:
TRACE("oD%lu", reg);
TRACE("oD%u", reg);
break;
case D3DSPR_TEXCRDOUT:
@ -576,7 +576,7 @@ void shader_dump_param(
shader_dump_arr_entry(iface, param, addr_token, reg, input);
}
else
TRACE("oT%lu", reg);
TRACE("oT%u", reg);
break;
case D3DSPR_CONSTINT:
TRACE("i");
@ -587,19 +587,19 @@ void shader_dump_param(
shader_dump_arr_entry(iface, param, addr_token, reg, input);
break;
case D3DSPR_LABEL:
TRACE("l%lu", reg);
TRACE("l%u", reg);
break;
case D3DSPR_LOOP:
TRACE("aL");
break;
case D3DSPR_SAMPLER:
TRACE("s%lu", reg);
TRACE("s%u", reg);
break;
case D3DSPR_PREDICATE:
TRACE("p%lu", reg);
TRACE("p%u", reg);
break;
default:
TRACE("unhandled_rtype(%#lx)", regtype);
TRACE("unhandled_rtype(%#x)", regtype);
break;
}
@ -639,7 +639,7 @@ void shader_dump_param(
case D3DSPSM_ABSNEG: TRACE(")"); break;
case D3DSPSM_ABS: TRACE(")"); break;
default:
TRACE("_unknown_modifier(%#lx)", modifier >> D3DSP_SRCMOD_SHIFT);
TRACE("_unknown_modifier(%#x)", modifier >> D3DSP_SRCMOD_SHIFT);
}
}
@ -720,7 +720,7 @@ void shader_generate_main(
/* Unknown opcode and its parameters */
if (NULL == curOpcode) {
FIXME("Unrecognized opcode: token=%08lX\n", hw_arg.opcode_token);
FIXME("Unrecognized opcode: token=%08x\n", hw_arg.opcode_token);
pToken += shader_skip_unrecognized(iface, pToken);
/* Nothing to do */
@ -793,7 +793,7 @@ void shader_dump_ins_modifiers(const DWORD output) {
case 1: TRACE("_x2"); break;
case 2: TRACE("_x4"); break;
case 3: TRACE("_x8"); break;
default: TRACE("_unhandled_shift(%ld)", shift); break;
default: TRACE("_unhandled_shift(%d)", shift); break;
}
if (mmask & D3DSPDM_SATURATE) TRACE("_sat");
@ -802,7 +802,7 @@ void shader_dump_ins_modifiers(const DWORD output) {
mmask &= ~(D3DSPDM_SATURATE | D3DSPDM_PARTIALPRECISION | D3DSPDM_MSAMPCENTROID);
if (mmask)
FIXME("_unrecognized_modifier(%#lx)", mmask >> D3DSP_DSTMOD_SHIFT);
FIXME("_unrecognized_modifier(%#x)", mmask >> D3DSP_DSTMOD_SHIFT);
}
/* First pass: trace shader, initialize length and version */
@ -824,7 +824,7 @@ void shader_trace_init(
while (D3DVS_END() != *pToken) {
if (shader_is_version_token(*pToken)) { /** version */
This->baseShader.hex_version = *pToken;
TRACE("%s_%lu_%lu\n", shader_is_pshader_version(This->baseShader.hex_version)? "ps": "vs",
TRACE("%s_%u_%u\n", shader_is_pshader_version(This->baseShader.hex_version)? "ps": "vs",
D3DSHADER_VERSION_MAJOR(This->baseShader.hex_version),
D3DSHADER_VERSION_MINOR(This->baseShader.hex_version));
++pToken;
@ -845,7 +845,7 @@ void shader_trace_init(
if (NULL == curOpcode) {
int tokens_read;
FIXME("Unrecognized opcode: token=%08lX\n", opcode_token);
FIXME("Unrecognized opcode: token=%08x\n", opcode_token);
tokens_read = shader_skip_unrecognized(iface, pToken);
pToken += tokens_read;
len += tokens_read;
@ -877,18 +877,18 @@ void shader_trace_init(
len += 5;
} else if (curOpcode->opcode == D3DSIO_DEFI) {
TRACE("defi i%lu = %ld, %ld, %ld, %ld", *pToken & D3DSP_REGNUM_MASK,
(long) *(pToken + 1),
(long) *(pToken + 2),
(long) *(pToken + 3),
(long) *(pToken + 4));
TRACE("defi i%u = %d, %d, %d, %d", *pToken & D3DSP_REGNUM_MASK,
*(pToken + 1),
*(pToken + 2),
*(pToken + 3),
*(pToken + 4));
pToken += 5;
len += 5;
} else if (curOpcode->opcode == D3DSIO_DEFB) {
TRACE("defb b%lu = %s", *pToken & D3DSP_REGNUM_MASK,
TRACE("defb b%u = %s", *pToken & D3DSP_REGNUM_MASK,
*(pToken + 1)? "true": "false");
pToken += 2;
@ -921,7 +921,7 @@ void shader_trace_init(
case COMPARISON_NE: TRACE("_ne"); break;
case COMPARISON_LE: TRACE("_le"); break;
default:
TRACE("_(%lu)", op);
TRACE("_(%u)", op);
}
}

View File

@ -78,14 +78,14 @@ ULONG WINAPI IWineD3DBaseTextureImpl_AddRef(IWineD3DBaseTexture *iface) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
ULONG ref = InterlockedIncrement(&This->resource.ref);
TRACE("(%p) : AddRef increasing from %ld\n", This,ref - 1);
TRACE("(%p) : AddRef increasing from %d\n", This,ref - 1);
return ref;
}
ULONG WINAPI IWineD3DBaseTextureImpl_Release(IWineD3DBaseTexture *iface) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
if (ref == 0) {
IWineD3DBaseTextureImpl_CleanUp(iface);
HeapFree(GetProcessHeap(), 0, This);
@ -351,14 +351,14 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
for (i = 0 ;textureObjectSamplerStates[i].state != -1; i++) {
if (*state != samplerStates[textureObjectSamplerStates[i].state]) {
/* apply the state */
TRACE("(%p) : Changing state %u from %ld to %ld\n", This, i, *state , samplerStates[textureObjectSamplerStates[i].state]);
TRACE("(%p) : Changing state %u from %d to %d\n", This, i, *state , samplerStates[textureObjectSamplerStates[i].state]);
switch (textureObjectSamplerStates[i].function) {
case WINED3DSAMP_ADDRESSU:
case WINED3DSAMP_ADDRESSV: /* fall through */
case WINED3DSAMP_ADDRESSW: /* fall through */
*state = samplerStates[textureObjectSamplerStates[i].state];
if (*state < minLookup[WINELOOKUP_WARPPARAM] || *state > maxLookup[WINELOOKUP_WARPPARAM]) {
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %ld, state %d\n", *state, textureObjectSamplerStates[i].function);
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %d, state %d\n", *state, textureObjectSamplerStates[i].function);
} else {
GLint wrapParm = stateLookup[WINELOOKUP_WARPPARAM][*state - minLookup[WINELOOKUP_WARPPARAM]];
TRACE("Setting WRAP_R to %d for %x\n", wrapParm, textureDimensions);
@ -371,7 +371,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
float col[4];
*state = samplerStates[textureObjectSamplerStates[i].state];
D3DCOLORTOGLFLOAT4(*state, col);
TRACE("Setting border color for %u to %lx\n", textureDimensions, *state);
TRACE("Setting border color for %u to %x\n", textureDimensions, *state);
glTexParameterfv(textureDimensions, GL_TEXTURE_BORDER_COLOR, &col[0]);
checkGLcall("glTexParameteri(..., GL_TEXTURE_BORDER_COLOR, ...)");
}
@ -381,10 +381,10 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
GLint glValue;
*state = samplerStates[textureObjectSamplerStates[i].state];
if (*state < minLookup[WINELOOKUP_MAGFILTER] || *state > maxLookup[WINELOOKUP_MAGFILTER]) {
FIXME("Unrecognized or unsupported MAGFILTER* value %ld, state %d\n", *state, textureObjectSamplerStates[i].function);
FIXME("Unrecognized or unsupported MAGFILTER* value %d, state %d\n", *state, textureObjectSamplerStates[i].function);
}
glValue = stateLookup[WINELOOKUP_MAGFILTER][*state - minLookup[WINELOOKUP_MAGFILTER]];
TRACE("ValueMAG=%ld setting MAGFILTER to %x\n", *state, glValue);
TRACE("ValueMAG=%d setting MAGFILTER to %x\n", *state, glValue);
glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue);
/* We need to reset the Aniotropic filtering state when we change the mag filter to WINED3DTEXF_ANISOTROPIC (this seems a bit weird, check the documentataion to see how it should be switched off. */
if (GL_SUPPORT(EXT_TEXTURE_FILTER_ANISOTROPIC) && WINED3DTEXF_ANISOTROPIC == *state) {
@ -405,7 +405,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_LINEAR)
{
FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %ld, state %d D3DSAMP_MIPFILTER value %ld, state %d\n",
FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %d, state %d D3DSAMP_MIPFILTER value %d, state %d\n",
This->baseTexture.states[WINED3DTEXSTA_MINFILTER],
textureObjectSamplerStates[WINED3DTEXSTA_MINFILTER].function,
This->baseTexture.states[WINED3DTEXSTA_MIPFILTER],
@ -414,7 +414,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
glValue = minMipLookup[min(max(This->baseTexture.states[WINED3DTEXSTA_MINFILTER],WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC)]
[min(max(This->baseTexture.states[WINED3DTEXSTA_MIPFILTER],WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)];
TRACE("ValueMIN=%ld, ValueMIP=%ld, setting MINFILTER to %x\n",
TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n",
This->baseTexture.states[WINED3DTEXSTA_MINFILTER],
This->baseTexture.states[WINED3DTEXSTA_MIPFILTER], glValue);
glTexParameteri(textureDimensions, GL_TEXTURE_MIN_FILTER, glValue);

View File

@ -66,14 +66,14 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture
static ULONG WINAPI IWineD3DCubeTextureImpl_AddRef(IWineD3DCubeTexture *iface) {
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
return InterlockedIncrement(&This->resource.ref);
}
static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface) {
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
ref = InterlockedDecrement(&This->resource.ref);
if (ref == 0) {
int i,j;
@ -302,7 +302,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *ifac
}
if (WINED3D_OK == hr) {
TRACE("(%p) -> faceType(%d) level(%d) returning memory@%p success(%lu)\n", This, FaceType, Level, pLockedRect->pBits, hr);
TRACE("(%p) -> faceType(%d) level(%d) returning memory@%p success(%u)\n", This, FaceType, Level, pLockedRect->pBits, hr);
} else {
WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
}
@ -319,7 +319,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *if
}
if (WINED3D_OK == hr) {
TRACE("(%p) -> faceType(%d) level(%d) success(%lu)\n", This, FaceType, Level, hr);
TRACE("(%p) -> faceType(%d) level(%d) success(%u)\n", This, FaceType, Level, hr);
} else {
WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
}

View File

@ -451,10 +451,10 @@ static void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface,
*/
if (Sampler >= GL_LIMITS(sampler_stages)) {
FIXME("Trying to set the state of more samplers %ld than are supported %d by this openGL implementation\n", Sampler, GL_LIMITS(sampler_stages));
FIXME("Trying to set the state of more samplers %d than are supported %d by this openGL implementation\n", Sampler, GL_LIMITS(sampler_stages));
return;
}
VTRACE(("Activating appropriate texture state %ld\n", Sampler));
VTRACE(("Activating appropriate texture state %d\n", Sampler));
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
ENTER_GL();
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + texture_idx));
@ -472,7 +472,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface,
etc.... it's a lot cleaner, quicker and possibly easier to maintain than running a switch and setting a skip flag...
especially when there are a number of groups of states. */
TRACE("-----------------------> Updating the texture at Sampler %ld to have new texture state information\n", Sampler);
TRACE("-----------------------> Updating the texture at Sampler %d to have new texture state information\n", Sampler);
/* The list of states not to apply is a big as the list of states to apply, so it makes sense to produce an inclusive list */
#define APPLY_STATE(_state) IWineD3DDeviceImpl_ApplyTextureUnitState(iface, Sampler, _state)
@ -531,7 +531,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface,
}
}
TRACE("-----------------------> Updated the texture at Sampler %ld to have new texture state information\n", Sampler);
TRACE("-----------------------> Updated the texture at Sampler %d to have new texture state information\n", Sampler);
}
/**********************************************************
@ -558,7 +558,7 @@ static ULONG WINAPI IWineD3DDeviceImpl_AddRef(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, refCount - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1);
return refCount;
}
@ -566,7 +566,7 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p) : Releasing from %ld\n", This, refCount + 1);
TRACE("(%p) : Releasing from %d\n", This, refCount + 1);
if (!refCount) {
/* TODO: Clean up all the surfaces and textures! */
@ -728,7 +728,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
BOOL conv;
D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size)
TRACE("(%p) : Size=%d, Usage=%ld, FVF=%lx, Pool=%d - Memory@%p, Iface@%p\n", This, Size, Usage, FVF, Pool, object->resource.allocatedMemory, object);
TRACE("(%p) : Size=%d, Usage=%d, FVF=%x, Pool=%d - Memory@%p, Iface@%p\n", This, Size, Usage, FVF, Pool, object->resource.allocatedMemory, object);
*ppVertexBuffer = (IWineD3DVertexBuffer *)object;
if(Size == 0) return WINED3DERR_INVALIDCALL;
@ -783,7 +783,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,object->resource.size);
}
TRACE("(%p) : Len=%d, Use=%lx, Format=(%u,%s), Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage, Format,
TRACE("(%p) : Len=%d, Use=%x, Format=(%u,%s), Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage, Format,
debug_d3dformat(Format), Pool, object, object->resource.allocatedMemory);
*ppIndexBuffer = (IWineD3DIndexBuffer *) object;
@ -967,12 +967,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
***************************/
if(MultisampleQuality < 0) {
FIXME("Invalid multisample level %ld\n", MultisampleQuality);
FIXME("Invalid multisample level %d\n", MultisampleQuality);
return WINED3DERR_INVALIDCALL; /* TODO: Check that this is the case! */
}
if(MultisampleQuality > 0) {
FIXME("MultisampleQuality set to %ld, substituting 0\n", MultisampleQuality);
FIXME("MultisampleQuality set to %d, substituting 0\n", MultisampleQuality);
MultisampleQuality=0;
}
@ -1143,7 +1143,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
unsigned int pow2Height;
TRACE("(%p) : Width %d, Height %d, Levels %d, Usage %#lx\n", This, Width, Height, Levels, Usage);
TRACE("(%p) : Width %d, Height %d, Levels %d, Usage %#x\n", This, Width, Height, Levels, Usage);
TRACE("Format %#x (%s), Pool %#x, ppTexture %p, pSharedHandle %p, parent %p\n",
Format, debug_d3dformat(Format), Pool, ppTexture, pSharedHandle, parent);
@ -1243,7 +1243,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, WINED3DRTYPE_VOLUMETEXTURE, 0);
D3DINITIALIZEBASETEXTURE(object->baseTexture);
TRACE("(%p) : W(%d) H(%d) D(%d), Lvl(%d) Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
TRACE("(%p) : W(%d) H(%d) D(%d), Lvl(%d) Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
Depth, Levels, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool));
object->width = Width;
@ -1303,7 +1303,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
D3DCREATERESOURCEOBJECTINSTANCE(object, Volume, WINED3DRTYPE_VOLUME, ((Width * formatDesc->bpp) * Height * Depth))
TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
Depth, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool));
object->currentDesc.Width = Width;
@ -2020,7 +2020,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
IWineD3DPaletteImpl *object;
HRESULT hr;
TRACE("(%p)->(%lx, %p, %p, %p)\n", This, Flags, PalEnt, Palette, Parent);
TRACE("(%p)->(%x, %p, %p, %p)\n", This, Flags, PalEnt, Palette, Parent);
/* Create the new object */
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DPaletteImpl));
@ -2221,7 +2221,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EnumDisplayModes(IWineD3DDevice *iface,
int i;
const PixelFormatDesc *formatDesc = getFormatDescEntry(pixelformat);
TRACE("(%p)->(%lx,%d,%d,%d,%p,%p)\n", This, Flags, Width, Height, pixelformat, context, callback);
TRACE("(%p)->(%x,%d,%d,%d,%p,%p)\n", This, Flags, Width, Height, pixelformat, context, callback);
for (i = 0; EnumDisplaySettingsExW(NULL, i, &DevModeW, 0); i++) {
/* Ignore some modes if a description was passed */
@ -2229,7 +2229,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EnumDisplayModes(IWineD3DDevice *iface,
if ( (Height > 0) && (Height != DevModeW.dmPelsHeight)) continue;
if ( (pixelformat != WINED3DFMT_UNKNOWN) && ( formatDesc->bpp != DevModeW.dmBitsPerPel) ) continue;
TRACE("Enumerating %ldx%ld@%s\n", DevModeW.dmPelsWidth, DevModeW.dmPelsHeight, debug_d3dformat(pixelformat_for_depth(DevModeW.dmBitsPerPel)));
TRACE("Enumerating %dx%d@%s\n", DevModeW.dmPelsWidth, DevModeW.dmPelsHeight, debug_d3dformat(pixelformat_for_depth(DevModeW.dmBitsPerPel)));
if (callback((IUnknown *) This, (UINT) DevModeW.dmPelsWidth, (UINT) DevModeW.dmPelsHeight, pixelformat_for_depth(DevModeW.dmBitsPerPel), 60.0, context) == DDENUMRET_CANCEL)
return D3D_OK;
@ -2339,14 +2339,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetFVF(IWineD3DDevice *iface, DWORD fvf
This->updateStateBlock->changed.fvf = TRUE;
This->updateStateBlock->set.fvf = TRUE;
TRACE("(%p) : FVF Shader FVF set to %lx\n", This, fvf);
TRACE("(%p) : FVF Shader FVF set to %x\n", This, fvf);
return hr;
}
static HRESULT WINAPI IWineD3DDeviceImpl_GetFVF(IWineD3DDevice *iface, DWORD *pfvf) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : GetFVF returning %lx\n", This, This->stateBlock->fvf);
TRACE("(%p) : GetFVF returning %x\n", This, This->stateBlock->fvf);
*pfvf = This->stateBlock->fvf;
return WINED3D_OK;
}
@ -2656,7 +2656,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I
PLIGHTINFOEL *object, *temp;
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : Idx(%ld), pLight(%p)\n", This, Index, pLight);
TRACE("(%p) : Idx(%d), pLight(%p)\n", This, Index, pLight);
/* If recording state block, just add to end of lights chain */
if (This->isRecordingState) {
@ -2723,7 +2723,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I
}
/* Initialize the object */
TRACE("Light %ld setting to type %d, Diffuse(%f,%f,%f,%f), Specular(%f,%f,%f,%f), Ambient(%f,%f,%f,%f)\n", Index, pLight->Type,
TRACE("Light %d setting to type %d, Diffuse(%f,%f,%f,%f), Specular(%f,%f,%f,%f), Ambient(%f,%f,%f,%f)\n", Index, pLight->Type,
pLight->Diffuse.r, pLight->Diffuse.g, pLight->Diffuse.b, pLight->Diffuse.a,
pLight->Specular.r, pLight->Specular.g, pLight->Specular.b, pLight->Specular.a,
pLight->Ambient.r, pLight->Ambient.g, pLight->Ambient.b, pLight->Ambient.a);
@ -2804,7 +2804,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I
static HRESULT WINAPI IWineD3DDeviceImpl_GetLight(IWineD3DDevice *iface, DWORD Index, WINED3DLIGHT* pLight) {
PLIGHTINFOEL *lightInfo = NULL;
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : Idx(%ld), pLight(%p)\n", This, Index, pLight);
TRACE("(%p) : Idx(%d), pLight(%p)\n", This, Index, pLight);
/* Locate the light in the live lights */
lightInfo = This->stateBlock->lights;
@ -2826,7 +2826,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetLight(IWineD3DDevice *iface, DWORD I
static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD Index, BOOL Enable) {
PLIGHTINFOEL *lightInfo = NULL;
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : Idx(%ld), enable? %d\n", This, Index, Enable);
TRACE("(%p) : Idx(%d), enable? %d\n", This, Index, Enable);
/* Tests show true = 128...not clear why */
@ -2880,7 +2880,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
/* If we are disabling it, check it was enabled, and
still only do something if it has assigned a glIndex (which it should have!) */
if ((lightInfo->lightEnabled) && (lightInfo->glIndex != -1)) {
TRACE("Disabling light set up at gl idx %ld\n", lightInfo->glIndex);
TRACE("Disabling light set up at gl idx %d\n", lightInfo->glIndex);
ENTER_GL();
glDisable(GL_LIGHT0 + lightInfo->glIndex);
checkGLcall("glDisable GL_LIGHT0+Index");
@ -2898,7 +2898,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
/* If it already has a glIndex, it's still simple */
} else if (lightInfo->glIndex != -1) {
TRACE("Reusing light as already set up at gl idx %ld\n", lightInfo->glIndex);
TRACE("Reusing light as already set up at gl idx %d\n", lightInfo->glIndex);
lightInfo->lightEnabled = Enable;
ENTER_GL();
glEnable(GL_LIGHT0 + lightInfo->glIndex);
@ -2973,7 +2973,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
lightInfo->lightEnabled = Enable;
/* Finally set up the light in gl itself */
TRACE("Replacing light which was set up at gl idx %ld\n", lightInfo->glIndex);
TRACE("Replacing light which was set up at gl idx %d\n", lightInfo->glIndex);
ENTER_GL();
setup_light(iface, glIndex, lightInfo);
glEnable(GL_LIGHT0 + glIndex);
@ -3014,7 +3014,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
}
/* Finally set up the light in gl itself */
TRACE("Defining new light at gl idx %ld\n", lightInfo->glIndex);
TRACE("Defining new light at gl idx %d\n", lightInfo->glIndex);
ENTER_GL();
setup_light(iface, glIndex, lightInfo);
glEnable(GL_LIGHT0 + glIndex);
@ -3031,7 +3031,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetLightEnable(IWineD3DDevice *iface, D
PLIGHTINFOEL *lightInfo = NULL;
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : for idx(%ld)\n", This, Index);
TRACE("(%p) : for idx(%d)\n", This, Index);
/* Locate the light in the live lights */
lightInfo = This->stateBlock->lights;
@ -3050,7 +3050,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetLightEnable(IWineD3DDevice *iface, D
*****/
static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWORD Index, CONST float *pPlane) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : for idx %ld, %p\n", This, Index, pPlane);
TRACE("(%p) : for idx %d, %p\n", This, Index, pPlane);
/* Validate Index */
if (Index >= GL_LIMITS(clipplanes)) {
@ -3096,7 +3096,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWO
static HRESULT WINAPI IWineD3DDeviceImpl_GetClipPlane(IWineD3DDevice *iface, DWORD Index, float *pPlane) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : for idx %ld\n", This, Index);
TRACE("(%p) : for idx %d\n", This, Index);
/* Validate Index */
if (Index >= GL_LIMITS(clipplanes)) {
@ -3273,7 +3273,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONS
ENTER_GL();
TRACE("(%p) : x=%ld, y=%ld, wid=%ld, hei=%ld, minz=%f, maxz=%f\n", This,
TRACE("(%p) : x=%d, y=%d, wid=%d, hei=%d, minz=%f, maxz=%f\n", This,
pViewport->X, pViewport->Y, pViewport->Width, pViewport->Height, pViewport->MinZ, pViewport->MaxZ);
glDepthRange(pViewport->MinZ, pViewport->MaxZ);
@ -3377,7 +3377,7 @@ static void renderstate_stencil(IWineD3DDeviceImpl *This, D3DRENDERSTATETYPE Sta
if( This->stateBlock->set.renderState[WINED3DRS_CCW_STENCILPASS] )
stencilPass_ccw = StencilOp(This->stateBlock->renderState[WINED3DRS_CCW_STENCILPASS]);
TRACE("(onesided %ld, twosided %ld, ref %x, mask %x, \
TRACE("(onesided %d, twosided %d, ref %x, mask %x, \
GL_FRONT: func: %x, fail %x, zfail %x, zpass %x \
GL_BACK: func: %x, fail %x, zfail %x, zpass %x )\n",
onesided_enable, twosided_enable, ref, mask,
@ -3417,7 +3417,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
float f;
} tmpvalue;
TRACE("(%p)->state = %s(%d), value = %ld\n", This, debug_d3drenderstate(State), State, Value);
TRACE("(%p)->state = %s(%d), value = %d\n", This, debug_d3drenderstate(State), State, Value);
This->updateStateBlock->changed.renderState[State] = TRUE;
This->updateStateBlock->set.renderState[State] = TRUE;
This->updateStateBlock->renderState[State] = Value;
@ -3437,7 +3437,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case D3DFILL_WIREFRAME : glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); break;
case D3DFILL_SOLID : glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); break;
default:
FIXME("Unrecognized WINED3DRS_FILLMODE value %ld\n", Value);
FIXME("Unrecognized WINED3DRS_FILLMODE value %d\n", Value);
}
checkGLcall("glPolygonMode (fillmode)");
break;
@ -3468,7 +3468,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
FIXME("W buffer is not well handled\n");
break;
default:
FIXME("Unrecognized D3DZBUFFERTYPE value %ld\n", Value);
FIXME("Unrecognized D3DZBUFFERTYPE value %d\n", Value);
}
break;
@ -3507,7 +3507,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
glCullFace(GL_BACK);
break;
default:
FIXME("Unrecognized/Unhandled D3DCULL value %ld\n", Value);
FIXME("Unrecognized/Unhandled D3DCULL value %d\n", Value);
}
break;
@ -3525,7 +3525,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
FIXME("D3DSHADE_PHONG isn't supported\n");
break;
default:
FIXME("Unrecognized/Unhandled D3DSHADEMODE value %ld\n", Value);
FIXME("Unrecognized/Unhandled D3DSHADEMODE value %d\n", Value);
}
break;
@ -3610,7 +3610,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case D3DBLEND_BLENDFACTOR : newVal = GL_CONSTANT_COLOR; break;
case D3DBLEND_INVBLENDFACTOR : newVal = GL_ONE_MINUS_CONSTANT_COLOR; break;
default:
FIXME("Unrecognized src/dest blend value %ld (%d)\n", Value, State);
FIXME("Unrecognized src/dest blend value %d (%d)\n", Value, State);
}
if (State == WINED3DRS_SRCBLEND) This->srcBlend = newVal;
@ -3724,7 +3724,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case D3DBLENDOP_MIN : glParm = GL_MIN; break;
case D3DBLENDOP_MAX : glParm = GL_MAX; break;
default:
FIXME("Unrecognized/Unhandled D3DBLENDOP value %ld\n", Value);
FIXME("Unrecognized/Unhandled D3DBLENDOP value %d\n", Value);
}
if(GL_SUPPORT(EXT_BLEND_MINMAX)) {
@ -3851,7 +3851,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_STENCILWRITEMASK :
{
glStencilMask(Value);
TRACE("glStencilMask(%lu)\n", Value);
TRACE("glStencilMask(%u)\n", Value);
checkGLcall("glStencilMask");
}
break;
@ -3959,7 +3959,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
}
break;
}
default: FIXME("Unexpected WINED3DRS_FOGVERTEXMODE %ld\n", This->stateBlock->renderState[WINED3DRS_FOGVERTEXMODE]);
default: FIXME("Unexpected WINED3DRS_FOGVERTEXMODE %d\n", This->stateBlock->renderState[WINED3DRS_FOGVERTEXMODE]);
}
} else {
glHint(GL_FOG_HINT, GL_NICEST);
@ -3993,7 +3993,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
}
break;
case D3DFOG_NONE: /* Won't happen */
default: FIXME("Unexpected WINED3DRS_FOGTABLEMODE %ld\n", This->stateBlock->renderState[WINED3DRS_FOGTABLEMODE]);
default: FIXME("Unexpected WINED3DRS_FOGTABLEMODE %d\n", This->stateBlock->renderState[WINED3DRS_FOGTABLEMODE]);
}
}
if (GL_SUPPORT(NV_FOG_DISTANCE)) {
@ -4031,7 +4031,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_VERTEXBLEND :
{
This->updateStateBlock->vertex_blend = (D3DVERTEXBLENDFLAGS) Value;
TRACE("Vertex Blending state to %ld\n", Value);
TRACE("Vertex Blending state to %d\n", Value);
}
break;
@ -4045,7 +4045,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_INDEXEDVERTEXBLENDENABLE :
{
TRACE("Indexed Vertex Blend Enable to %ul\n", (BOOL) Value);
TRACE("Indexed Vertex Blend Enable to %u\n", (BOOL) Value);
}
break;
@ -4058,7 +4058,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
GLenum Parm = GL_AMBIENT_AND_DIFFUSE;
if (This->stateBlock->renderState[WINED3DRS_COLORVERTEX]) {
TRACE("diff %ld, amb %ld, emis %ld, spec %ld\n",
TRACE("diff %d, amb %d, emis %d, spec %d\n",
This->stateBlock->renderState[WINED3DRS_DIFFUSEMATERIALSOURCE],
This->stateBlock->renderState[WINED3DRS_AMBIENTMATERIALSOURCE],
This->stateBlock->renderState[WINED3DRS_EMISSIVEMATERIALSOURCE],
@ -4350,7 +4350,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
*/
{
if(Value) {
ERR("(%p)->(%s,%ld) Texture wraping not yet supported\n",This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) Texture wraping not yet supported\n",This, debug_d3drenderstate(State), Value);
}
break;
}
@ -4454,14 +4454,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_MULTISAMPLEMASK :
{
if(0xFFFFFFFF != Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_PATCHEDGESTYLE :
{
if(D3DPATCHEDGE_DISCRETE != Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4470,7 +4470,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
/* available in d3d8 but in d3d9 it was replaced by IDirect3DDevice9::SetNPatchMode */
tmpvalue.f = 1.0f;
if(tmpvalue.d != Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4483,7 +4483,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
* but our tests disagree.
* We do not claim to implement a debugging lib, so do not write an ERR
*/
WARN("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
WARN("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
}
break;
}
@ -4491,14 +4491,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_POSITIONDEGREE :
{
if(D3DDEGREE_CUBIC != Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_NORMALDEGREE :
{
if(D3DDEGREE_LINEAR != Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4510,16 +4510,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_ADAPTIVETESS_W :
{
if(This->stateBlock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION])
FIXME("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
FIXME("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
else
TRACE("(%p)->(%s,%ld): recording state but WINED3DRS_ENABLEADAPTIVETESSELLATION is not enabled\n", This, debug_d3drenderstate(State), Value);
TRACE("(%p)->(%s,%d): recording state but WINED3DRS_ENABLEADAPTIVETESSELLATION is not enabled\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_ENABLEADAPTIVETESSELLATION:
{
if(Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4529,7 +4529,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
{
/* depends on WINED3DRS_COLORWRITEENABLE. */
if(0x0000000F != Value)
ERR("(%p)->(%s,%ld) not yet implemented. Missing of cap D3DPMISCCAPS_INDEPENDENTWRITEMASKS wasn't honored?\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented. Missing of cap D3DPMISCCAPS_INDEPENDENTWRITEMASKS wasn't honored?\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4537,7 +4537,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
{
float col[4];
TRACE("Setting BlendFactor to %ld\n", Value);
TRACE("Setting BlendFactor to %d\n", Value);
D3DCOLORTOGLFLOAT4(Value, col);
if (0xFFFFFFFF != Value) {
@ -4555,14 +4555,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_SRGBWRITEENABLE :
{
if(Value)
ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_SEPARATEALPHABLENDENABLE :
{
if(Value)
ERR("(%p)->(%s,%ld) not yet implemented. Missing of cap D3DPMISCCAPS_SEPARATEALPHABLEND wasn't honored?\n", This, debug_d3drenderstate(State), Value);
ERR("(%p)->(%s,%d) not yet implemented. Missing of cap D3DPMISCCAPS_SEPARATEALPHABLEND wasn't honored?\n", This, debug_d3drenderstate(State), Value);
break;
}
@ -4571,14 +4571,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_BLENDOPALPHA :
{
if(This->stateBlock->renderState[WINED3DRS_SEPARATEALPHABLENDENABLE])
FIXME("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value);
FIXME("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
else
TRACE("(%p)->(%s,%ld): recording state but WINED3DRS_SEPARATEALPHABLENDENABLE is not enabled\n", This, debug_d3drenderstate(State), Value);
TRACE("(%p)->(%s,%d): recording state but WINED3DRS_SEPARATEALPHABLENDENABLE is not enabled\n", This, debug_d3drenderstate(State), Value);
break;
}
default:
FIXME("(%p)->(%s,%ld) unknown state\n", This, debug_d3drenderstate(State), Value);
FIXME("(%p)->(%s,%d) unknown state\n", This, debug_d3drenderstate(State), Value);
}
LEAVE_GL();
@ -4588,7 +4588,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderState(IWineD3DDevice *iface, D3DRENDERSTATETYPE State, DWORD *pValue) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) for State %d = %ld\n", This, State, This->stateBlock->renderState[State]);
TRACE("(%p) for State %d = %d\n", This, State, This->stateBlock->renderState[State]);
*pValue = This->stateBlock->renderState[State];
return WINED3D_OK;
}
@ -4616,12 +4616,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface,
******************/
/** NOTE: States are appled in IWineD3DBaseTextre ApplyStateChanges and IWineD3DDevice SetupTextureStates**/
if(Sampler > GL_LIMITS(sampler_stages) || Sampler < 0 || Type > WINED3D_HIGHEST_SAMPLER_STATE || Type < 0) {
FIXME("sampler %ld type %s(%u) is out of range [max_samplers=%d, highest_state=%d]\n",
FIXME("sampler %d type %s(%u) is out of range [max_samplers=%d, highest_state=%d]\n",
Sampler, debug_d3dsamplerstate(Type), Type, GL_LIMITS(sampler_stages), WINED3D_HIGHEST_SAMPLER_STATE);
return WINED3DERR_INVALIDCALL;
}
TRACE("(%p) : Sampler=%ld, Type=%s(%d), Value=%ld\n", This, Sampler,
TRACE("(%p) : Sampler=%d, Type=%s(%d), Value=%d\n", This, Sampler,
debug_d3dsamplerstate(Type), Type, Value);
This->updateStateBlock->samplerState[Sampler][Type] = Value;
This->updateStateBlock->set.samplerState[Sampler][Type] = Value;
@ -4640,7 +4640,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface,
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
/** TODO: check that sampler is in range **/
*Value = This->updateStateBlock->samplerState[Sampler][Type];
TRACE("(%p) : Sampler %ld Type %u Returning %ld\n", This, Sampler, Type, *Value);
TRACE("(%p) : Sampler %d Type %u Returning %d\n", This, Sampler, Type, *Value);
return WINED3D_OK;
}
@ -4650,7 +4650,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
ENTER_GL();
/** FIXME: Windows uses a top,left origin openGL uses a bottom Right? **/
TRACE("(%p)Setting new Scissor Rect to %ld:%ld-%ld:%ld\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom);
TRACE("(%p)Setting new Scissor Rect to %d:%d-%d:%d\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom);
glScissor(pRect->left, pRect->top, pRect->right - pRect->left, pRect->bottom - pRect->top);
LEAVE_GL();
@ -4668,7 +4668,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice *iface, R
pRect->top = scissorBox[1];
pRect->right = scissorBox[0] + scissorBox[2];
pRect->bottom = scissorBox[1] + scissorBox[3];
TRACE("(%p)Returning a Scissor Rect of %ld:%ld-%ld:%ld\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom);
TRACE("(%p)Returning a Scissor Rect of %d:%d-%d:%d\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom);
LEAVE_GL();
return WINED3D_OK;
}
@ -5195,7 +5195,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
/* Get the viewport */
IWineD3DDevice_GetViewport( (IWineD3DDevice *) This, &vp);
TRACE("Viewport: X=%ld, Y=%ld, Width=%ld, Height=%ld, MinZ=%f, MaxZ=%f\n",
TRACE("Viewport: X=%d, Y=%d, Width=%d, Height=%d, MinZ=%f, MaxZ=%f\n",
vp.X, vp.Y, vp.Width, vp.Height, vp.MinZ, vp.MaxZ);
multiply_matrix(&mat,&view_mat,&world_mat);
@ -5430,7 +5430,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DVertexBufferImpl *SrcImpl = (IWineD3DVertexBufferImpl *) pVertexDecl;
WineDirect3DVertexStridedData strided;
TRACE("(%p)->(%d,%d,%d,%p,%p,%ld\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
if (!SrcImpl) {
WARN("NULL source vertex buffer\n");
@ -5493,7 +5493,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
DWORD Value = This->updateStateBlock->textureState[Stage][Type];
/* FIXME: Handle 3d textures? What if TSS value set before set texture? Need to reapply all values? */
TRACE("(%p) : Stage=%ld, Type=%s(%d), Value=%ld\n", This, Stage, debug_d3dtexturestate(Type), Type, Value);
TRACE("(%p) : Stage=%d, Type=%s(%d), Value=%d\n", This, Stage, debug_d3dtexturestate(Type), Type, Value);
/* Check that the stage is within limits */
if (Stage >= GL_LIMITS(texture_stages) || Stage < 0) {
@ -5511,7 +5511,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
case WINED3DTSS_ADDRESSW :
#if 0 /* I'm not sure what D3D does about ADDRESSW appearing twice */
if (Value < minLookup[WINELOOKUP_WARPPARAM] || Value > maxLookup[WINELOOKUP_WARPPARAM]) {
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %ld, state %d\n", Value, Type);
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %d, state %d\n", Value, Type);
} else {
GLint wrapParm = stateLookup[WINELOOKUP_WARPPARAM][Value - minLookup[WINELOOKUP_WARPPARAM]];
@ -5658,7 +5658,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);
glDisable(GL_TEXTURE_GEN_Q);
FIXME("Unhandled WINED3DTSS_TEXCOORDINDEX %lx\n", Value);
FIXME("Unhandled WINED3DTSS_TEXCOORDINDEX %x\n", Value);
break;
}
}
@ -5671,28 +5671,28 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
case WINED3DTSS_BUMPENVMAT00 :
case WINED3DTSS_BUMPENVMAT01 :
TRACE("BUMPENVMAT0%u Stage=%ld, Type=%d, Value =%ld\n", Type - WINED3DTSS_BUMPENVMAT00, Stage, Type, Value);
TRACE("BUMPENVMAT0%u Stage=%d, Type=%d, Value =%d\n", Type - WINED3DTSS_BUMPENVMAT00, Stage, Type, Value);
break;
case WINED3DTSS_BUMPENVMAT10 :
case WINED3DTSS_BUMPENVMAT11 :
TRACE("BUMPENVMAT1%u Stage=%ld, Type=%d, Value =%ld\n", Type - WINED3DTSS_BUMPENVMAT10, Stage, Type, Value);
TRACE("BUMPENVMAT1%u Stage=%d, Type=%d, Value =%d\n", Type - WINED3DTSS_BUMPENVMAT10, Stage, Type, Value);
break;
case WINED3DTSS_BUMPENVLSCALE :
TRACE("BUMPENVLSCALE Stage=%ld, Type=%d, Value =%ld\n", Stage, Type, Value);
TRACE("BUMPENVLSCALE Stage=%d, Type=%d, Value =%d\n", Stage, Type, Value);
break;
case WINED3DTSS_BUMPENVLOFFSET :
TRACE("BUMPENVLOFFSET Stage=%ld, Type=%d, Value =%ld\n", Stage, Type, Value);
TRACE("BUMPENVLOFFSET Stage=%d, Type=%d, Value =%d\n", Stage, Type, Value);
break;
case WINED3DTSS_RESULTARG :
TRACE("RESULTARG Still a stub, Stage=%ld, Type=%d, Value =%ld\n", Stage, Type, Value);
TRACE("RESULTARG Still a stub, Stage=%d, Type=%d, Value =%d\n", Stage, Type, Value);
break;
default:
/* Put back later: FIXME("(%p) : stub, Stage=%ld, Type=%d, Value =%ld\n", This, Stage, Type, Value); */
TRACE("Still a stub, Stage=%ld, Type=%d, Value =%ld\n", Stage, Type, Value);
/* Put back later: FIXME("(%p) : stub, Stage=%d, Type=%d, Value =%d\n", This, Stage, Type, Value); */
TRACE("Still a stub, Stage=%d, Type=%d, Value =%d\n", Stage, Type, Value);
}
LEAVE_GL();
@ -5709,7 +5709,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
/* FIXME: Handle 3d textures? What if TSS value set before set texture? Need to reapply all values? */
TRACE("(%p) : Stage=%ld, Type=%s(%d), Value=%ld\n", This, Stage, debug_d3dtexturestate(Type), Type, Value);
TRACE("(%p) : Stage=%d, Type=%s(%d), Value=%d\n", This, Stage, debug_d3dtexturestate(Type), Type, Value);
/* Reject invalid texture units */
if (Stage >= GL_LIMITS(texture_stages)) {
@ -5726,7 +5726,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
static HRESULT WINAPI IWineD3DDeviceImpl_GetTextureStageState(IWineD3DDevice *iface, DWORD Stage, WINED3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : requesting Stage %ld, Type %d getting %ld\n", This, Stage, Type, This->updateStateBlock->textureState[Stage][Type]);
TRACE("(%p) : requesting Stage %d, Type %d getting %d\n", This, Stage, Type, This->updateStateBlock->textureState[Stage][Type]);
*pValue = This->updateStateBlock->textureState[Stage][Type];
return WINED3D_OK;
}
@ -5740,7 +5740,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
IWineD3DBaseTexture *oldTexture;
oldTexture = This->updateStateBlock->textures[Stage];
TRACE("(%p) : Stage(%ld), Texture (%p)\n", This, Stage, pTexture);
TRACE("(%p) : Stage(%d), Texture (%p)\n", This, Stage, pTexture);
#if 0 /* TODO: check so vertex textures */
if (Stage >= D3DVERTEXTEXTURESAMPLER && Stage <= D3DVERTEXTEXTURESAMPLER3){
@ -5811,7 +5811,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD Stage, IWineD3DBaseTexture** ppTexture) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("(%p) : (%ld /* Stage */,%p /* ppTexture */)\n", This, Stage, ppTexture);
TRACE("(%p) : (%d /* Stage */,%p /* ppTexture */)\n", This, Stage, ppTexture);
/* Reject invalid texture units */
if (Stage >= GL_LIMITS(sampler_stages)) {
@ -6037,7 +6037,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
unsigned int i;
CONST D3DRECT* curRect;
TRACE("(%p) Count (%ld), pRects (%p), Flags (%lx), Z (%f), Stencil (%ld)\n", This,
TRACE("(%p) Count (%d), pRects (%p), Flags (%x), Z (%f), Stencil (%d)\n", This,
Count, pRects, Flags, Z, Stencil);
ENTER_GL();
@ -6070,7 +6070,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
}
if (Flags & D3DCLEAR_TARGET) {
TRACE("Clearing screen with glClear to color %lx\n", Color);
TRACE("Clearing screen with glClear to color %x\n", Color);
glGetFloatv(GL_COLOR_CLEAR_VALUE, old_color_clear_value);
glClearColor(D3DCOLOR_R(Color),
D3DCOLOR_G(Color),
@ -6088,7 +6088,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
if (curRect) {
/* Note gl uses lower left, width/height */
TRACE("(%p) %p Rect=(%ld,%ld)->(%ld,%ld) glRect=(%ld,%ld), len=%ld, hei=%ld\n", This, curRect,
TRACE("(%p) %p Rect=(%d,%d)->(%d,%d) glRect=(%d,%d), len=%d, hei=%d\n", This, curRect,
curRect->x1, curRect->y1, curRect->x2, curRect->y2,
curRect->x1, (((IWineD3DSurfaceImpl *)This->renderTarget)->currentDesc.Height - curRect->y2),
curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
@ -6903,7 +6903,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
WINED3DLOCKED_RECT lrDst;
RECT dest_rect;
TRACE("Copying rect %d (%ld,%ld),(%ld,%ld) -> (%ld,%ld)\n", i, r->left, r->top, r->right, r->bottom, p->x, p->y);
TRACE("Copying rect %d (%d,%d),(%d,%d) -> (%d,%d)\n", i, r->left, r->top, r->right, r->bottom, p->x, p->y);
if (srcFormat == WINED3DFMT_DXT1) {
copyperline = ((r->right - r->left) * bytesPerPixel) / 2; /* DXT1 is half byte per pixel */
} else {
@ -6938,7 +6938,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
for(i=0; i < cRects; i++) {
CONST RECT* r = &pSourceRectsArray[i];
TRACE("Copying rect %d (%ld,%ld),(%ld,%ld) -> (0, 0)\n", i, r->left, r->top, r->right, r->bottom);
TRACE("Copying rect %d (%d,%d),(%d,%d) -> (0, 0)\n", i, r->left, r->top, r->right, r->bottom);
if (srcFormat == WINED3DFMT_DXT1) {
copyperline = ((r->right - r->left) * bytesPerPixel) / 2; /* DXT1 is half byte per pixel */
} else {
@ -7000,7 +7000,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *) pSurface;
DDBLTFX BltFx;
TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color);
TRACE("(%p) Colour fill Surface: %p rect: %p color: %d\n", This, pSurface, pRect, color);
if (surface->resource.pool != WINED3DPOOL_DEFAULT && surface->resource.pool != WINED3DPOOL_SYSTEMMEM) {
FIXME("call to colorfill with non WINED3DPOOL_DEFAULT or WINED3DPOOL_SYSTEMMEM surface\n");
@ -7020,10 +7020,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface
/* FIXME: Implelent RenderTargetIndex >0 */
if(RenderTargetIndex > 0)
FIXME("(%p) : RenderTargetIndex %ld >0 not currently supported\n", This, RenderTargetIndex);
FIXME("(%p) : RenderTargetIndex %d >0 not currently supported\n", This, RenderTargetIndex);
*ppRenderTarget = This->renderTarget;
TRACE("(%p) : RenderTarget %ld Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget);
TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget);
/* Note inc ref on returned surface */
if(*ppRenderTarget != NULL)
IWineD3DSurface_AddRef(*ppRenderTarget);
@ -7680,7 +7680,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i
/* MSDN: Cursor must be smaller than the display mode */
if(pSur->currentDesc.Width > This->ddraw_width ||
pSur->currentDesc.Height > This->ddraw_height) {
ERR("(%p) : Surface(%p) is %dx%d pixels, but screen res is %ldx%ld\n", This, pSur, pSur->currentDesc.Width, pSur->currentDesc.Height, This->ddraw_width, This->ddraw_height);
ERR("(%p) : Surface(%p) is %dx%d pixels, but screen res is %dx%d\n", This, pSur, pSur->currentDesc.Width, pSur->currentDesc.Height, This->ddraw_width, This->ddraw_height);
return WINED3DERR_INVALIDCALL;
}
@ -7730,7 +7730,7 @@ static BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOO
static HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
TRACE("(%p) : state (%lu)\n", This, This->state);
TRACE("(%p) : state (%u)\n", This, This->state);
/* TODO: Implement wrapping of the WndProc so that mimimize and maxamise can be monitored and the states adjusted. */
switch (This->state) {
case WINED3D_OK:

View File

@ -182,14 +182,14 @@ static ULONG WINAPI IWineD3DImpl_AddRef(IWineD3D *iface) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, refCount - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1);
return refCount;
}
static ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
HeapFree(GetProcessHeap(), 0, This);
@ -450,7 +450,7 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
minor = 9;
}
gl_info->gl_driver_version = MAKEDWORD_VERSION(major, minor);
TRACE_(d3d_caps)("found GL_VERSION (%s)->%i.%i->(0x%08lx)\n", debugstr_a(gl_string), major, minor, gl_info->gl_driver_version);
TRACE_(d3d_caps)("found GL_VERSION (%s)->%i.%i->(0x%08x)\n", debugstr_a(gl_string), major, minor, gl_info->gl_driver_version);
}
TRACE_(d3d_caps)("found GL_RENDERER (%s)->(0x%04x)\n", debugstr_a(gl_info->gl_renderer), gl_info->gl_card);
@ -1259,7 +1259,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
WINED3DADAPTER_IDENTIFIER* pIdentifier) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %lx, pId=%p)\n", This, Adapter, Flags, pIdentifier);
TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %x, pId=%p)\n", This, Adapter, Flags, pIdentifier);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return WINED3DERR_INVALIDCALL;
@ -1508,7 +1508,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT
if (hr != WINED3D_OK)
TRACE_(d3d_caps)("Failed to match stencil format to device\b");
TRACE_(d3d_caps)("(%p) : Returning %lx\n", This, hr);
TRACE_(d3d_caps)("(%p) : Returning %x\n", This, hr);
return hr;
}
@ -1587,7 +1587,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%lu,%s,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ",
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%u,%s,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ",
This,
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
@ -2382,7 +2382,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
/* Set the state up as invalid until the device is fully created */
object->state = WINED3DERR_DRIVERINTERNALERROR;
TRACE("(%p)->(Adptr:%d, DevType: %x, FocusHwnd: %p, BehFlags: %lx, RetDevInt: %p)\n", This, Adapter, DeviceType,
TRACE("(%p)->(Adptr:%d, DevType: %x, FocusHwnd: %p, BehFlags: %x, RetDevInt: %p)\n", This, Adapter, DeviceType,
hFocusWindow, BehaviourFlags, ppReturnedDeviceInterface);
/* Save the creation parameters */

View File

@ -463,7 +463,7 @@ void primitiveDeclarationConvertToStridedData(
if (stride_used) {
TRACE("Loaded %s array %u [usage=%s, usage_idx=%u, "
"stream=%u, offset=%u, stride=%lu, VBO=%u]\n",
"stream=%u, offset=%u, stride=%u, VBO=%u]\n",
useVertexShaderFunction? "shader": "fixed function", idx,
debug_d3ddeclusage(element->Usage), element->UsageIndex,
element->Stream, element->Offset, stride, streamVBO);
@ -882,7 +882,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
checkGLcall("glEnableClientState(GL_WEIGHT_ARRAY_ARB)");
#endif
TRACE("Blend %d %p %ld\n", WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType),
TRACE("Blend %d %p %d\n", WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType),
sd->u.s.blendWeights.lpData, sd->u.s.blendWeights.dwStride);
/* FIXME("TODO\n");*/
/* Note dwType == float3 or float4 == 2 or 3 */
@ -895,7 +895,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
#endif
VTRACE(("glWeightPointerARB(%d, GL_FLOAT, %ld, %p)\n",
VTRACE(("glWeightPointerARB(%d, GL_FLOAT, %d, %p)\n",
WINED3D_ATR_SIZE(sd->u.s.blendWeights.dwType) ,
sd->u.s.blendWeights.dwStride,
sd->u.s.blendWeights.lpData));
@ -1026,7 +1026,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Vertex Pointers -----------------------------------------*/
if (sd->u.s.position.lpData != NULL || sd->u.s.position.VBO != 0) {
/* Note dwType == float3 or float4 == 2 or 3 */
VTRACE(("glVertexPointer(%ld, GL_FLOAT, %ld, %p)\n",
VTRACE(("glVertexPointer(%d, GL_FLOAT, %d, %p)\n",
sd->u.s.position.dwStride,
sd->u.s.position.dwType + 1,
sd->u.s.position.lpData));
@ -1067,7 +1067,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Normals -------------------------------------------------*/
if (sd->u.s.normal.lpData || sd->u.s.normal.VBO) {
/* Note dwType == float3 or float4 == 2 or 3 */
VTRACE(("glNormalPointer(GL_FLOAT, %ld, %p)\n",
VTRACE(("glNormalPointer(GL_FLOAT, %d, %p)\n",
sd->u.s.normal.dwStride,
sd->u.s.normal.lpData));
if(curVBO != sd->u.s.normal.VBO) {
@ -1101,7 +1101,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
if (sd->u.s.diffuse.lpData || sd->u.s.diffuse.VBO) {
/* Note dwType == float3 or float4 == 2 or 3 */
VTRACE(("glColorPointer(4, GL_UNSIGNED_BYTE, %ld, %p)\n",
VTRACE(("glColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n",
sd->u.s.diffuse.dwStride,
sd->u.s.diffuse.lpData));
@ -1128,7 +1128,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
if (sd->u.s.specular.lpData || sd->u.s.specular.VBO) {
TRACE("setting specular colour\n");
/* Note dwType == float3 or float4 == 2 or 3 */
VTRACE(("glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %ld, %p)\n",
VTRACE(("glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, %d, %p)\n",
sd->u.s.specular.dwStride,
sd->u.s.specular.lpData));
if (GL_SUPPORT(EXT_SECONDARY_COLOR)) {
@ -1227,7 +1227,7 @@ static void drawStridedFast(IWineD3DDevice *iface,UINT numberOfVertices, GLenum
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
if (idxData != NULL /* This crashes sometimes!*/) {
TRACE("(%p) : glElements(%x, %d, %ld, ...)\n", This, glPrimitiveType, numberOfVertices, minIndex);
TRACE("(%p) : glElements(%x, %d, %d, ...)\n", This, glPrimitiveType, numberOfVertices, minIndex);
idxData = idxData == (void *)-1 ? NULL : idxData;
#if 1
#if 0
@ -1306,10 +1306,10 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Indexed so work out the number of strides to skip */
if (idxSize == 2) {
VTRACE(("Idx for vertex %ld = %d\n", vx_index, pIdxBufS[startIdx+vx_index]));
VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufS[startIdx+vx_index]));
SkipnStrides = pIdxBufS[startIdx + vx_index];
} else {
VTRACE(("Idx for vertex %ld = %ld\n", vx_index, pIdxBufL[startIdx+vx_index]));
VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufL[startIdx+vx_index]));
SkipnStrides = pIdxBufL[startIdx + vx_index];
}
}
@ -1442,7 +1442,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
case 4: /* Nop here */
break;
default:
FIXME("Unexpected D3DTSS_TEXTURETRANSFORMFLAGS value of %ld\n",
FIXME("Unexpected D3DTSS_TEXTURETRANSFORMFLAGS value of %d\n",
This->stateBlock->textureState[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & D3DTTFF_PROJECTED);
}
}
@ -1628,10 +1628,10 @@ void drawStridedSoftwareVS(IWineD3DDevice *iface, WineDirect3DVertexStridedData
/* Indexed so work out the number of strides to skip */
if (idxSize == 2) {
VTRACE(("Idx for vertex %ld = %d\n", vx_index, pIdxBufS[startIdx+vx_index]));
VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufS[startIdx+vx_index]));
SkipnStrides = pIdxBufS[startIdx+vx_index];
} else {
VTRACE(("Idx for vertex %ld = %ld\n", vx_index, pIdxBufL[startIdx+vx_index]));
VTRACE(("Idx for vertex %d = %d\n", vx_index, pIdxBufL[startIdx+vx_index]));
SkipnStrides = pIdxBufL[startIdx+vx_index];
}
}
@ -2214,7 +2214,7 @@ void drawPrimitive(IWineD3DDevice *iface,
WINED3DLOCKED_RECT r;
char buffer[80];
IWineD3DSurface_LockRect(This->renderTarget, &r, NULL, WINED3DLOCK_READONLY);
sprintf(buffer, "/tmp/backbuffer_%ld.tga", primCounter);
sprintf(buffer, "/tmp/backbuffer_%d.tga", primCounter);
TRACE("Saving screenshot %s\n", buffer);
IWineD3DSurface_SaveSnapshot(This->renderTarget, buffer);
IWineD3DSurface_UnlockRect(This->renderTarget);
@ -2225,7 +2225,7 @@ void drawPrimitive(IWineD3DDevice *iface,
int textureNo;
for (textureNo = 0; textureNo < GL_LIMITS(textures); ++textureNo) {
if (This->stateBlock->textures[textureNo] != NULL) {
sprintf(buffer, "/tmp/texture_%p_%ld_%d.tga", This->stateBlock->textures[textureNo], primCounter, textureNo);
sprintf(buffer, "/tmp/texture_%p_%d_%d.tga", This->stateBlock->textures[textureNo], primCounter, textureNo);
TRACE("Saving texture %s\n", buffer);
if (IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]) == WINED3DRTYPE_TEXTURE) {
IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)This->stateBlock->textures[textureNo], 0, &pSur);
@ -2239,7 +2239,7 @@ void drawPrimitive(IWineD3DDevice *iface,
}
#endif
}
TRACE("drawprim #%ld\n", primCounter);
TRACE("drawprim #%d\n", primCounter);
++primCounter;
}
#endif

View File

@ -408,7 +408,7 @@ void shader_generate_glsl_declarations(
break;
default:
shader_addline(buffer, "uniform unsupported_sampler %csampler%lu;\n", prefix, i);
FIXME("Unrecognized sampler type: %#lx\n", stype);
FIXME("Unrecognized sampler type: %#x\n", stype);
break;
}
}
@ -417,7 +417,7 @@ void shader_generate_glsl_declarations(
/* Declare address variables */
for (i = 0; i < This->baseShader.limits.address; i++) {
if (reg_maps->address[i])
shader_addline(buffer, "ivec4 A%ld;\n", i);
shader_addline(buffer, "ivec4 A%d;\n", i);
}
/* Declare texture coordinate temporaries and initialize them */
@ -581,7 +581,7 @@ static void shader_glsl_gen_modifier (
sprintf(out_str, "-abs(%s%s)", in_reg, in_regswizzle);
break;
default:
FIXME("Unhandled modifier %lu\n", (instr & D3DSP_SRCMOD_MASK));
FIXME("Unhandled modifier %u\n", (instr & D3DSP_SRCMOD_MASK));
sprintf(out_str, "%s%s", in_reg, in_regswizzle);
}
}
@ -611,13 +611,13 @@ static void shader_glsl_get_register_name(
switch (regtype) {
case D3DSPR_TEMP:
sprintf(tmpStr, "R%lu", reg);
sprintf(tmpStr, "R%u", reg);
break;
case D3DSPR_INPUT:
if (pshader) {
/* Pixel shaders >= 3.0 */
if (D3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 3)
sprintf(tmpStr, "IN%lu", reg);
sprintf(tmpStr, "IN%u", reg);
else {
if (reg==0)
strcpy(tmpStr, "gl_Color");
@ -627,7 +627,7 @@ static void shader_glsl_get_register_name(
} else {
if (vshader_input_is_color((IWineD3DVertexShader*) This, reg))
*is_color = TRUE;
sprintf(tmpStr, "attrib%lu", reg);
sprintf(tmpStr, "attrib%u", reg);
}
break;
case D3DSPR_CONST:
@ -642,32 +642,32 @@ static void shader_glsl_get_register_name(
if (D3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2) {
char relStr[100], relReg[50], relMask[6];
shader_glsl_add_param(arg, addr_token, 0, TRUE, relReg, relMask, relStr);
sprintf(tmpStr, "%s[%s + %lu]", prefix, relStr, reg);
sprintf(tmpStr, "%s[%s + %u]", prefix, relStr, reg);
} else
sprintf(tmpStr, "%s[A0.x + %lu]", prefix, reg);
sprintf(tmpStr, "%s[A0.x + %u]", prefix, reg);
} else
sprintf(tmpStr, "%s[%lu]", prefix, reg);
sprintf(tmpStr, "%s[%u]", prefix, reg);
break;
}
case D3DSPR_CONSTINT:
if (pshader)
sprintf(tmpStr, "PI[%lu]", reg);
sprintf(tmpStr, "PI[%u]", reg);
else
sprintf(tmpStr, "VI[%lu]", reg);
sprintf(tmpStr, "VI[%u]", reg);
break;
case D3DSPR_CONSTBOOL:
if (pshader)
sprintf(tmpStr, "PB[%lu]", reg);
sprintf(tmpStr, "PB[%u]", reg);
else
sprintf(tmpStr, "VB[%lu]", reg);
sprintf(tmpStr, "VB[%u]", reg);
break;
case D3DSPR_TEXTURE: /* case D3DSPR_ADDR: */
if (pshader) {
sprintf(tmpStr, "T%lu", reg);
sprintf(tmpStr, "T%u", reg);
} else {
sprintf(tmpStr, "A%lu", reg);
sprintf(tmpStr, "A%u", reg);
}
break;
case D3DSPR_LOOP:
@ -675,16 +675,16 @@ static void shader_glsl_get_register_name(
break;
case D3DSPR_SAMPLER:
if (pshader)
sprintf(tmpStr, "Psampler%lu", reg);
sprintf(tmpStr, "Psampler%u", reg);
else
sprintf(tmpStr, "Vsampler%lu", reg);
sprintf(tmpStr, "Vsampler%u", reg);
break;
case D3DSPR_COLOROUT:
if (GL_SUPPORT(ARB_DRAW_BUFFERS)) {
sprintf(tmpStr, "gl_FragData[%lu]", reg);
sprintf(tmpStr, "gl_FragData[%u]", reg);
if (reg > 0) {
/* TODO: See GL_ARB_draw_buffers */
FIXME("Unsupported write to render target %lu\n", reg);
FIXME("Unsupported write to render target %u\n", reg);
}
} else { /* On older cards with GLSL support like the GeforceFX there's only one buffer. */
if (reg > 0)
@ -709,12 +709,12 @@ static void shader_glsl_get_register_name(
case D3DSPR_TEXCRDOUT:
/* Vertex shaders >= 3.0: D3DSPR_OUTPUT */
if (D3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 3)
sprintf(tmpStr, "OUT%lu", reg);
sprintf(tmpStr, "OUT%u", reg);
else
sprintf(tmpStr, "gl_TexCoord[%lu]", reg);
sprintf(tmpStr, "gl_TexCoord[%u]", reg);
break;
default:
FIXME("Unhandled register name Type(%ld)\n", regtype);
FIXME("Unhandled register name Type(%d)\n", regtype);
sprintf(tmpStr, "unrecognized_register");
break;
}
@ -850,7 +850,7 @@ static inline const char* shader_get_comp_op(
case COMPARISON_NE: return "!=";
case COMPARISON_LE: return "<=";
default:
FIXME("Unrecognized comparison value: %lu\n", op);
FIXME("Unrecognized comparison value: %u\n", op);
return "(\?\?)";
}
}
@ -1384,7 +1384,7 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
/* 1.0-1.4: Use destination register as coordinate source.
* 2.0+: Use provided coordinate source register. */
if (hex_version < D3DPS_VERSION(2,0)) {
sprintf(sampler_str, "Psampler%lu", reg_dest_code);
sprintf(sampler_str, "Psampler%u", reg_dest_code);
sampler_code = reg_dest_code;
}
else {
@ -1407,7 +1407,7 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
break;
default:
shader_addline(buffer, "%s = unrecognized_stype(%s, %s.stp);\n", dst_str, sampler_str, coord_reg);
FIXME("Unrecognized sampler type: %#lx;\n", sampler_type);
FIXME("Unrecognized sampler type: %#x;\n", sampler_type);
break;
}
} else {
@ -1424,7 +1424,7 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
break;
default:
shader_addline(buffer, "%s = unrecognized_stype(%s, %s.stp);\n", dst_str, sampler_str, coord_reg);
FIXME("Unrecognized sampler type: %#lx;\n", sampler_type);
FIXME("Unrecognized sampler type: %#x;\n", sampler_type);
break;
}
}
@ -1447,10 +1447,10 @@ void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) {
if (hex_version != D3DPS_VERSION(1,4)) {
DWORD reg = arg->dst & D3DSP_REGNUM_MASK;
shader_addline(buffer, "%s = clamp(gl_TexCoord[%lu], 0.0, 1.0);\n", tmpReg, reg);
shader_addline(buffer, "%s = clamp(gl_TexCoord[%u], 0.0, 1.0);\n", tmpReg, reg);
} else {
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
shader_addline(buffer, "%s = gl_TexCoord[%lu]%s;\n", tmpStr, reg2, tmpMask);
shader_addline(buffer, "%s = gl_TexCoord[%u]%s;\n", tmpStr, reg2, tmpMask);
}
}
@ -1467,8 +1467,8 @@ void pshader_glsl_texdp3tex(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->dst, 0, FALSE, dst_name, dst_mask, dst_str);
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(arg->buffer, "tmp0.x = dot(vec3(gl_TexCoord[%lu]), vec3(%s));\n", dstreg, src0_str);
shader_addline(arg->buffer, "%s = vec4(texture1D(Psampler%lu, tmp0.x))%s;\n", dst_str, dstreg, dst_mask);
shader_addline(arg->buffer, "tmp0.x = dot(vec3(gl_TexCoord[%u]), vec3(%s));\n", dstreg, src0_str);
shader_addline(arg->buffer, "%s = vec4(texture1D(Psampler%u, tmp0.x))%s;\n", dst_str, dstreg, dst_mask);
}
/** Process the D3DSIO_TEXDP3 instruction in GLSL:
@ -1483,7 +1483,7 @@ void pshader_glsl_texdp3(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->dst, 0, FALSE, dst_name, dst_mask, dst_str);
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(arg->buffer, "%s = vec4(dot(vec3(T%lu), vec3(%s)))%s;\n",
shader_addline(arg->buffer, "%s = vec4(dot(vec3(T%u), vec3(%s)))%s;\n",
dst_str, dstreg, src0_str, dst_mask);
}
@ -1515,7 +1515,7 @@ void pshader_glsl_texm3x2depth(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->dst, 0, FALSE, dst_name, dst_mask, dst_str);
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(arg->buffer, "tmp0.y = dot(vec3(T%lu), vec3(%s));\n", dstreg, src0_str);
shader_addline(arg->buffer, "tmp0.y = dot(vec3(T%u), vec3(%s));\n", dstreg, src0_str);
shader_addline(arg->buffer, "gl_FragDepth = vec4((tmp0.y == 0.0) ? 1.0 : tmp0.x / tmp0.y)%s;\n", dst_str, dst_name);
}
@ -1530,7 +1530,7 @@ void pshader_glsl_texm3x2pad(SHADER_OPCODE_ARG* arg) {
char src0_mask[6];
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(buffer, "tmp0.x = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(buffer, "tmp0.x = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
}
/** Process the D3DSIO_TEXM3X3PAD instruction in GLSL
@ -1546,7 +1546,7 @@ void pshader_glsl_texm3x3pad(SHADER_OPCODE_ARG* arg) {
char src0_mask[6];
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(buffer, "tmp0.%c = dot(vec3(T%lu), vec3(%s));\n", 'x' + current_state->current_row, reg, src0_str);
shader_addline(buffer, "tmp0.%c = dot(vec3(T%u), vec3(%s));\n", 'x' + current_state->current_row, reg, src0_str);
current_state->texcoord_w[current_state->current_row++] = reg;
}
@ -1561,8 +1561,8 @@ void pshader_glsl_texm3x2tex(SHADER_OPCODE_ARG* arg) {
char src0_mask[6];
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(buffer, "tmp0.y = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(buffer, "T%lu = texture2D(Psampler%lu, tmp0.st);\n", reg, reg);
shader_addline(buffer, "tmp0.y = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
shader_addline(buffer, "T%u = texture2D(Psampler%u, tmp0.st);\n", reg, reg);
}
/** Process the D3DSIO_TEXM3X3TEX instruction in GLSL
@ -1585,13 +1585,13 @@ void pshader_glsl_texm3x3tex(SHADER_OPCODE_ARG* arg) {
case WINED3DSTT_VOLUME: strcpy(dimensions, "3D"); break;
default:
strcpy(dimensions, "");
FIXME("Unrecognized sampler type: %#lx\n", stype);
FIXME("Unrecognized sampler type: %#x\n", stype);
break;
}
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(arg->buffer, "tmp0.z = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(arg->buffer, "T%lu = texture%s(Psampler%lu, tmp0.%s);\n",
shader_addline(arg->buffer, "tmp0.z = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
shader_addline(arg->buffer, "T%u = texture%s(Psampler%u, tmp0.%s);\n",
reg, dimensions, reg, (stype == WINED3DSTT_2D) ? "xy" : "xyz");
current_state->current_row = 0;
}
@ -1609,8 +1609,8 @@ void pshader_glsl_texm3x3(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
shader_addline(arg->buffer, "tmp0.z = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(arg->buffer, "T%lu = vec4(tmp0.x, tmp0.y, tmp0.z, 1.0);\n", reg);
shader_addline(arg->buffer, "tmp0.z = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
shader_addline(arg->buffer, "T%u = vec4(tmp0.x, tmp0.y, tmp0.z, 1.0);\n", reg);
current_state->current_row = 0;
}
@ -1633,7 +1633,7 @@ void pshader_glsl_texm3x3spec(SHADER_OPCODE_ARG* arg) {
case WINED3DSTT_VOLUME: strcpy(dimensions, "3D"); break;
default:
strcpy(dimensions, "");
FIXME("Unrecognized sampler type: %#lx\n", stype);
FIXME("Unrecognized sampler type: %#x\n", stype);
break;
}
@ -1641,13 +1641,13 @@ void pshader_glsl_texm3x3spec(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[1], arg->src_addr[1], TRUE, src1_name, src1_mask, src1_str);
/* Perform the last matrix multiply operation */
shader_addline(buffer, "tmp0.z = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(buffer, "tmp0.z = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
/* Calculate reflection vector */
shader_addline(buffer, "tmp0.xyz = reflect(-vec3(%s), vec3(tmp0));\n", src1_str);
/* Sample the texture */
shader_addline(buffer, "T%lu = texture%s(Psampler%lu, tmp0.%s);\n",
shader_addline(buffer, "T%u = texture%s(Psampler%u, tmp0.%s);\n",
reg, dimensions, reg, (stype == WINED3DSTT_2D) ? "xy" : "xyz");
current_state->current_row = 0;
}
@ -1665,12 +1665,12 @@ void pshader_glsl_texm3x3vspec(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_name, src0_mask, src0_str);
/* Perform the last matrix multiply operation */
shader_addline(buffer, "tmp0.z = dot(vec3(T%lu), vec3(%s));\n", reg, src0_str);
shader_addline(buffer, "tmp0.z = dot(vec3(T%u), vec3(%s));\n", reg, src0_str);
/* Construct the eye-ray vector from w coordinates */
shader_addline(buffer, "tmp1.x = gl_TexCoord[%lu].w;\n", current_state->texcoord_w[0]);
shader_addline(buffer, "tmp1.y = gl_TexCoord[%lu].w;\n", current_state->texcoord_w[1]);
shader_addline(buffer, "tmp1.z = gl_TexCoord[%lu].w;\n", reg);
shader_addline(buffer, "tmp1.x = gl_TexCoord[%u].w;\n", current_state->texcoord_w[0]);
shader_addline(buffer, "tmp1.y = gl_TexCoord[%u].w;\n", current_state->texcoord_w[1]);
shader_addline(buffer, "tmp1.z = gl_TexCoord[%u].w;\n", reg);
/* Calculate reflection vector (Assume normal is normalized): RF = 2*(N.E)*N -E */
shader_addline(buffer, "tmp0.x = dot(vec3(tmp0), vec3(tmp1));\n");
@ -1684,7 +1684,7 @@ void pshader_glsl_texm3x3vspec(SHADER_OPCODE_ARG* arg) {
* shader versions < 2.0, since that's the only time we can guarantee that we're sampling
* the correct type of texture because we can lookup what textures are bound at that point.
*/
shader_addline(buffer, "T%lu = textureCube(Psampler%lu, tmp0.xyz);\n", reg, reg);
shader_addline(buffer, "T%u = textureCube(Psampler%u, tmp0.xyz);\n", reg, reg);
current_state->current_row = 0;
}
@ -1697,7 +1697,7 @@ void pshader_glsl_texbem(SHADER_OPCODE_ARG* arg) {
DWORD reg2 = arg->src[0] & D3DSP_REGNUM_MASK;
FIXME("Not applying the BUMPMAPENV matrix for pixel shader instruction texbem.\n");
shader_addline(arg->buffer, "T%lu = texture2D(Psampler%lu, gl_TexCoord[%lu].xy + T%lu.xy);\n",
shader_addline(arg->buffer, "T%u = texture2D(Psampler%u, gl_TexCoord[%u].xy + T%u.xy);\n",
reg1, reg1, reg1, reg2);
}
@ -1715,7 +1715,7 @@ void pshader_glsl_texreg2ar(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_reg, src0_mask, src0_str);
shader_glsl_add_dst(arg->dst, dst_reg, dst_mask, tmpLine);
shader_addline(arg->buffer, "%stexture2D(Psampler%lu, %s.yz))%s;\n",
shader_addline(arg->buffer, "%stexture2D(Psampler%u, %s.yz))%s;\n",
tmpLine, src0_regnum, dst_reg, dst_mask);
}
@ -1733,7 +1733,7 @@ void pshader_glsl_texreg2gb(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_reg, src0_mask, src0_str);
shader_glsl_add_dst(arg->dst, dst_reg, dst_mask, tmpLine);
shader_addline(arg->buffer, "%stexture2D(Psampler%lu, %s.yz))%s;\n",
shader_addline(arg->buffer, "%stexture2D(Psampler%u, %s.yz))%s;\n",
tmpLine, src0_regnum, dst_reg, dst_mask);
}
@ -1754,7 +1754,7 @@ void pshader_glsl_texreg2rgb(SHADER_OPCODE_ARG* arg) {
case WINED3DSTT_VOLUME: strcpy(dimensions, "3D"); break;
default:
strcpy(dimensions, "");
FIXME("Unrecognized sampler type: %#lx\n", stype);
FIXME("Unrecognized sampler type: %#x\n", stype);
break;
}
@ -1762,7 +1762,7 @@ void pshader_glsl_texreg2rgb(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_param(arg, arg->src[0], arg->src_addr[0], TRUE, src0_reg, src0_mask, src0_str);
shader_glsl_add_dst(arg->dst, dst_reg, dst_mask, tmpLine);
shader_addline(arg->buffer, "%stexture%s(Psampler%lu, %s.%s))%s;\n",
shader_addline(arg->buffer, "%stexture%s(Psampler%u, %s.%s))%s;\n",
tmpLine, dimensions, src0_regnum, dst_reg, (stype == WINED3DSTT_2D) ? "xy" : "xyz", dst_mask);
}
@ -1817,28 +1817,28 @@ void pshader_glsl_input_pack(
case D3DDECLUSAGE_COLOR:
if (usage_idx == 0)
shader_addline(buffer, "IN%lu%s = vec4(gl_Color)%s;\n",
shader_addline(buffer, "IN%u%s = vec4(gl_Color)%s;\n",
i, reg_mask, reg_mask);
else if (usage_idx == 1)
shader_addline(buffer, "IN%lu%s = vec4(gl_SecondaryColor)%s;\n",
shader_addline(buffer, "IN%u%s = vec4(gl_SecondaryColor)%s;\n",
i, reg_mask, reg_mask);
else
shader_addline(buffer, "IN%lu%s = vec4(unsupported_color_input)%s;\n",
shader_addline(buffer, "IN%u%s = vec4(unsupported_color_input)%s;\n",
i, reg_mask, reg_mask);
break;
case D3DDECLUSAGE_TEXCOORD:
shader_addline(buffer, "IN%lu%s = vec4(gl_TexCoord[%lu])%s;\n",
shader_addline(buffer, "IN%u%s = vec4(gl_TexCoord[%u])%s;\n",
i, reg_mask, usage_idx, reg_mask );
break;
case D3DDECLUSAGE_FOG:
shader_addline(buffer, "IN%lu%s = vec4(gl_FogFragCoord)%s;\n",
shader_addline(buffer, "IN%u%s = vec4(gl_FogFragCoord)%s;\n",
i, reg_mask, reg_mask);
break;
default:
shader_addline(buffer, "IN%lu%s = vec4(unsupported_input)%s;\n",
shader_addline(buffer, "IN%u%s = vec4(unsupported_input)%s;\n",
i, reg_mask, reg_mask);
}
}
@ -1872,32 +1872,32 @@ void vshader_glsl_output_unpack(
case D3DDECLUSAGE_COLOR:
if (usage_idx == 0)
shader_addline(buffer, "gl_FrontColor%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "gl_FrontColor%s = OUT%u%s;\n", reg_mask, i, reg_mask);
else if (usage_idx == 1)
shader_addline(buffer, "gl_FrontSecondaryColor%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "gl_FrontSecondaryColor%s = OUT%u%s;\n", reg_mask, i, reg_mask);
else
shader_addline(buffer, "unsupported_color_output%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "unsupported_color_output%s = OUT%u%s;\n", reg_mask, i, reg_mask);
break;
case D3DDECLUSAGE_POSITION:
shader_addline(buffer, "gl_Position%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "gl_Position%s = OUT%u%s;\n", reg_mask, i, reg_mask);
break;
case D3DDECLUSAGE_TEXCOORD:
shader_addline(buffer, "gl_TexCoord[%lu]%s = OUT%lu%s;\n",
shader_addline(buffer, "gl_TexCoord[%u]%s = OUT%u%s;\n",
usage_idx, reg_mask, i, reg_mask);
break;
case WINED3DSHADERDECLUSAGE_PSIZE:
shader_addline(buffer, "gl_PointSize = OUT%lu.x;\n", i);
shader_addline(buffer, "gl_PointSize = OUT%u.x;\n", i);
break;
case WINED3DSHADERDECLUSAGE_FOG:
shader_addline(buffer, "gl_FogFragCoord%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "gl_FogFragCoord%s = OUT%u%s;\n", reg_mask, i, reg_mask);
break;
default:
shader_addline(buffer, "unsupported_output%s = OUT%lu%s;\n", reg_mask, i, reg_mask);
shader_addline(buffer, "unsupported_output%s = OUT%u%s;\n", reg_mask, i, reg_mask);
}
}
}

View File

@ -49,14 +49,14 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer
static ULONG WINAPI IWineD3DIndexBufferImpl_AddRef(IWineD3DIndexBuffer *iface) {
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&This->resource.ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, ref - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
return ref;
}
static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface) {
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
if (ref == 0) {
IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
HeapFree(GetProcessHeap(), 0, This);
@ -108,7 +108,7 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_GetParent(IWineD3DIndexBuffer *ifa
****************************************************** */
static HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags) {
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
TRACE("(%p) : no real locking yet, offset %d, size %d, Flags=%lx\n", This, OffsetToLock, SizeToLock, Flags);
TRACE("(%p) : no real locking yet, offset %d, size %d, Flags=%x\n", This, OffsetToLock, SizeToLock, Flags);
*ppbData = (BYTE *)This->resource.allocatedMemory + OffsetToLock;
return WINED3D_OK;
}

View File

@ -51,7 +51,7 @@ static ULONG WINAPI IWineD3DPaletteImpl_AddRef(IWineD3DPalette *iface) {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
return ref;
}
@ -60,7 +60,7 @@ static ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
@ -84,7 +84,7 @@ DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) {
static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DWORD Flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
TRACE("(%p)->(%08lx,%ld,%ld,%p)\n",This,Flags,Start,Count,PalEnt);
TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt);
if (Flags != 0) return WINED3DERR_INVALIDCALL; /* unchecked */
if (Start + Count > IWineD3DPaletteImpl_Size(This->Flags))
@ -109,7 +109,7 @@ static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, DW
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
ResourceList *res;
TRACE("(%p)->(%08lx,%ld,%ld,%p)\n",This,Flags,Start,Count,PalEnt);
TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt);
if (This->Flags & DDPCAPS_8BITENTRIES) {
unsigned int i;

View File

@ -63,14 +63,14 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShade
static ULONG WINAPI IWineD3DPixelShaderImpl_AddRef(IWineD3DPixelShader *iface) {
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI IWineD3DPixelShaderImpl_Release(IWineD3DPixelShader *iface) {
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
if (This->baseShader.shader_mode == SHADER_GLSL && This->baseShader.prgId != 0) {
@ -803,7 +803,7 @@ static void pshader_set_limits(
This->baseShader.limits.sampler = 16;
This->baseShader.limits.packed_input = 0;
This->baseShader.limits.label = 0;
FIXME("Unrecognized pixel shader version %#lx\n",
FIXME("Unrecognized pixel shader version %#x\n",
This->baseShader.hex_version);
}
}

View File

@ -55,14 +55,14 @@ static HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, RE
static ULONG WINAPI IWineD3DQueryImpl_AddRef(IWineD3DQuery *iface) {
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
HeapFree(GetProcessHeap(), 0, This->extendedData);
@ -96,7 +96,7 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
HRESULT res = S_OK;
TRACE("(%p) : type %#x, pData %p, dwSize %#lx, dwGetDataFlags %#lx\n", This, This->type, pData, dwSize, dwGetDataFlags);
TRACE("(%p) : type %#x, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, This->type, pData, dwSize, dwGetDataFlags);
if(dwSize == 0){
/*you can use this method to poll the resource for the query status*/
@ -334,7 +334,7 @@ static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){
static HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags){
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
TRACE("(%p) : dwIssueFlags %#lx, type %#x\n", This, dwIssueFlags, This->type);
TRACE("(%p) : dwIssueFlags %#x, type %#x\n", This, dwIssueFlags, This->type);
switch (This->type) {
case WINED3DQUERYTYPE_OCCLUSION:

View File

@ -46,14 +46,14 @@ HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFI
ULONG WINAPI IWineD3DResourceImpl_AddRef(IWineD3DResource *iface) {
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
ULONG ref = InterlockedIncrement(&This->resource.ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, ref - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
return ref;
}
ULONG WINAPI IWineD3DResourceImpl_Release(IWineD3DResource *iface) {
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
if (ref == 0) {
IWineD3DResourceImpl_CleanUp(iface);
HeapFree(GetProcessHeap(), 0, This);
@ -103,7 +103,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
PrivateData **data;
TRACE("(%p) : %p %p %ld %ld\n", This, refguid, pData, SizeOfData, Flags);
TRACE("(%p) : %p %p %d %d\n", This, refguid, pData, SizeOfData, Flags);
data = IWineD3DResourceImpl_FindPrivateData(This, refguid);
if (*data == NULL)
{

View File

@ -217,7 +217,7 @@ static ULONG WINAPI IWineD3DStateBlockImpl_AddRef(IWineD3DStateBlock *iface) {
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, refCount - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1);
return refCount;
}
@ -225,7 +225,7 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p) : Releasing from %ld\n", This, refCount + 1);
TRACE("(%p) : Releasing from %d\n", This, refCount + 1);
if (!refCount) {
constant_entry *constant, *constant2;
@ -412,7 +412,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* If the light exists, copy its parameters, otherwise copy the default parameters */
const WINED3DLIGHT* params = realLight? &realLight->OriginalParms: &WINED3D_default_light;
TRACE("Updating lights for light %ld\n", src->OriginalIndex);
TRACE("Updating lights for light %d\n", src->OriginalIndex);
memcpy(&src->OriginalParms, params, sizeof(*params));
}
@ -420,7 +420,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if (src->enabledChanged) {
/* If the light exists, check if it's enabled, otherwise default is disabled state */
TRACE("Updating lightEnabled for light %ld\n", src->OriginalIndex);
TRACE("Updating lightEnabled for light %d\n", src->OriginalIndex);
src->lightEnabled = realLight? realLight->lightEnabled: FALSE;
}
@ -567,7 +567,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
for (i = 1; i <= WINEHIGHEST_RENDER_STATE; i++) {
if (This->set.renderState[i] && (This->renderState[i] != targetStateBlock->renderState[i])) {
TRACE("Updating renderState %d to %ld\n", i, targetStateBlock->renderState[i]);
TRACE("Updating renderState %d to %d\n", i, targetStateBlock->renderState[i]);
This->renderState[i] = targetStateBlock->renderState[i];
}
}
@ -577,7 +577,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
/* TODO: move over to using memcpy */
for (i = 1; i <= WINED3D_HIGHEST_TEXTURE_STATE ; i++) {
if (This->set.textureState[j][i]) {
TRACE("Updating texturestagestate %d,%d to %ld (was %ld)\n", j,i, targetStateBlock->textureState[j][i],
TRACE("Updating texturestagestate %d,%d to %d (was %d)\n", j,i, targetStateBlock->textureState[j][i],
This->textureState[j][i]);
This->textureState[j][i] = targetStateBlock->textureState[j][i];
}
@ -593,7 +593,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
}
for (i = 1; i <= WINED3D_HIGHEST_SAMPLER_STATE ; i++){ /* States are 1 based */
if (This->set.samplerState[j][i]) {
TRACE("Updating sampler state %d,%d to %ld (was %ld)\n",
TRACE("Updating sampler state %d,%d to %d (was %d)\n",
j, i, targetStateBlock->samplerState[j][i],
This->samplerState[j][i]);
This->samplerState[j][i] = targetStateBlock->samplerState[j][i];

View File

@ -206,14 +206,14 @@ HRESULT WINAPI IWineD3DSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID
ULONG WINAPI IWineD3DSurfaceImpl_AddRef(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
ULONG ref = InterlockedIncrement(&This->resource.ref);
TRACE("(%p) : AddRef increasing from %ld\n", This,ref - 1);
TRACE("(%p) : AddRef increasing from %d\n", This,ref - 1);
return ref;
}
ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
if (ref == 0) {
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->resource.wineD3DDevice;
TRACE("(%p) : cleaning up\n", This);
@ -579,13 +579,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
}
}
if (backbuf) {
TRACE("(%p, backBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
TRACE("(%p, backBuffer) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
} else if (swapchain != NULL && iface == swapchain->frontBuffer) {
TRACE("(%p, frontBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
TRACE("(%p, frontBuffer) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
} else if (iface == myDevice->renderTarget) {
TRACE("(%p, renderTarget) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
TRACE("(%p, renderTarget) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
} else if (iface == myDevice->depthStencilBuffer) {
TRACE("(%p, stencilBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
TRACE("(%p, stencilBuffer) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
}
if (NULL != swapchain) {
@ -594,7 +594,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
swapchain = NULL;
}
} else {
TRACE("(%p) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
TRACE("(%p) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
}
pLockedRect->Pitch = IWineD3DSurface_GetPitch(iface);
@ -605,9 +605,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
This->lockedRect.top = 0;
This->lockedRect.right = This->currentDesc.Width;
This->lockedRect.bottom = This->currentDesc.Height;
TRACE("Locked Rect (%p) = l %ld, t %ld, r %ld, b %ld\n", &This->lockedRect, This->lockedRect.left, This->lockedRect.top, This->lockedRect.right, This->lockedRect.bottom);
TRACE("Locked Rect (%p) = l %d, t %d, r %d, b %d\n", &This->lockedRect, This->lockedRect.left, This->lockedRect.top, This->lockedRect.right, This->lockedRect.bottom);
} else {
TRACE("Lock Rect (%p) = l %ld, t %ld, r %ld, b %ld\n", pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n", pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
if ((pRect->top < 0) ||
(pRect->left < 0) ||
@ -1387,7 +1387,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
return HRESULT_FROM_WIN32(GetLastError());
}
TRACE("Creating a DIB section with size %ldx%ldx%d, size=%ld\n", b_info->bmiHeader.biWidth, b_info->bmiHeader.biHeight, b_info->bmiHeader.biBitCount, b_info->bmiHeader.biSizeImage);
TRACE("Creating a DIB section with size %dx%dx%d, size=%d\n", b_info->bmiHeader.biWidth, b_info->bmiHeader.biHeight, b_info->bmiHeader.biBitCount, b_info->bmiHeader.biSizeImage);
This->dib.DIBsection = CreateDIBSection(ddc, b_info, usage, &This->dib.bitmap_data, 0 /* Handle */, 0 /* Offset */);
DeleteDC(ddc);
@ -1431,7 +1431,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
NULL,
0);
if(FAILED(hr)) {
ERR("IWineD3DSurface_LockRect failed with hr = %08lx\n", hr);
ERR("IWineD3DSurface_LockRect failed with hr = %08x\n", hr);
/* keep the dib section */
return hr;
}
@ -2103,7 +2103,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface) {
This->dirtyRect.top = This->currentDesc.Height;
This->dirtyRect.right = 0;
This->dirtyRect.bottom = 0;
TRACE("(%p) : Dirty?%d, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Flags & SFLAG_DIRTY ? 1 : 0, This->dirtyRect.left,
TRACE("(%p) : Dirty?%d, Rect:(%d,%d,%d,%d)\n", This, This->Flags & SFLAG_DIRTY ? 1 : 0, This->dirtyRect.left,
This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
return WINED3D_OK;
}
@ -2126,7 +2126,7 @@ extern HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, C
This->dirtyRect.right = This->currentDesc.Width;
This->dirtyRect.bottom = This->currentDesc.Height;
}
TRACE("(%p) : Dirty?%ld, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Flags & SFLAG_DIRTY, This->dirtyRect.left,
TRACE("(%p) : Dirty?%d, Rect:(%d,%d,%d,%d)\n", This, This->Flags & SFLAG_DIRTY, This->dirtyRect.left,
This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
/* if the container is a basetexture then mark it dirty. */
if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
@ -2262,7 +2262,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL
static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD Flags) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DDevice *D3D = (IWineD3DDevice *) This->resource.wineD3DDevice;
TRACE("(%p)->(%p,%lx)\n", This, override, Flags);
TRACE("(%p)->(%p,%x)\n", This, override, Flags);
/* Flipping is only supported on RenderTargets */
if( !(This->resource.usage & WINED3DUSAGE_RENDERTARGET) ) return DDERR_NOTFLIPPABLE;
@ -2287,7 +2287,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
IWineD3DSurfaceImpl *Src = (IWineD3DSurfaceImpl *) SrcSurface;
BOOL SrcOK = TRUE;
TRACE("(%p)->(%p,%p,%p,%08lx,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
TRACE("(%p)->(%p,%p,%p,%08x,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
/* Get the swapchain. One of the surfaces has to be a primary surface */
IWineD3DSurface_GetContainer( (IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain);
@ -2399,7 +2399,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
if(!CalculateTexRect(Src, &SourceRectangle, glTexCoord)) {
/* Fall back to software */
WARN("(%p) Source texture area (%ld,%ld)-(%ld,%ld) is too big\n", Src,
WARN("(%p) Source texture area (%d,%d)-(%d,%d) is too big\n", Src,
SourceRectangle.left, SourceRectangle.top,
SourceRectangle.right, SourceRectangle.bottom);
return WINED3DERR_INVALIDCALL;
@ -2748,7 +2748,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
return WINED3DERR_INVALIDCALL;
}
TRACE("(%p) executing Render Target override, color = %lx\n", This, color);
TRACE("(%p) executing Render Target override, color = %x\n", This, color);
IWineD3DDevice_Clear( (IWineD3DDevice *) myDevice,
1 /* Number of rectangles */,
@ -2774,7 +2774,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, DDBLTFX *DDBltFx) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DSurfaceImpl *Src = (IWineD3DSurfaceImpl *) SrcSurface;
TRACE("(%p)->(%p,%p,%p,%lx,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
TRACE("(%p)->(%p,%p,%p,%x,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
TRACE("(%p): Usage is %s\n", This, debug_d3dusage(This->resource.usage));
/* Special cases for RenderTargets */
@ -2792,7 +2792,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, RECT *Dest
HRESULT WINAPI IWineD3DSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
TRACE("(%p)->(%lx)\n", This, Flags);
TRACE("(%p)->(%x)\n", This, Flags);
switch (Flags)
{
@ -2808,7 +2808,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Fl
HRESULT WINAPI IWineD3DSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) {
/* XXX: DDERR_INVALIDSURFACETYPE */
TRACE("(%p)->(%08lx)\n",iface,Flags);
TRACE("(%p)->(%08x)\n",iface,Flags);
switch (Flags) {
case DDGFS_CANFLIP:
case DDGFS_ISFLIPDONE:
@ -2838,7 +2838,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_Restore(IWineD3DSurface *iface) {
HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, IWineD3DSurface *Source, RECT *rsrc, DWORD trans) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
IWineD3DSurfaceImpl *srcImpl = (IWineD3DSurfaceImpl *) Source;
TRACE("(%p)->(%ld, %ld, %p, %p, %08lx\n", iface, dstx, dsty, Source, rsrc, trans);
TRACE("(%p)->(%d, %d, %p, %p, %08x\n", iface, dstx, dsty, Source, rsrc, trans);
/* Special cases for RenderTargets */
if( (This->resource.usage & WINED3DUSAGE_RENDERTARGET) ||
@ -2958,10 +2958,10 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPa
HRESULT WINAPI IWineD3DSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Flags, DDCOLORKEY *CKey) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)->(%08lx,%p)\n", This, Flags, CKey);
TRACE("(%p)->(%08x,%p)\n", This, Flags, CKey);
if ((Flags & DDCKEY_COLORSPACE) != 0) {
FIXME(" colorkey value not supported (%08lx) !\n", Flags);
FIXME(" colorkey value not supported (%08x) !\n", Flags);
return DDERR_INVALIDPARAMS;
}
@ -3067,7 +3067,7 @@ DWORD WINAPI IWineD3DSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
/* Surfaces are 32 bit aligned */
ret = (ret + 3) & ~3;
}
TRACE("(%p) Returning %ld\n", This, ret);
TRACE("(%p) Returning %d\n", This, ret);
return ret;
}

View File

@ -65,7 +65,7 @@ x11_copy_to_screen(IWineD3DSurfaceImpl *This,
hDisplayDC = GetDCEx(hDisplayWnd, 0, DCX_CLIPSIBLINGS|DCX_CACHE);
if(rc)
{
TRACE(" copying rect (%ld,%ld)->(%ld,%ld), offset (%ld,%ld)\n",
TRACE(" copying rect (%d,%d)->(%d,%d), offset (%d,%d)\n",
rc->left, rc->top, rc->right, rc->bottom, offset.x, offset.y);
}
#if 0
@ -175,7 +175,7 @@ IWineGDISurfaceImpl_LockRect(IWineD3DSurface *iface,
TRACE("Warning: trying to lock unlockable surf@%p\n", This);
}
TRACE("(%p) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n",
TRACE("(%p) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n",
This, pRect, Flags, pLockedRect, This->resource.allocatedMemory);
if(!This->resource.allocatedMemory) {
@ -200,13 +200,13 @@ IWineGDISurfaceImpl_LockRect(IWineD3DSurface *iface,
This->lockedRect.right = This->currentDesc.Width;
This->lockedRect.bottom = This->currentDesc.Height;
TRACE("Locked Rect (%p) = l %ld, t %ld, r %ld, b %ld\n",
TRACE("Locked Rect (%p) = l %d, t %d, r %d, b %d\n",
&This->lockedRect, This->lockedRect.left, This->lockedRect.top,
This->lockedRect.right, This->lockedRect.bottom);
}
else
{
TRACE("Lock Rect (%p) = l %ld, t %ld, r %ld, b %ld\n",
TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n",
pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
if ((pRect->top < 0) ||
@ -322,7 +322,7 @@ IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface,
{
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
IWineD3DSurfaceImpl *Target = (IWineD3DSurfaceImpl *) override;
TRACE("(%p)->(%p,%lx)\n", This, override, Flags);
TRACE("(%p)->(%p,%x)\n", This, override, Flags);
TRACE("(%p) Flipping to surface %p\n", This, Target);
@ -503,13 +503,13 @@ IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface,
int x, y;
const PixelFormatDesc *sEntry, *dEntry;
LPBYTE dbuf, sbuf;
TRACE("(%p)->(%p,%p,%p,%lx,%p)\n", This, DestRect, Src, SrcRect, Flags, DDBltFx);
TRACE("(%p)->(%p,%p,%p,%x,%p)\n", This, DestRect, Src, SrcRect, Flags, DDBltFx);
if (TRACE_ON(d3d_surface))
{
if (DestRect) TRACE("\tdestrect :%ldx%ld-%ldx%ld\n",
if (DestRect) TRACE("\tdestrect :%dx%d-%dx%d\n",
DestRect->left, DestRect->top, DestRect->right, DestRect->bottom);
if (SrcRect) TRACE("\tsrcrect :%ldx%ld-%ldx%ld\n",
if (SrcRect) TRACE("\tsrcrect :%dx%d-%dx%d\n",
SrcRect->left, SrcRect->top, SrcRect->right, SrcRect->bottom);
#if 0
TRACE("\tflags: ");
@ -778,14 +778,14 @@ IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface,
case SRCCOPY: /* well, we do that below ? */
break;
default:
FIXME("Unsupported raster op: %08lx Pattern: %p\n", DDBltFx->dwROP, DDBltFx->u5.lpDDSPattern);
FIXME("Unsupported raster op: %08x Pattern: %p\n", DDBltFx->dwROP, DDBltFx->u5.lpDDSPattern);
goto error;
}
Flags &= ~DDBLT_ROP;
}
if (Flags & DDBLT_DDROPS)
{
FIXME("\tDdraw Raster Ops: %08lx Pattern: %p\n", DDBltFx->dwDDROP, DDBltFx->u5.lpDDSPattern);
FIXME("\tDdraw Raster Ops: %08x Pattern: %p\n", DDBltFx->dwDDROP, DDBltFx->u5.lpDDSPattern);
}
/* Now the 'with source' blits */
if (Src)
@ -1085,7 +1085,7 @@ IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface,
error:
if (Flags && FIXME_ON(d3d_surface))
{
FIXME("\tUnsupported flags: %08lx\n", Flags);
FIXME("\tUnsupported flags: %08x\n", Flags);
}
release:
@ -1133,11 +1133,11 @@ IWineGDISurfaceImpl_BltFast(IWineD3DSurface *iface,
if (TRACE_ON(d3d_surface))
{
TRACE("(%p)->(%ld,%ld,%p,%p,%08lx)\n", This,dstx,dsty,Src,rsrc,trans);
TRACE("(%p)->(%d,%d,%p,%p,%08x)\n", This,dstx,dsty,Src,rsrc,trans);
if (rsrc)
{
TRACE("\tsrcrect: %ldx%ld-%ldx%ld\n",rsrc->left,rsrc->top,
TRACE("\tsrcrect: %dx%d-%dx%d\n",rsrc->left,rsrc->top,
rsrc->right,rsrc->bottom);
}
else
@ -1533,13 +1533,13 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
hr = IWineD3DSurface_GetDC(iface, &hdc);
if(FAILED(hr))
{
ERR("(%p) IWineD3DSurface::GetDC failed with hr %08lx\n", This, hr);
ERR("(%p) IWineD3DSurface::GetDC failed with hr %08x\n", This, hr);
return hr;
}
hr = IWineD3DSurface_ReleaseDC(iface, hdc);
if(FAILED(hr))
{
ERR("(%p) IWineD3DSurface::ReleaseDC failed with hr %08lx\n", This, hr);
ERR("(%p) IWineD3DSurface::ReleaseDC failed with hr %08x\n", This, hr);
return hr;
}

View File

@ -58,7 +58,7 @@ WINE_DECLARE_DEBUG_CHANNEL(fps);
static ULONG WINAPI IWineD3DSwapChainImpl_AddRef(IWineD3DSwapChain *iface) {
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
DWORD refCount = InterlockedIncrement(&This->ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, refCount - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1);
return refCount;
}
@ -86,7 +86,7 @@ static ULONG WINAPI IWineD3DSwapChainImpl_Release(IWineD3DSwapChain *iface) {
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
DWORD refCount;
refCount = InterlockedDecrement(&This->ref);
TRACE("(%p) : ReleaseRef to %ld\n", This, refCount);
TRACE("(%p) : ReleaseRef to %d\n", This, refCount);
if (refCount == 0) {
IUnknown* bufferParent;
@ -554,7 +554,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *ifac
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
HDC hDC;
TRACE("(%p) : pRamp@%p flags(%ld)\n", This, pRamp, Flags);
TRACE("(%p) : pRamp@%p flags(%d)\n", This, pRamp, Flags);
hDC = GetDC(This->win_handle);
SetDeviceGammaRamp(hDC, (LPVOID)pRamp);
ReleaseDC(This->win_handle, hDC);

View File

@ -48,14 +48,14 @@ static HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface,
static ULONG WINAPI IWineD3DTextureImpl_AddRef(IWineD3DTexture *iface) {
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
return InterlockedIncrement(&This->resource.ref);
}
static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) {
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
ref = InterlockedDecrement(&This->resource.ref);
if (ref == 0) {
int i;

View File

@ -246,7 +246,7 @@ const char* debug_d3dusage(DWORD usage) {
#undef WINED3DUSAGE_TO_STR
case 0: return "none";
default:
FIXME("Unrecognized %lu Usage!\n", usage);
FIXME("Unrecognized %u Usage!\n", usage);
return "unrecognized";
}
}
@ -264,7 +264,7 @@ const char* debug_d3dusagequery(DWORD usagequery) {
#undef WINED3DUSAGEQUERY_TO_STR
case 0: return "none";
default:
FIXME("Unrecognized %lu Usage Query!\n", usagequery);
FIXME("Unrecognized %u Usage Query!\n", usagequery);
return "unrecognized";
}
}
@ -511,7 +511,7 @@ const char* debug_d3drenderstate(DWORD state) {
D3DSTATE_TO_STR(WINED3DRS_BLENDOPALPHA );
#undef D3DSTATE_TO_STR
default:
FIXME("Unrecognized %lu render state!\n", state);
FIXME("Unrecognized %u render state!\n", state);
return "unrecognized";
}
}
@ -534,7 +534,7 @@ const char* debug_d3dsamplerstate(DWORD state) {
D3DSTATE_TO_STR(WINED3DSAMP_DMAPOFFSET );
#undef D3DSTATE_TO_STR
default:
FIXME("Unrecognized %lu sampler state!\n", state);
FIXME("Unrecognized %u sampler state!\n", state);
return "unrecognized";
}
}
@ -567,7 +567,7 @@ const char* debug_d3dtexturestate(DWORD state) {
return "unused";
break;
default:
FIXME("Unrecognized %lu texture state!\n", state);
FIXME("Unrecognized %u texture state!\n", state);
return "unrecognized";
}
}
@ -660,7 +660,7 @@ GLenum StencilOp(DWORD op) {
case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
default:
FIXME("Unrecognized stencil op %ld\n", op);
FIXME("Unrecognized stencil op %d\n", op);
return GL_KEEP;
}
}
@ -676,7 +676,7 @@ GLenum CompareFunc(DWORD func) {
case D3DCMP_GREATEREQUAL : return GL_GEQUAL;
case D3DCMP_ALWAYS : return GL_ALWAYS;
default:
FIXME("Unrecognized D3DCMPFUNC value %ld\n", func);
FIXME("Unrecognized D3DCMPFUNC value %d\n", func);
return 0;
}
}
@ -711,7 +711,7 @@ static GLenum d3dta_to_combiner_input(DWORD d3dta, DWORD stage, INT texture_idx)
return GL_CONSTANT_COLOR1_NV;
default:
FIXME("Unrecognized texture arg %#lx\n", d3dta);
FIXME("Unrecognized texture arg %#x\n", d3dta);
return GL_TEXTURE;
}
}
@ -761,7 +761,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
GLenum portion = is_alpha ? GL_ALPHA : GL_RGB;
GLenum target = GL_COMBINER0_NV + stage;
TRACE("stage %d, is_alpha %d, op %s, arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d\n",
TRACE("stage %d, is_alpha %d, op %s, arg1 %#x, arg2 %#x, arg3 %#x, texture_idx %d\n",
stage, is_alpha, debug_d3dtop(op), arg1, arg2, arg3, texture_idx);
/* If a texture stage references an invalid texture unit the stage just
@ -1044,7 +1044,7 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, D3DTEXTURE
break;
default:
FIXME("Unhandled D3DTOP: stage %d, is_alpha %d, op %s (%#x), arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d\n",
FIXME("Unhandled D3DTOP: stage %d, is_alpha %d, op %s (%#x), arg1 %#x, arg2 %#x, arg3 %#x, texture_idx %d\n",
stage, is_alpha, debug_d3dtop(op), op, arg1, arg2, arg3, texture_idx);
}
@ -1085,7 +1085,7 @@ static void get_src_and_opr(DWORD arg, BOOL is_alpha, GLenum* source, GLenum* op
*source = GL_TEXTURE;
break;
default:
FIXME("Unrecognized texture arg %#lx\n", arg);
FIXME("Unrecognized texture arg %#x\n", arg);
*source = GL_TEXTURE;
break;
}
@ -1126,7 +1126,7 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, D3DTEXTUREOP op,
BOOL Handled = FALSE;
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
TRACE("Alpha?(%d), Stage:%d Op(%s), a1(%ld), a2(%ld), a3(%ld)\n", isAlpha, Stage, debug_d3dtop(op), arg1, arg2, arg3);
TRACE("Alpha?(%d), Stage:%d Op(%s), a1(%d), a2(%d), a3(%d)\n", isAlpha, Stage, debug_d3dtop(op), arg1, arg2, arg3);
ENTER_GL();
@ -2523,7 +2523,7 @@ BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]
int y1 = Rect->top, y2 = Rect->bottom;
GLint maxSize = GL_LIMITS(texture_size);
TRACE("(%p)->(%ld,%ld)-(%ld,%ld)\n", This,
TRACE("(%p)->(%d,%d)-(%d,%d)\n", This,
Rect->left, Rect->top, Rect->right, Rect->bottom);
/* The sizes might be reversed */
@ -2608,7 +2608,7 @@ BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]
This->glRect.top = 0;
This->glRect.bottom = This->pow2Height;
}
TRACE("(%p): Using rect (%ld,%ld)-(%ld,%ld)\n", This,
TRACE("(%p): Using rect (%d,%d)-(%d,%d)\n", This,
This->glRect.left, This->glRect.top, This->glRect.right, This->glRect.bottom);
}

View File

@ -51,14 +51,14 @@ static HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuff
static ULONG WINAPI IWineD3DVertexBufferImpl_AddRef(IWineD3DVertexBuffer *iface) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
ULONG ref = InterlockedIncrement(&This->resource.ref);
TRACE("(%p) : AddRef increasing from %ld\n", This, ref - 1);
TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
return ref;
}
static ULONG WINAPI IWineD3DVertexBufferImpl_Release(IWineD3DVertexBuffer *iface) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %ld\n", This, ref + 1);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
if (ref == 0) {
if(This->vbo) {
@ -423,7 +423,7 @@ static HRESULT WINAPI IWineD3DVertexBufferImpl_GetParent(IWineD3DVertexBuffer *i
static HRESULT WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
BYTE *data;
TRACE("(%p)->%d, %d, %p, %08lx\n", This, OffsetToLock, SizeToLock, ppbData, Flags);
TRACE("(%p)->%d, %d, %p, %08x\n", This, OffsetToLock, SizeToLock, ppbData, Flags);
InterlockedIncrement(&This->lockcount);

View File

@ -186,34 +186,34 @@ static DWORD IWineD3DVertexDeclarationImpl_ParseToken8(const DWORD* pToken) {
switch ((token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT) { /* maybe a macro to inverse ... */
case D3DVSD_TOKEN_NOP:
TRACE(" 0x%08lx NOP()\n", token);
TRACE(" 0x%08x NOP()\n", token);
break;
case D3DVSD_TOKEN_STREAM:
if (token & D3DVSD_STREAMTESSMASK) {
TRACE(" 0x%08lx STREAM_TESS()\n", token);
TRACE(" 0x%08x STREAM_TESS()\n", token);
} else {
TRACE(" 0x%08lx STREAM(%lu)\n", token, ((token & D3DVSD_STREAMNUMBERMASK) >> D3DVSD_STREAMNUMBERSHIFT));
TRACE(" 0x%08x STREAM(%u)\n", token, ((token & D3DVSD_STREAMNUMBERMASK) >> D3DVSD_STREAMNUMBERSHIFT));
}
break;
case D3DVSD_TOKEN_STREAMDATA:
if (token & 0x10000000) {
TRACE(" 0x%08lx SKIP(%lu)\n", token, ((token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
TRACE(" 0x%08x SKIP(%u)\n", token, ((token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
} else {
DWORD type = ((token & D3DVSD_DATATYPEMASK) >> D3DVSD_DATATYPESHIFT);
DWORD reg = ((token & D3DVSD_VERTEXREGMASK) >> D3DVSD_VERTEXREGSHIFT);
TRACE(" 0x%08lx REG(%s, %s)\n", token, VertexDecl8_Registers[reg], VertexDecl8_DataTypes[type]);
TRACE(" 0x%08x REG(%s, %s)\n", token, VertexDecl8_Registers[reg], VertexDecl8_DataTypes[type]);
}
break;
case D3DVSD_TOKEN_TESSELLATOR:
if (token & 0x10000000) {
DWORD type = ((token & D3DVSD_DATATYPEMASK) >> D3DVSD_DATATYPESHIFT);
DWORD reg = ((token & D3DVSD_VERTEXREGMASK) >> D3DVSD_VERTEXREGSHIFT);
TRACE(" 0x%08lx TESSUV(%s) as %s\n", token, VertexDecl8_Registers[reg], VertexDecl8_DataTypes[type]);
TRACE(" 0x%08x TESSUV(%s) as %s\n", token, VertexDecl8_Registers[reg], VertexDecl8_DataTypes[type]);
} else {
DWORD type = ((token & D3DVSD_DATATYPEMASK) >> D3DVSD_DATATYPESHIFT);
DWORD regout = ((token & D3DVSD_VERTEXREGMASK) >> D3DVSD_VERTEXREGSHIFT);
DWORD regin = ((token & D3DVSD_VERTEXREGINMASK) >> D3DVSD_VERTEXREGINSHIFT);
TRACE(" 0x%08lx TESSNORMAL(%s, %s) as %s\n", token, VertexDecl8_Registers[regin], VertexDecl8_Registers[regout], VertexDecl8_DataTypes[type]);
TRACE(" 0x%08x TESSNORMAL(%s, %s) as %s\n", token, VertexDecl8_Registers[regin], VertexDecl8_Registers[regout], VertexDecl8_DataTypes[type]);
}
break;
case D3DVSD_TOKEN_CONSTMEM:
@ -226,16 +226,16 @@ static DWORD IWineD3DVertexDeclarationImpl_ParseToken8(const DWORD* pToken) {
{
DWORD count = ((token & D3DVSD_CONSTCOUNTMASK) >> D3DVSD_CONSTCOUNTSHIFT);
DWORD extinfo = ((token & D3DVSD_EXTINFOMASK) >> D3DVSD_EXTINFOSHIFT);
TRACE(" 0x%08lx EXT(%lu, %lu)\n", token, count, extinfo);
TRACE(" 0x%08x EXT(%u, %u)\n", token, count, extinfo);
/* todo ... print extension */
tokenlen = count + 1;
}
break;
case D3DVSD_TOKEN_END:
TRACE(" 0x%08lx END()\n", token);
TRACE(" 0x%08x END()\n", token);
break;
default:
TRACE(" 0x%08lx UNKNOWN\n", token);
TRACE(" 0x%08x UNKNOWN\n", token);
/* argg error */
}
return tokenlen;
@ -308,12 +308,12 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
convToW[nTokens].Type = type;
convToW[nTokens].Offset = offset;
convToW[nTokens].Reg = reg;
TRACE("Adding element %ld:\n", nTokens);
TRACE("Adding element %d:\n", nTokens);
dump_wined3dvertexelement(&convToW[nTokens]);
offset += glTypeLookup[type].size * glTypeLookup[type].typesize;
++nTokens;
} else if (D3DVSD_TOKEN_STREAMDATA == tokentype && 0x10000000 & tokentype ) {
TRACE(" 0x%08lx SKIP(%lu)\n", tokentype, ((tokentype & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
TRACE(" 0x%08x SKIP(%u)\n", tokentype, ((tokentype & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
offset += sizeof(DWORD) * ((tokentype & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
} else if (D3DVSD_TOKEN_CONSTMEM == tokentype) {
DWORD i;
@ -323,9 +323,9 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
This->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
((IWineD3DImpl*)This->wineD3DDevice->wineD3D)->gl_info.max_vshader_constantsF * 4 * sizeof(float));
}
TRACE(" 0x%08lx CONST(%lu, %lu)\n", token, constaddress, count);
TRACE(" 0x%08x CONST(%u, %u)\n", token, constaddress, count);
for (i = 0; i < count; ++i) {
TRACE(" c[%lu] = (0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx)\n",
TRACE(" c[%u] = (0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
constaddress,
*pToken,
*(pToken + 1),
@ -336,7 +336,7 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
This->constants[constaddress * 4 + 1] = *(const float *)(pToken + i * 4 + 2);
This->constants[constaddress * 4 + 2] = *(const float *)(pToken + i * 4 + 3);
This->constants[constaddress * 4 + 3] = *(const float *)(pToken + i * 4 + 4);
FIXME(" c[%lu] = (%8f, %8f, %8f, %8f)\n",
FIXME(" c[%u] = (%8f, %8f, %8f, %8f)\n",
constaddress,
*(const float*) (pToken+ i * 4 + 1),
*(const float*) (pToken + i * 4 + 2),
@ -427,14 +427,14 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVerte
static ULONG WINAPI IWineD3DVertexDeclarationImpl_AddRef(IWineD3DVertexDeclaration *iface) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI IWineD3DVertexDeclarationImpl_Release(IWineD3DVertexDeclaration *iface) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
HeapFree(GetProcessHeap(), 0, This->pDeclaration8);
@ -486,7 +486,7 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration8(IWineD3DVert
}
if (*pSizeOfData < This->declaration8Length) {
FIXME("(%p) : Returning WINED3DERR_MOREDATA numElements %ld expected %ld\n", iface, *pSizeOfData, This->declaration8Length);
FIXME("(%p) : Returning WINED3DERR_MOREDATA numElements %d expected %d\n", iface, *pSizeOfData, This->declaration8Length);
*pSizeOfData = This->declaration8Length;
return WINED3DERR_MOREDATA;
}

View File

@ -606,7 +606,7 @@ static void vshader_set_limits(
This->baseShader.limits.packed_output = 0;
This->baseShader.limits.sampler = 0;
This->baseShader.limits.label = 16;
FIXME("Unrecognized vertex shader version %#lx\n",
FIXME("Unrecognized vertex shader version %#x\n",
This->baseShader.hex_version);
}
}
@ -905,7 +905,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_ExecuteSW(IWineD3DVertexShader* iface, W
curOpcode = shader_get_opcode((IWineD3DBaseShader*) This, opcode_token);
if (NULL == curOpcode) {
FIXME("Unrecognized opcode: token=%08lX\n", opcode_token);
FIXME("Unrecognized opcode: token=%08x\n", opcode_token);
pToken += shader_skip_unrecognized((IWineD3DBaseShader*) This, pToken);
/* return FALSE; */
@ -1097,14 +1097,14 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShad
static ULONG WINAPI IWineD3DVertexShaderImpl_AddRef(IWineD3DVertexShader *iface) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI IWineD3DVertexShaderImpl_Release(IWineD3DVertexShader *iface) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
if (This->vertexDeclaration) IWineD3DVertexDeclaration_Release(This->vertexDeclaration);

View File

@ -46,14 +46,14 @@ static HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, R
static ULONG WINAPI IWineD3DVolumeImpl_AddRef(IWineD3DVolume *iface) {
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
return InterlockedIncrement(&This->resource.ref);
}
static ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) {
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
ULONG ref;
TRACE("(%p) : Releasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
ref = InterlockedDecrement(&This->resource.ref);
if (ref == 0) {
IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);

View File

@ -48,7 +48,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTex
static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DVolumeTexture *iface) {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
TRACE("(%p) : AddRef increasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
return InterlockedIncrement(&This->resource.ref);
}
@ -56,7 +56,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
ULONG ref;
int i;
TRACE("(%p) : Releasing from %ld\n", This, This->resource.ref);
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
ref = InterlockedDecrement(&This->resource.ref);
if (ref == 0) {
for (i = 0; i < This->baseTexture.levels; i++) {
@ -236,7 +236,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *i
if (Level < This->baseTexture.levels) {
hr = IWineD3DVolume_LockBox((IWineD3DVolume *)This->volumes[Level], pLockedVolume, pBox, Flags);
TRACE("(%p) Level (%d) success(%lu)\n", This, Level, hr);
TRACE("(%p) Level (%d) success(%u)\n", This, Level, hr);
} else {
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
@ -251,7 +251,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture
if (Level < This->baseTexture.levels) {
hr = IWineD3DVolume_UnlockBox((IWineD3DVolume*) This->volumes[Level]);
TRACE("(%p) -> level(%d) success(%lu)\n", This, Level, hr);
TRACE("(%p) -> level(%d) success(%u)\n", This, Level, hr);
} else {
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);

View File

@ -97,7 +97,7 @@ inline static DWORD get_config_key(HKEY defkey, HKEY appkey, const char* name, c
/* At process attach */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
TRACE("WineD3D DLLMain Reason=%ld\n", fdwReason);
TRACE("WineD3D DLLMain Reason=%d\n", fdwReason);
if (fdwReason == DLL_PROCESS_ATTACH)
{
HMODULE mod;

View File

@ -266,7 +266,7 @@ do {
/* Trace vector and strided data information */
#define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w);
#define TRACE_STRIDED(sd,name) TRACE( #name "=(data:%p, stride:%ld, type:%ld)\n", sd->u.s.name.lpData, sd->u.s.name.dwStride, sd->u.s.name.dwType);
#define TRACE_STRIDED(sd,name) TRACE( #name "=(data:%p, stride:%d, type:%d)\n", sd->u.s.name.lpData, sd->u.s.name.dwStride, sd->u.s.name.dwType);
/* Defines used for optimizations */