On 29 October 2016 at 21:11, Luis C. Busquets Pérez <luis.busquets(a)ilidium.com> wrote:
Could anyone help improving this patch so that it makes it to the wine tree?
At first sight:
@@ -5955,6 +5995,8 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base,
base->effect = effect;
+ base->clonable = TRUE; + Did you perhaps intend to store "eflags" instead here?
+ if (base->clonable) + { And then check "base->flags" against D3DXFX_NOT_CLONEABLE here.
+ if (vshader) + { + IDirect3DVertexShader9_GetFunction(vshader, NULL, &size); + if (desc->pVertexShaderFunction) + free((void *)desc->pVertexShaderFunction); + desc->pVertexShaderFunction = malloc(size); + IDirect3DVertexShader9_GetFunction(vshader, (void *)(desc->pVertexShaderFunction), &size); + } Why not move this out of the loop?
+ if (pshader) + { + IDirect3DPixelShader9_GetFunction(pshader, NULL, &size); + if (desc->pPixelShaderFunction) + free((void *)desc->pPixelShaderFunction); + desc->pPixelShaderFunction = malloc(size); + IDirect3DPixelShader9_GetFunction(pshader, (void *)(desc->pPixelShaderFunction), &size); + } Likewise.