diff options
author | Axel Davy <[email protected]> | 2016-11-13 12:41:53 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:23 +0100 |
commit | 7b154ac04d9cacf98631a826c25e7e3756f5cda9 (patch) | |
tree | f4fa05f2c62cf2b24c5b5dbcba85a8465cc9ecb6 /src/gallium/state_trackers | |
parent | 9bf1da05d9375f6faf4a3977c7674a1cda9ca0b0 (diff) |
st/nine: Optimize ColorFill
When we lock the whole surface to overwrite it, we can use DISCARD.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 28442eb76fc..66bfc8d0181 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -1800,7 +1800,7 @@ NineDevice9_ColorFill( struct NineDevice9 *This, union util_color uc; HRESULT hr; /* XXX: lock pRect and fix util_fill_rect */ - hr = NineSurface9_LockRect(surf, &lock, NULL, 0); + hr = NineSurface9_LockRect(surf, &lock, NULL, pRect ? 0 : D3DLOCK_DISCARD); if (FAILED(hr)) return hr; util_pack_color_ub(color >> 16, color >> 8, color >> 0, color >> 24, |