aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/surface9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-11-13 12:47:58 +0100
committerAxel Davy <[email protected]>2016-12-20 23:47:08 +0100
commit884166a251ec45f2bfac0139f18b162d31db241e (patch)
tree662e0085d8e6af057d1a4999be469d0f3795f986 /src/gallium/state_trackers/nine/surface9.c
parent7b154ac04d9cacf98631a826c25e7e3756f5cda9 (diff)
st/nine: Use nine_context_clear_render_target
Enables to not wait for the worker thread for ColorFill. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/surface9.c')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index ca9fd55828e..6373f6908d5 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -55,9 +55,6 @@ NineSurface9_ctor( struct NineSurface9 *This,
D3DSURFACE_DESC *pDesc )
{
HRESULT hr;
- union pipe_color_union rgba = {0};
- struct pipe_surface *surf;
- struct pipe_context *pipe;
bool allocate = !pContainer && pDesc->Format != D3DFMT_NULL;
D3DMULTISAMPLE_TYPE multisample_type;
@@ -192,12 +189,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
}
/* TODO: investigate what else exactly needs to be cleared */
- if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET)) {
- surf = NineSurface9_GetSurface(This, 0);
- pipe = nine_context_get_pipe_acquire(pParams->device);
- pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width, pDesc->Height, false);
- nine_context_get_pipe_release(pParams->device);
- }
+ if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET))
+ nine_context_clear_render_target(pParams->device, This, 0, 0, 0, pDesc->Width, pDesc->Height);
NineSurface9_Dump(This);