mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:52:56 +00:00
[WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_copy_data().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 26b9b04e7f40c7a2011684f01ff07be91047b492 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
44ec74a6a4
commit
2b9f231acf
2 changed files with 8 additions and 8 deletions
|
@ -5319,9 +5319,9 @@ static HRESULT d3dx9_parse_name(char **name, const char *ptr)
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT d3dx9_copy_data(struct d3dx9_base_effect *base, unsigned int object_id, const char **ptr)
|
static HRESULT d3dx9_copy_data(struct d3dx_effect *effect, unsigned int object_id, const char **ptr)
|
||||||
{
|
{
|
||||||
struct d3dx_object *object = &base->objects[object_id];
|
struct d3dx_object *object = &effect->base_effect.objects[object_id];
|
||||||
|
|
||||||
if (object->size || object->data)
|
if (object->size || object->data)
|
||||||
{
|
{
|
||||||
|
@ -6172,7 +6172,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
||||||
case D3DXPT_VERTEXSHADER:
|
case D3DXPT_VERTEXSHADER:
|
||||||
case D3DXPT_PIXELSHADER:
|
case D3DXPT_PIXELSHADER:
|
||||||
state->type = ST_CONSTANT;
|
state->type = ST_CONSTANT;
|
||||||
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
|
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
if (object->data)
|
if (object->data)
|
||||||
|
@ -6191,7 +6191,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
||||||
case D3DXPT_FLOAT:
|
case D3DXPT_FLOAT:
|
||||||
case D3DXPT_STRING:
|
case D3DXPT_STRING:
|
||||||
state->type = ST_FXLC;
|
state->type = ST_FXLC;
|
||||||
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
|
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
|
||||||
return hr;
|
return hr;
|
||||||
if (FAILED(hr = d3dx_create_param_eval(base, object->data, object->size, param->type,
|
if (FAILED(hr = d3dx_create_param_eval(base, object->data, object->size, param->type,
|
||||||
¶m->param_eval, get_version_counter_ptr(base), NULL, 0)))
|
¶m->param_eval, get_version_counter_ptr(base), NULL, 0)))
|
||||||
|
@ -6206,7 +6206,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
state->type = ST_PARAMETER;
|
state->type = ST_PARAMETER;
|
||||||
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
|
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
TRACE("Looking for parameter %s.\n", debugstr_a(object->data));
|
TRACE("Looking for parameter %s.\n", debugstr_a(object->data));
|
||||||
|
@ -6238,7 +6238,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
state->type = ST_ARRAY_SELECTOR;
|
state->type = ST_ARRAY_SELECTOR;
|
||||||
if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr)))
|
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
|
||||||
return hr;
|
return hr;
|
||||||
hr = d3dx_parse_array_selector(effect, state, skip_constants, skip_constants_count);
|
hr = d3dx_parse_array_selector(effect, state, skip_constants, skip_constants_count);
|
||||||
break;
|
break;
|
||||||
|
@ -6348,7 +6348,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U
|
||||||
read_dword(&ptr, &id);
|
read_dword(&ptr, &id);
|
||||||
TRACE("id: %u.\n", id);
|
TRACE("id: %u.\n", id);
|
||||||
|
|
||||||
if (FAILED(hr = d3dx9_copy_data(base, id, &ptr)))
|
if (FAILED(hr = d3dx9_copy_data(effect, id, &ptr)))
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
||||||
if (base->objects[id].data)
|
if (base->objects[id].data)
|
||||||
|
|
|
@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
|
||||||
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
||||||
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
||||||
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
||||||
tags: {wine: 54bdc66acf4abe1f1fa38238ed824c2372e1ff91}
|
tags: {wine: 26b9b04e7f40c7a2011684f01ff07be91047b492}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue