[Mesa-dev] [PATCH 60/84] st/nine: Optimize ColorFill
Axel Davy
axel.davy at ens.fr
Wed Dec 7 22:55:33 UTC 2016
When we lock the whole surface to overwrite it, we can use DISCARD.
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/device9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 5090f6b..d5a2aed 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,
--
2.10.2
More information about the mesa-dev
mailing list