Pretty sure this isn't an issue for you since DX9 didn't have render conditions (right?) but clear_render_target is documented to respect the render condition. Assuming you never set a render condition this is all good.
-ilia On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy <axel.d...@ens.fr> wrote: > From: Patrick Rudolph <s...@das-labor.org> > > Clear every rendertarget on creation. > Fixes https://github.com/iXit/Mesa-3D/issues/139 > > Signed-off-by: Patrick Rudolph <s...@das-labor.org> > Reviewed-by: Axel Davy <axel.d...@ens.fr> > --- > src/gallium/state_trackers/nine/surface9.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/src/gallium/state_trackers/nine/surface9.c > b/src/gallium/state_trackers/nine/surface9.c > index 14c1ce9..9e5f191 100644 > --- a/src/gallium/state_trackers/nine/surface9.c > +++ b/src/gallium/state_trackers/nine/surface9.c > @@ -56,6 +56,9 @@ NineSurface9_ctor( struct NineSurface9 *This, > D3DSURFACE_DESC *pDesc ) > { > HRESULT hr; > + union pipe_color_union rgba = {0}; > + struct pipe_surface *surf; > + struct pipe_context *pipe = pParams->device->pipe; > > DBG("This=%p pDevice=%p pResource=%p Level=%u Layer=%u pDesc=%p\n", > This, pParams->device, pResource, Level, Layer, pDesc); > @@ -140,6 +143,12 @@ NineSurface9_ctor( struct NineSurface9 *This, > if (pResource && NineSurface9_IsOffscreenPlain(This)) > pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE; > > + /* TODO: investigate what else exactly needs to be cleared */ > + if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET)) { > + surf = NineSurface9_GetSurface(This, 0); > + pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width, > pDesc->Height); > + } > + > NineSurface9_Dump(This); > > return D3D_OK; > -- > 2.7.0 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev