Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
-- v2: d3dx9/effect: Document one remaining header field.
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3dx9_36/effect.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index d84ad749f30..ae6bb632e36 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -441,19 +441,6 @@ static inline uint32_t read_u32(const char **ptr) return u; }
-static void skip_u32_unknown(const char **ptr, unsigned int count) -{ - unsigned int i; - uint32_t u; - - WARN("Skipping %u unknown DWORDs:\n", count); - for (i = 0; i < count; ++i) - { - u = read_u32(ptr); - WARN("\t0x%08x\n", u); - } -} - static inline D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter) { return (D3DXHANDLE)parameter; @@ -6292,7 +6279,7 @@ static BOOL param_set_top_level_param(void *top_level_param, struct d3dx_paramet static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, UINT data_size, uint32_t start, const char **skip_constants, unsigned int skip_constants_count) { - unsigned int string_count, resource_count, params_count; + unsigned int string_count, resource_count, params_count, shader_count; const char *ptr = data + start; unsigned int i; HRESULT hr; @@ -6303,7 +6290,9 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U effect->technique_count = read_u32(&ptr); TRACE("Technique count: %u.\n", effect->technique_count);
- skip_u32_unknown(&ptr, 1); + /* This value appears to be equal to a number of shader variables plus number of passes. */ + shader_count = read_u32(&ptr); + TRACE("Shader count: %u.\n", shader_count);
effect->object_count = read_u32(&ptr); TRACE("Object count: %u.\n", effect->object_count);
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=147412
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dinput: joystick8.c:5759: Test failed: input 1: WaitForSingleObject returned 0x102 joystick8.c:5760: Test failed: input 1: got 0 WM_INPUT messages joystick8.c:5763: Test failed: input 1: got dwType 0 joystick8.c:5764: Test failed: input 1: got header.dwSize 0 joystick8.c:5766: Test failed: input 1: got hDevice 0000000000000000 joystick8.c:5768: Test failed: input 1: got dwSizeHid 0 joystick8.c:5769: Test failed: input 1: got dwCount 0
kernel32: comm.c:1586: Test failed: Unexpected time 1001, expected around 500
Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/effect.c:
effect->technique_count = read_u32(&ptr); TRACE("Technique count: %u.\n", effect->technique_count);
- skip_u32_unknown(&ptr, 1);
- /* This value appears to be equal to a number of shader variables plus number of passes. */
I'm going to be super nitpicky and say that this might sounds a bit better by restructuring it like "This value appears to be the sum of shader variables and passes count."
This merge request was approved by Matteo Bruni.
Approving.
The MR subject isn't quite correct anymore, FWIW.
On Mon Jul 29 21:04:29 2024 +0000, Matteo Bruni wrote:
I'm going to be super nitpicky and say that this might sounds a bit better by restructuring it like "This value appears to be the sum of shader variables and passes count."
Sure, it makes even less sense when worded that way for me, but I can change it. My feeling is that it really is a shader counter, and passes contribute some dummy slot for that. Calling it a sum would be using unrelated values in the same sum expression. I'll push something.