[PATCH 03/10] d3d10/effect: Remove unused arguments from shader resources helper.
Matteo Bruni
matteo.mystral at gmail.com
Fri Oct 15 04:49:09 CDT 2021
On Thu, Oct 14, 2021 at 8:42 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
> dlls/d3d10/effect.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
> index a0bb859e535..c62c010f892 100644
> --- a/dlls/d3d10/effect.c
> +++ b/dlls/d3d10/effect.c
> @@ -618,7 +618,7 @@ static struct d3d10_effect_variable * d3d10_effect_get_variable_by_name(
> return effect->pool ? d3d10_effect_get_variable_by_name(effect->pool, name) : NULL;
> }
>
> -static HRESULT get_fx10_shader_resources(struct d3d10_effect_variable *v, const void *data, size_t data_size)
> +static HRESULT get_fx10_shader_resources(struct d3d10_effect_variable *v)
> {
> struct d3d10_effect_shader_variable *sv = &v->u.shader;
> struct d3d10_effect_shader_resource *sr;
> @@ -846,7 +846,7 @@ static HRESULT parse_fx10_shader(const char *data, size_t data_size, DWORD offse
>
> memcpy(ID3D10Blob_GetBufferPointer(v->u.shader.bytecode), ptr, dxbc_size);
>
> - if (FAILED(hr = get_fx10_shader_resources(v, ptr, dxbc_size)))
> + if (FAILED(hr = get_fx10_shader_resources(v)))
> return hr;
>
> switch (v->type->basetype)
Nice!
I couldn't help but notice that the function name has room for
improvement. This isn't a "get" in the usual sense, what it does is
looking up and storing info about the resources used by a shader.
I don't have particularly inspired suggestions, but maybe something
with find_ or init_ (or even set_, although it doesn't feel great) in
place of get_ might work.
More information about the wine-devel
mailing list