diff options
author | Eric Anholt <[email protected]> | 2009-11-12 14:57:30 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-11-13 13:18:57 -0800 |
commit | ded0ec1ea5db8e08b0bec8ac0d9d30f98e360003 (patch) | |
tree | 545936efee1d8fc5dcbbfed3ae96109e7a30d745 /src/mesa/drivers/dri/intel | |
parent | 8e8586e62671e8337c08b086bf7f3c54cc46191d (diff) |
i965: Use bo_map instead of subdata to upload the bits of constant buffer.
Saves CPU time, resulting in a 2.5% FPS win on ETQW.
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 84fbfc564c0..8936f757a42 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -590,4 +590,25 @@ is_power_of_two(uint32_t value) return (value & (value - 1)) == 0; } +static inline void +intel_bo_map_gtt_preferred(struct intel_context *intel, + drm_intel_bo *bo, + GLboolean write) +{ + if (intel->intelScreen->kernel_exec_fencing) + drm_intel_gem_bo_map_gtt(bo); + else + drm_intel_bo_map(bo, write); +} + +static inline void +intel_bo_unmap_gtt_preferred(struct intel_context *intel, + drm_intel_bo *bo) +{ + if (intel->intelScreen->kernel_exec_fencing) + drm_intel_gem_bo_unmap_gtt(bo); + else + drm_intel_bo_unmap(bo); +} + #endif |