summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-11-13 12:40:10 +0100
committerAxel Davy <[email protected]>2016-12-20 23:44:23 +0100
commit9bf1da05d9375f6faf4a3977c7674a1cda9ca0b0 (patch)
tree84740f8a94aea0e5c457f13d0535b13be9d1efc8 /src/gallium/state_trackers/nine/device9.c
parent31262bbce085c69ef7a654528f509cb37415b41f (diff)
st/nine: Simplify ColorFill
For render targets, NineSurface9_GetSurface is not expected to fail. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 271aa2b6b9f..28442eb76fc 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1757,7 +1757,6 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
struct pipe_surface *psurf;
unsigned x, y, w, h;
union pipe_color_union rgba;
- boolean fallback;
DBG("This=%p pSurface=%p pRect=%p color=%08x\n", This,
pSurface, pRect, color);
@@ -1793,15 +1792,8 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
}
d3dcolor_to_pipe_color_union(&rgba, color);
- fallback = !(surf->base.info.bind & PIPE_BIND_RENDER_TARGET);
-
- if (!fallback) {
+ if (surf->base.info.bind & PIPE_BIND_RENDER_TARGET) {
psurf = NineSurface9_GetSurface(surf, 0);
- if (!psurf)
- fallback = TRUE;
- }
-
- if (!fallback) {
pipe->clear_render_target(pipe, psurf, &rgba, x, y, w, h, false);
} else {
D3DLOCKED_RECT lock;