diff options
author | Marek Olšák <[email protected]> | 2013-02-27 23:50:15 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-01 13:46:32 +0100 |
commit | 89e2898e9ecfcf93c337b99542b06892a8e30cbe (patch) | |
tree | cc04229ada84b24ff72eeb2969f2a1a8723fe7e6 /src/gallium/drivers/r600/evergreen_state.c | |
parent | 44f37261fc34763003314245a811cfd21ce6fc87 (diff) |
r600g: always map uninitialized buffer range as unsynchronized
Any driver can implement this simple and efficient optimization.
Team Fortress 2 hits it always. The DISCARD_RANGE codepath is not even used
with TF2 anymore, so we avoid a ton of useless buffer copies.
Tested-by: Andreas Boll <[email protected]>
NOTE: This is a candidate for the 9.1 branch.
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 41dd70e5ab1..97f91df374c 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1377,6 +1377,10 @@ void evergreen_init_color_surface_rat(struct r600_context *rctx, * elements. */ surf->cb_color_dim = pipe_buffer->width0; + /* Set the buffer range the GPU will have access to: */ + util_range_add(&r600_resource(pipe_buffer)->valid_buffer_range, + 0, pipe_buffer->width0); + surf->cb_color_cmask = surf->cb_color_base; surf->cb_color_cmask_slice = 0; surf->cb_color_fmask = surf->cb_color_base; |