wined3d: Clear reg_maps in shader_get_registers_used() instead of the callers.
This commit is contained in:
parent
0df4514894
commit
9db67a5971
|
@ -556,8 +556,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, struct shader_reg_m
|
||||||
|
|
||||||
/* There are some minor differences between pixel and vertex shaders */
|
/* There are some minor differences between pixel and vertex shaders */
|
||||||
|
|
||||||
memset(reg_maps->bumpmat, 0, sizeof(reg_maps->bumpmat));
|
memset(reg_maps, 0, sizeof(*reg_maps));
|
||||||
memset(reg_maps->luminanceparams, 0, sizeof(reg_maps->luminanceparams));
|
|
||||||
|
|
||||||
/* get_registers_used is called on every compile on some 1.x shaders, which can result
|
/* get_registers_used is called on every compile on some 1.x shaders, which can result
|
||||||
* in stacking up a collection of local constants. Delete the old constants if existing
|
* in stacking up a collection of local constants. Delete the old constants if existing
|
||||||
|
|
|
@ -314,7 +314,6 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
|
||||||
list_init(&This->baseShader.constantsI);
|
list_init(&This->baseShader.constantsI);
|
||||||
|
|
||||||
/* Second pass: figure out which registers are used, what the semantics are, etc.. */
|
/* Second pass: figure out which registers are used, what the semantics are, etc.. */
|
||||||
memset(reg_maps, 0, sizeof(shader_reg_maps));
|
|
||||||
hr = shader_get_registers_used((IWineD3DBaseShader *)This, reg_maps, This->semantics_in, NULL, pFunction);
|
hr = shader_get_registers_used((IWineD3DBaseShader *)This, reg_maps, This->semantics_in, NULL, pFunction);
|
||||||
if (FAILED(hr)) return hr;
|
if (FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
|
|
@ -329,7 +329,6 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader
|
||||||
/* Second pass: figure out registers used, semantics, etc.. */
|
/* Second pass: figure out registers used, semantics, etc.. */
|
||||||
This->min_rel_offset = GL_LIMITS(vshader_constantsF);
|
This->min_rel_offset = GL_LIMITS(vshader_constantsF);
|
||||||
This->max_rel_offset = 0;
|
This->max_rel_offset = 0;
|
||||||
memset(reg_maps, 0, sizeof(shader_reg_maps));
|
|
||||||
hr = shader_get_registers_used((IWineD3DBaseShader*) This, reg_maps,
|
hr = shader_get_registers_used((IWineD3DBaseShader*) This, reg_maps,
|
||||||
This->semantics_in, This->semantics_out, pFunction);
|
This->semantics_in, This->semantics_out, pFunction);
|
||||||
if (hr != WINED3D_OK) return hr;
|
if (hr != WINED3D_OK) return hr;
|
||||||
|
|
Loading…
Reference in New Issue