From: Jacek Caban jacek@codeweavers.com
Avoid implicit casts from enum pointers. --- dlls/wined3d/shader_sm4.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index f76bd693b3b..ab88b4b151c 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -1853,10 +1853,12 @@ struct aon9_header unsigned int byte_code_offset; };
-static void read_dword(const char **ptr, unsigned int *d) +static unsigned int read_dword(const char **ptr) { - memcpy(d, *ptr, sizeof(*d)); - *ptr += sizeof(*d); + unsigned int ret; + memcpy(&ret, ptr, sizeof(ret)); + *ptr += sizeof(ret); + return ret; }
static BOOL require_space(size_t offset, size_t count, size_t size, size_t data_size) @@ -1872,7 +1874,7 @@ static void skip_dword_unknown(const char **ptr, unsigned int count) WARN("Skipping %u unknown DWORDs:\n", count); for (i = 0; i < count; ++i) { - read_dword(ptr, &d); + d = read_dword(ptr); WARN("\t0x%08x\n", d); } } @@ -1906,7 +1908,7 @@ static HRESULT shader_parse_signature(DWORD tag, const char *data, unsigned int return E_INVALIDARG; }
- read_dword(&ptr, &count); + count = read_dword(&ptr); TRACE("%u elements.\n", count);
skip_dword_unknown(&ptr, 1); /* It seems to always be 0x00000008. */ @@ -1931,24 +1933,24 @@ static HRESULT shader_parse_signature(DWORD tag, const char *data, unsigned int unsigned int name_offset;
if (has_stream_index) - read_dword(&ptr, &e[i].stream_idx); + e[i].stream_idx = read_dword(&ptr); else e[i].stream_idx = 0; - read_dword(&ptr, &name_offset); + name_offset = read_dword(&ptr); if (!(e[i].semantic_name = shader_get_string(data, data_size, name_offset))) { WARN("Invalid name offset %#x (data size %#x).\n", name_offset, data_size); heap_free(e); return E_INVALIDARG; } - read_dword(&ptr, &e[i].semantic_idx); - read_dword(&ptr, &e[i].sysval_semantic); - read_dword(&ptr, &e[i].component_type); - read_dword(&ptr, &e[i].register_idx); - read_dword(&ptr, &e[i].mask); + e[i].semantic_idx = read_dword(&ptr); + e[i].sysval_semantic = read_dword(&ptr); + e[i].component_type = read_dword(&ptr); + e[i].register_idx = read_dword(&ptr); + e[i].mask = read_dword(&ptr);
if (has_min_precision) - read_dword(&ptr, &e[i].min_precision); + e[i].min_precision = read_dword(&ptr); else e[i].min_precision = 0;
From: Jacek Caban jacek@codeweavers.com
--- dlls/wined3d/glsl_shader.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 9ab3f722d31..1e7a1195f8b 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1643,7 +1643,6 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context DWORD point_count = 0; DWORD spot_count = 0; DWORD directional_count = 0; - DWORD parallel_point_count = 0;
for (i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i) { @@ -1662,7 +1661,6 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context ++directional_count; break; case WINED3D_LIGHT_PARALLELPOINT: - ++parallel_point_count; break; default: FIXME("Unhandled light type %#x.\n", state->light_state.lights[i]->OriginalParms.type);
From: Jacek Caban jacek@codeweavers.com
Fixes -Wbitfield-constant-conversion when enum is signed, causing WINED3D_GL_RES_TYPE_TEX_RECT value to be trincated to -4. --- dlls/wined3d/arb_program_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 806fae6b522..0773c3e34d9 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -6927,7 +6927,7 @@ const struct wined3d_fragment_pipe_ops arbfp_fragment_pipeline = struct arbfp_blit_type { enum complex_fixup fixup : 4; - enum wined3d_gl_resource_type res_type : 3; + unsigned int res_type : 3; DWORD use_color_key : 1; DWORD padding : 24; };
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=138913
Your paranoid android.
=== debian11b (64 bit WoW report) ===
d2d1: d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:2107: Test failed: Failed to create render target. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:2602: Test failed: Failed to create render target. d2d1.c:1175: Test failed: Got unexpected hr 0x80070057. d2d1.c:1858: Test failed: Failed to create render target. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000407b7e).
d3d10core: d3d10core.c:3969: Test failed: Failed to create SM4 vertex shader, hr 0x80070057 d3d10core.c:3972: Test failed: Got unexpected refcount 1, expected >= 2. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x0000000041b073).
d3d10: effect.c:2971: Test failed: Got unexpected hr 0x80070057. Unhandled exception: page fault on read access to 0xffffffffffffffff in 64-bit code (0x0000000040f0e0).
d3d11: d3d11.c:5028: Test failed: Feature level 0xb000: Got hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000410542).
d3dcompiler_43: hlsl_d3d11.c:393: Test failed: Failed to create vertex shader, hr 0x80070057. hlsl_d3d11.c:393: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000409d6f).
d3dcompiler_46: hlsl_d3d11.c:393: Test failed: Failed to create vertex shader, hr 0x80070057. hlsl_d3d11.c:393: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x0000000040a63f).
d3dcompiler_47: hlsl_d3d11.c:393: Test failed: Failed to create vertex shader, hr 0x80070057. hlsl_d3d11.c:393: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x0000000040a63f).
d3dx10_34: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_35: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_36: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_37: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057.
d3dx10_38: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_39: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_40: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_41: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_42: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
d3dx10_43: d3dx10.c:1767: Test failed: Failed to create vertex shader, hr 0x80070057. d3dx10.c:1770: Test failed: Failed to create geometry shader, hr 0x80070057. d3dx10.c:1773: Test failed: Failed to create pixel shader, hr 0x80070057. Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x00000000406db1).
mfmediaengine: mfmediaengine.c:1337: Test failed: Unexpected hr 0x80070057. mfmediaengine.c:1357: Test failed: Unexpected 56% diff mfmediaengine.c:1898: Test failed: Unexpected hr 0x80070057.
Report validation errors: d3dx10_37:d3dx10 crashed (c0000005)