[PATCH 0/3] MR332: d3dx10: Support creating effect from pre-built shader

Matteo Bruni (@Mystral) wine at gitlab.winehq.org
Fri Jul 1 14:25:13 CDT 2022


Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/compiler.c:
> +    {
> +        hr = E_OUTOFMEMORY;
> +        goto end;
> +    }
> +
> +    if (!ReadFile(file, source, source_size, &read_size, NULL) || read_size != source_size)
> +    {
> +        WARN("Failed to read file contents.\n");
> +        hr = E_FAIL;
> +        goto end;
> +    }
> +
> +    WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, sizeof(filename_a), NULL, NULL);
> +
> +    hr = D3DX10CreateEffectFromMemory(source, source_size, filename_a, defines, include, profile,
> +            shader_flags, effect_flags, device, effect_pool, pump, effect, errors, hresult);
Makes sense. I'm not super happy with the patch subject, it doesn't immediately suggest to me that the idea is to always go through D3DX10CreateEffectFromMemory(). I don't necessarily have a better suggestion though, other than saying exactly that like "d3dx10: Go through D3DX10CreateEffectFromMemory() in all the D3DX10CreateEffectFrom*() variants." or similar.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/332#note_3150



More information about the wine-devel mailing list