Hi Konrad,
You should try to figure out why blit_priv is NULL. That's the real issue. What drivers are you using? Do they support arb fragment program? Right now we may still call arbfp_blit_surface when the extension isn't around (was working on this a year ago, haven't had time since then :( ), this could explain why there is no priv_data since in ffp_blit_alloc we don't do any allocation.
Roderick
On Sun, Mar 20, 2011 at 3:58 AM, Konrad Rzepecki hannibal@astral.lodz.pl wrote:
Might&Magic VII from gog.com crash in bink movie plaing:
Backtrace: =>0 0x7e70c4b9 arbfp_blit_set+0x28b(blit_priv=0x0(nil), gl_info=0x135b08, surface=0x1dc788) [/mnt/skopia/devel/winegit/wine/dlls/wined3d/arb_program_shader.c:7058] in wined3d (0x0033f98c) 1 0x7e70d3db arbfp_blit_surface+0xa2(device=0x16cdc0, src_surface=0x1dc788, src_rect=0x33fa74, dst_surface=0x168140, dst_rect_in=0x33fa84, blit_op=BLIT_OP_BLIT, Filter=0x2) [/mnt/skopia/devel/winegit/wine/dlls/wined3d/arb_program_shader.c:7192] in wined3d (0x0033f9dc) 2 0x7e7d28f7 IWineD3DSurfaceImpl_BltOverride+0xf1b(dst_surface=0x168140, DestRect=0x33fcf8, src_surface=0x1dc788, SrcRect=0x33fce8, flags=0x1000000, DDBltFx=(nil), Filter=WINED3DTEXF_LINEAR) [/mnt/skopia/devel/winegit/wine/dlls/wined3d/surface.c:3787] in wined3d (0x0033fbac) 3 0x7e7d3013 IWineD3DSurfaceImpl_Blt+0x29e(iface=0x168140, DestRect=0x33fcf8, src_surface=0x1dc788, SrcRect=0x33fce8, flags=0x1000000, DDBltFx=(nil), Filter=WINED3DTEXF_LINEAR) [/mnt/skopia/devel/winegit/wine/dlls/wined3d/surface.c:3930] in wined3d (0x0033fc2c) 4 0x7e8687f2 ddraw_surface7_Blt+0x380(iface=0x135308, DestRect=0x33fcf8, SrcSurface=0x1dc560, SrcRect=0x33fce8, Flags=0x1000000, DDBltFx=(nil)) [/mnt/skopia/devel/winegit/wine/dlls/ddraw/surface.c:908] in ddraw (0x0033fc9c) 5 0x004a18cd in mm7-rel (+0xa18cc) (0x0033fcc8) 6 0x004beda4 in mm7-rel (+0xbeda3) (0x0033fd08) 7 0x004be721 in mm7-rel (+0xbe720) (0x00000000)
dlls/wined3d/surface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 745bd77..baa032b 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3924,8 +3924,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT }
/* Special cases for RenderTargets */
- if ((This->resource.usage & WINED3DUSAGE_RENDERTARGET)
- || (src && (src->resource.usage & WINED3DUSAGE_RENDERTARGET)))
- if (This->resource.device->blit_priv && ((This->resource.usage & WINED3DUSAGE_RENDERTARGET)
- || (src && (src->resource.usage & WINED3DUSAGE_RENDERTARGET))))
{ if (SUCCEEDED(IWineD3DSurfaceImpl_BltOverride(This, DestRect, src, SrcRect, flags, DDBltFx, Filter))) return WINED3D_OK; -- 1.7.4.1
Dnia poniedziałek, 21 marca 2011, napisałeś(aś):
You should try to figure out why blit_priv is NULL. That's the real issue.
I wish to know, where to search. But my patch prevent crash if blit_priv is NULL form some reason. This is best place I found to fallback to software.
What drivers are you using?
Binary NVIDIA on GF Ti4200
Do they support arb fragment program?
Im not sure, it is OGL 1.5.8 but with these extensions available (only revelant part): GL_ARB_shader_objects, GL_ARB_shading_language_100, GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_NV_register_combiners, GL_NV_register_combiners2, GL_NV_texture_env_combine4, GL_NV_texture_shader, GL_NV_texture_shader2, GL_NV_texture_shader3, GL_NV_vertex_program, GL_NV_vertex_program1_1
For sure hardware support vertex and fragment 1.X.
Right now we may still call arbfp_blit_surface when the extension isn't around (was working on this a year ago, haven't had time since then :( ), this could explain why there is no priv_data since in ffp_blit_alloc we don't do any allocation.
I can't help with that, for now we can print FIXME when blit_priv is NULL so this situation is not forget.
Okay, as I expected no ARB_fragment_program support. Give the attached patch a try. For the time being (hope to get a little bit of time to finish what I started..) this patch may be acceptable.
Roderick
On Mon, Mar 21, 2011 at 8:36 AM, Konrad Rzepecki hannibal@astral.lodz.pl wrote:
Dnia poniedziałek, 21 marca 2011, napisałeś(aś):
You should try to figure out why blit_priv is NULL. That's the real issue.
I wish to know, where to search. But my patch prevent crash if blit_priv is NULL form some reason. This is best place I found to fallback to software.
What drivers are you using?
Binary NVIDIA on GF Ti4200
Do they support arb fragment program?
Im not sure, it is OGL 1.5.8 but with these extensions available (only revelant part): GL_ARB_shader_objects, GL_ARB_shading_language_100, GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_NV_register_combiners, GL_NV_register_combiners2, GL_NV_texture_env_combine4, GL_NV_texture_shader, GL_NV_texture_shader2, GL_NV_texture_shader3, GL_NV_vertex_program, GL_NV_vertex_program1_1
For sure hardware support vertex and fragment 1.X.
Right now we may still call arbfp_blit_surface when the extension isn't around (was working on this a year ago, haven't had time since then :( ), this could explain why there is no priv_data since in ffp_blit_alloc we don't do any allocation.
I can't help with that, for now we can print FIXME when blit_priv is NULL so this situation is not forget.
-- Konrad Rzepecki (Hannibal)
Dnia poniedziałek, 21 marca 2011, Roderick Colenbrander napisał(a):
Okay, as I expected no ARB_fragment_program support. Give the attached patch a try. For the time being (hope to get a little bit of time to finish what I started..) this patch may be acceptable.
No crash with your patch, so probably it is OK.
So what now? I'm new here, and I don't know should I in any way cancel my patch? Or it is enough you to send yours?
On Mon, Mar 21, 2011 at 5:12 PM, Konrad Rzepecki hannibal@astral.lodz.pl wrote:
Dnia poniedziałek, 21 marca 2011, Roderick Colenbrander napisał(a):
Okay, as I expected no ARB_fragment_program support. Give the attached patch a try. For the time being (hope to get a little bit of time to finish what I started..) this patch may be acceptable.
No crash with your patch, so probably it is OK.
Good :) I guess I should submit the patch as it is now, I hope Henri would be fine with doing it this way for the time being (the FBO code is doing something equivalent).
So what now? I'm new here, and I don't know should I in any way cancel my patch? Or it is enough you to send yours?
I'm not fully sure how Alexandre works. I think typically when he sees a patch being discussed, he may already drop it.
Roderick
2011/3/21 Roderick Colenbrander thunderbird2k@gmail.com:
Good :) I guess I should submit the patch as it is now, I hope Henri would be fine with doing it this way for the time being (the FBO code is doing something equivalent).
Should be ok for the time being.