[D3D] Some execute buffers rewrites + misc fixes

Lionel Ulmer lionel.ulmer at free.fr
Tue May 20 13:03:51 CDT 2003


Some comments on 'small' parts... I will have to commit the patch on my tree
to try to understand the resulting code to understand it better :-)

> +    if ( IsEqualGUID( &IID_IDirectDrawSurface, riid ) ||
> +         IsEqualGUID( &IID_IDirectDrawSurface2, riid ) ||
> +         IsEqualGUID( &IID_IDirectDrawSurface3, riid ) ) {
> +        IDirectDrawSurface7_AddRef(ICOM_INTERFACE(This->surface, IDirectDrawSurface7));
> +        *obp = ICOM_INTERFACE(This->surface, IDirectDrawSurface3);
> +	TRACE("  Return IDirectDrawSurface3 interface %p\n", *obp);
> +	return S_OK;
> +    }
> +    if ( IsEqualGUID( &IID_IDirectDrawSurface3, riid ) ||
> +         IsEqualGUID( &IID_IDirectDrawSurface7, riid ) ) {
> +        IDirectDrawSurface7_AddRef(ICOM_INTERFACE(This->surface, IDirectDrawSurface7));
> +        *obp = ICOM_INTERFACE(This->surface, IDirectDrawSurface7);
> +	TRACE("  Return IDirectDrawSurface7 interface %p\n", *obp);
> +	return S_OK;
> +    }

Well, it's a bit strange to have 'IID_IDirectDrawSurface3' twice, no :-) ?

>      /* We only support the BLT with DEPTH_FILL for now */
> -    if (This->ddraw_owner->d3d != NULL) {
> +    if ((dwFlags & DDBLT_DEPTHFILL) && This->ddraw_owner->d3d != NULL) {
>          if (This->ddraw_owner->d3d->current_device != NULL) {
>  	    This->ddraw_owner->d3d->current_device->clear(This->ddraw_owner->d3d->current_device,
>  							  0, NULL, /* Clear the whole screen */

Did you add this check here because some game were actually doing a 'normal'
blit on the ZBuffer ? What happens in this case ?

Moreover, you could also add here (which I forgot to do in my patch),
support for the 'dst locking rectangle' in case an application tries to
clear only part of the buffer (see example in the Blt overide function in
d3ddevice/mesa.c for the 'Colorfill' case).

          Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/



More information about the wine-devel mailing list